How to display best seller products on front-page using Shopify -


i have dev theme shopify store. it's child theme. how display best selling products on front page. tried no luck maybe because sample outdated.

<div class="row">   {% product in collections["all"].products | limit:12 | sort_by: 'best-seller' %}     {% include 'product-grid-item' "all" %}   {% endfor %} </div> 

is there way can create this? in advance.

an easy way of doing it, sort on shopify won't work value best-seller, create new collection called (for example) best sellers have products (you set sole condition product price greater $0 if applies on store).

then, set collection sorting by best selling on admin dashboard.

admin dashboard

finally, use liquid in similar way per following:

<div class="row">   {% product in collections.best-sellers.products | limit:12 %}     {% include 'product-grid-item' "all" %}   {% endfor %} </div> 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -