Jump to content

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

I Am Getting Issue While Creating "brand" Feature In Cs Cart Using Cs Cart Api Rate Topic   - - - - -

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

Posted 05 October 2017 - 08:16 AM #1

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