2013-01-09 3 views
2

Shopify에서 특정 제품이 속한 사용자 정의 컬렉션의 이름을 가져 오는 방법은 무엇입니까? 내가 {{ line_item.sku }}를 사용하거나 가격 내가 특정 PRODUCT_ID에 대한 모든 사용자 지정 컬렉션을 나열하려면 API docs에서 {{ line_item.line_price}}Shopify에서 컬렉션 이름 가져 오기

답변

2

을 사용할 수 있습니다 얻을SKU를 얻을 예를 들어처럼

:

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

API 문서 링크가 더 이상 적절한 위치를 가리 키지 않습니다. 새 URL은 [여기]입니다 (https://help.shopify.com/api/reference/customcollection#index). – hamncheez

관련 문제