Dear community,
I created a custom collection containing all products overwriting Shopify’s default ‘All’ collection, so I can sort products to my liking. Since I have done this, the collections links to products from /collections/all/products/product-name, and thereby created a duplicate of my product pages.
My question: how can I reroute this link so it points to the original product pages? (/product/product-name)
I am using Showcase theme and I suspect a small change in collection.liquid is needed, likely in this part of the code:
{%- liquid
if collection.url.size == 0
assign collection_url = routes.all_products_collection_url
else
assign collection_url = collection.url
endif
if collection_url contains “?”
assign collection_url = collection_url | split: “?” | first
endif
assign current_sort_by = collection.sort_by | default: collection.default_sort_by
-%}
Any guidance will be much appreciated! ![]()