Shopify Dawn Theme CSS to Randomize Product Order

Have searched through tons and tons of posts, not looking to randomize the featured products, looking to randomize all products within their categories, not by date or alphabetical but so when you load each category it randomizes the entire list every time it reloads, thinking it is some CSS coding but am unable to find something to do this.

Considering I may have to buy a new theme, which is not what I want to do for various reasons, anyone have a solution for coding that can help with the CSS code?

Thanks in advance.

Hi,

Add JavaScript for Randomization (at bottom collection-template.liquid)

Code example


Thank you - willing to try however, do not see “(at bottom collection-template.liquid)” - do not see anything close to this, please advise.

Thanks for helping though, appreciated!

found where to put it I think but returns an error “invalid JSON in templates/collection.json”

so not sure this works :disappointed_face:

Your trying to put code in a JSON file while the contributor specifically highlight a .liquid template file type.

The JSON file should list section names and that is likely where to look.

Thank you very much some trial and error but did succeed - my only question is when the pages load it kind of stutters to change the collection order, any way around that or nope?