How to get all unique vendors in a Shopify store
The Shopify REST API doesn’t have an endpoint that will specifically list only the unique vendors on products in a shop. But Shopify liquid supports that.
1 2 3 | {% for product_vendor in shop.vendors %} {{ product_vendor | link_to_vendor }} {% endfor %} |
If you want to get this list with JSON format. You can follow the below steps:
- Create a new page template. Eg: page.vendors
- Add the below code for this template1{% layout none %}{{shop.vendors|json}}
- Assign this template for a page and you have a page include all unique vendors with JSON format.