craftcms / shopify

Synchronize and extend product data from your Shopify storefront.
MIT License
45 stars 25 forks source link

Grab order of products from a collection #20

Closed jsmrtn closed 4 years ago

jsmrtn commented 4 years ago

The collections/#{collection_id}/products.json returns the same data as /products/#{product_id}.json?collection_id=#{collection_id}, but the key difference is the former returns the products sorted by the collection's sort order, instead of a random sort order.

For our templates, the 'products' are course dates, which can be added at any time, so we need to grab the products with their sort order from Shopify.