Collections 如何使用shopify api从集合中删除产品

Collections 如何使用shopify api从集合中删除产品,collections,e-commerce,shopify,product,Collections,E Commerce,Shopify,Product,", 我需要从集合中删除一个产品。可能吗 $delete_exist_collect = array(); for($i=0 ; $i < $custom_collectionss ; $i++) { $delete_exist_collect = $product_data_collection['custom_collections'][$i]['id']; $urli = $to_storeurl_shopify.'/admin/collects/.json?pro

",
我需要从集合中删除一个产品。可能吗

$delete_exist_collect =  array();
for($i=0 ; $i < $custom_collectionss ; $i++)
{
    $delete_exist_collect = $product_data_collection['custom_collections'][$i]['id'];
    $urli = $to_storeurl_shopify.'/admin/collects/.json?product_id='.$response->product->id.'&collection_id='.$delete_exist_collect;    
    echo $urli;
    $newurl = str_replace(" ","",$urli);
    $shopcurl = curl_init();
    curl_setopt($shopcurl, CURLOPT_URL, $newurl);
    curl_setopt($shopcurl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
    curl_setopt($shopcurl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($shopcurl, CURLOPT_USERPWD,$to_shopify_u_p);
    curl_setopt($shopcurl, CURLOPT_CUSTOMREQUEST, 'DELETE');
    curl_setopt($shopcurl, CURLOPT_SSL_VERIFYPEER, false);
    $responsee = curl_exec ($shopcurl);
    curl_close ($shopcurl);         
    $product_data_collection = json_decode($responsee,TRUE);
}
$delete\u exist\u collect=array();
对于($i=0;$i<$custom_Collections;$i++)
{
$delete_exist_collect=$product_data_collection['custom_collections'][$i]['id'];
$urli=$to\u storeurl\u shopify./admin/collects/.json?product\u id='.$response->product->id.&collection\u id='.$delete\u exist\u collect;
echo$urli;
$newurl=str_replace(“,”,$urli);
$shopcurl=curl_init();
curl_setopt($shopcurl,CURLOPT_URL,$newurl);
curl_setopt($shopcurl,CURLOPT_HTTPHEADER,array('Content-Type:application/json'));
curl_setopt($shopcurl,CURLOPT_RETURNTRANSFER,true);
curl_setopt($shopcurl,CURLOPT_USERPWD,$to_shopify_\p);
curl_setopt($shopcurl,CURLOPT_CUSTOMREQUEST,'DELETE');
curl_setopt($shopcurl,CURLOPT_SSL_VERIFYPEER,false);
$responsee=curl\u exec($shopcurl);
curl_close($shopcurl);
$product\u data\u collection=json\u decode($responsee,TRUE);
}

你的链接不起作用,但是你看过shopify的文档吗?当我更新一个产品时,时间会将该产品删除到所有集合(类别)。你能帮我用shopfiy吗?对不起,我对shopfiy一无所知。如果你在文章中尝试解决问题,你就有更好的机会得到答案。查看指导。我被添加了代码,感谢您的回复