【问题标题】:Getting Collection Names Of Products in Shopify在 Shopify 中获取产品的集合名称
【发布时间】:2013-01-09 08:06:13
【问题描述】:

在 Shopify 中,我如何获取特定产品所属的自定义集合的名称?

例如获取 SKU 我可以使用 {{ line_item.sku }} 或获取 价格 我可以使用{{ line_item.line_price}}

【问题讨论】:

    标签: shopify


    【解决方案1】:

    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"
          }
        }
      ]
    }
    

    【讨论】:

    • API 文档链接不再指向适当的位置;新网址是here
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-24
    • 2019-03-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多