/** * Get Metafields */ public function getMetafieldsTest() { $metafield = new \erdiko\shopify\models\Metafield(); $meta = array("metafield" => array("namespace" => $metafield->getNamespace(), "key" => "warehouse", "value" => 25, "value_type" => "integer")); $data = $metafield->setMetafields($meta); $this->setTitle('Shopify Metafields'); $this->setContent($this->getLayout('json', $data)); }
/** * Delete Metafield of a product */ public function getDeleteProductMetaData() { $metafield = new \erdiko\shopify\models\Metafield(); $productID = $_GET['product_id']; $metaFieldID = $_GET['id']; $metafield->deleteProductMetaField($productID, $metaFieldID, array()); }
/** * display all the store metafields */ public function getDisplayStoreInfo() { $meta = new \erdiko\shopify\models\Metafield(); $data = $meta->getStoreInfo(); $this->setTitle('Store Info'); $this->setContent($this->getLayout('grid/storeInfoListing', $data, dirname(__DIR__))); }