Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Brand List And Vat Rate Topic   - - - - -

 
  • sayed
  • Newbie
  • Members
  • Join Date: 04-Oct 17
  • 3 posts

Posted 04 October 2017 - 08:15 PM #1

I am using cs cart api and I am adding brands to "Brand" list, PLease let me know how to add new brand in the list using api as I have tried with the cs cart api documentation but it is not properly documentated which let me know, how to add brands in "Brand" list. And other features into the dropdown list of particular product and also "VAT" option checked using api.
The coding language I am using is PHP
Please help me to sort the issue
Thanks



 
  • sayed
  • Newbie
  • Members
  • Join Date: 04-Oct 17
  • 3 posts

Posted 05 October 2017 - 05:37 AM #2

Hello

I am getting issue while creating "Brand" feature in cs cart using cs cart API

I am using like below

$URL= http://example.com/api/products/250

$data = '{"product_features": {"28": {"feature_type": "E", "value": "test"}}}';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $URL);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_POST, TRUE);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");

curl_setopt($ch, CURLOPT_POSTFIELDS,$data);

curl_setopt($ch, CURLOPT_HTTPHEADER,$header);

// curl_setopt($ch, CURLOPT_HEADER,true);

$result=curl_exec($ch);

curl_close($ch);

$re = json_decode($result,true);

print_r($re);

I am getting "product_id" in response but no feature is adding. I have checked the feature id again and it is ok. Please help me to sort the issue

Thanks in advance