Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
In our homepage (sparklets.shop), we use the following hard coded links as the target for the collection list item, because we want the user to be able to easily change the filter on the collection page if they later decide to inspect a different collection. The default behavior in Shopify only lets you specify a collection as a collection list item, which leads to a collection page, which is not filterable. To get to a different collection you have to go back to the homepage and select a different one. This is undesired. As a workaround we use hardcoded links that enable filtering on the target collection page.
Here is an example of my collection list on my homepage
https://myshopifyshop.de/collections/all-products?filter.p.tag=chairs
https://myshopifyshop.de/collections/all-products?filter.p.tag=tables
This works fine as longs as the shop is available in only one language. However, since we internationalized our shop (German default, English secondary), the hard coded links exemplified above redirect to the collection page in the URL, but, firstly, the shop language is changed to the language encoded in the link and, secondly, the collection page shows up empty, when a language was selected that is not the language enforced by the link. This is because, the filter names are hard coded and not localized to the currently selected language resulting in the filtering being invalid and showing no results.
Questions:
1. Is it possible to either implement the intended filter behavior using native shopify features or free apps so that we dont have to use hard coded URIs at all OR ...
2. stick with the hard coded work around solution, but additionally have shopify translate the filter values OR detect filter values of the no-selected language?
Thank you in advance!