//MerchiumApp.Bar.remove('divider2'); //MerchiumApp.Bar.remove('app'); //MerchiumApp.Bar.remove(['new', 'prev']); }); </script> </head> <body> <?php echo "<p>ADMIN AREA</p>"; echo "<pre>"; echo "<p>Token: {$access_token}<br> Shop: {$shop_domain}</p>"; echo "<p>Lets send some test requests:</p>"; // // Send Create // $res = $merchium->createRequest('products', array('product_code' => 'test', 'product' => 'Test product', 'price' => '25.0', 'company_id' => 1, 'status' => 'A', 'main_category' => '166', 'category_ids' => array('166'))); if ($res === false) { echo "<p>Error raised on create request: <b>" . $merchium->getLastError() . "</b></p>"; exit; } $new_product_id = $res['product_id']; echo "<p>Product with product_id={$new_product_id} was successfully created.</p>"; // // Send Update // $res = $merchium->updateRequest("products/{$new_product_id}", array('price' => 2500.0)); if ($res === false) { echo "<p>Error raised on update request: <b>" . $merchium->getLastError() . "</b></p>"; exit; } echo "<p>Price for product with product_id={$res['product_id']} was successfully updated.</p>";