2012-12-14 28 views
0

如何爲shopify中的產品進行自定義重新排序。我的意思是exapmle我有'測試'集合,我想通過使用產品標籤重新排列'測試'集合中的產品,我的意思是我在'測試'集合中在某些產品中放置了一些標籤,如'firstshowup',所以當客戶點擊'測試'收集客戶看哪個先有「firstshowup」標籤的產品,然後看看其餘有啥IAM試圖這裏使用自定義不使用重新排序,如訂單的暢銷書或allpabetically或創建日期ST 重新排序謝謝你這麼多提前傢伙如何在Shopify中對產品進行自定義重新排序

回答

1

您的收藏將由Collect objects組成,其中包含位置屬性。假設你正在使用CustomCollection的,你可以通過更新CustomCollection的修改收集的位置:http://api.shopify.com/customcollection.html#update

從例子中,要更新的集合,你可以使用:

PUT /admin/custom_collections/#{id}.json 

用下面的有效載荷:

{ 
    "custom_collection": { 
    "body_html": "<p>The best selling ipod ever</p>", 
    "handle": "ipods", 
    "id": 841564295, 
    "published_at": "2008-02-01T19:00:00-05:00", 
    "sort_order": "manual", 
    "template_suffix": null, 
    "title": "IPods", 
    "updated_at": "2008-02-01T19:00:00-05:00", 
    "image": { 
     "created_at": "2012-12-11T12:01:29-05:00", 
     "src": "http://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?0" 
    }, 
    "collects": [ 
     { 
     "product_id": 921728736, 
     "position": 1 
     }, 
     { 
     "id": 841564295, 
     "position": 2 
     } 
    ] 
    } 
} 
相關問題