Collection first items changing based on URL

hi there,

Ive seen some clothing stores having a custom collection URL where the product collection is sorted by one specific product on the first row. To clarify this from a customer’s view: Customer sees the ad of e.g. the hoodie, clicks on it and is redirected to the collection page (not product page). But on the collection page it is sorted by this particular hoodie as the first product in the collection among other products. I think this is a really good idea for customers to get an overview of all products but still be able to choose to buy the specific product they clicked on. In the URL of this clothing store it is not the default /?sort_by=manual but instead
/?sort_by=specificproduct&anotherproduct

Does someone know how can I do this?
Any help in this matter would be awesome

Hi,

The only way that comes to mind after doing some digging is by using tags in combination with the default sort options. If you have a URL example of a store that is doing it the way you described, send me DM with their URL and I can take a look at how they are doing it. But my guess is a combination of tag and sort by URL parameters. Shopify/Liquid does not support product resorting via the URL unless done by tags or sort_by.

Hi Daveed!
Sent you a DM.

In theory, to recreate this functionality the collection block code would be updated to include the product url in the html block for each product. Then use javascript to read the url and move that html block to the first position on the page.

I’ll spend sometime on it this weekend to see if I can recreate it and then share the code with you if it works!

Hi Daveed,

I am looking for the same solution. Did you figure it out?

I am looking for the same solution. Did you figure it out?