获取Shopify中产品的收藏名称 [英] Getting Collection Names Of Products in Shopify
本文介绍了获取Shopify中产品的收藏名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Shopify中,如何获取特定产品所属的自定义集合的名称?
例如,LIKE获取SKU我可以使用{{ line_item.sku }}
或获取价格我可以使用{{ line_item.line_price
}}
推荐答案
从API docs列出特定product_id:
的所有自定义集合GET /admin/custom_collections.json?product_id=632910392
响应:
HTTP/1.1 200 OK
{
"custom_collections": [
{
"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"
}
}
]
}
这篇关于获取Shopify中产品的收藏名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文