Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Add price when adding product by Utpal Das

$
0
0

Hello, I want to add price on new product through shopify php api. Below is the code which i am using to add new product. Can you please tell me where is the error.

$newproduct = array
(
"product"=>array
(
"title"=>"Product again",
"body_html"=>"testing product",

"vendor"=>"Vendor",
"product_type"=>"Test",
"variants": [ {"price": 12.00 } ]
)
);

foreach($newproduct["product"] as $k => $v){ $newproduct["product"][$k] = iconv("UTF-8", "ISO-8859-2", $v); } $senditem = $sc->call('POST', '/admin/products.json', $newproduct, $response_headers);

 

Thanks in advance.

Regards,


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>