-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
Hello, I want to add price on new product through 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,
Metadata
Metadata
Assignees
Labels
No labels