Hello to the entire Shopify Community,
I’m contacting you because I have a big problem on a shop. We’ve tried several translation applications (Transcy, AI translation…) and each time we encounter the same problem.
When I’m on a translated version, switching from a collection page to a product page takes me back to my original version. Site : https://www.home-beddings-and-curtains.com/
Attached is a video recording to illustrate the problem.
As you can see, I can navigate around the site, but when I get to a product page, all the content is in French and the “/en” translation suffix disappears.
The theme used is the Flex theme from Out of the Sandbox. No translation application is active on the site because it’s not functional.
Transcy’s technical department told me that the problem was with the theme, and that it wasn’t possible to insert a “dynamic link” directing visitors to product pages. Apparently it’s a JavaScript code that blocks this, but I can’t find it…
This seems very strange to me, as I’ve used the same theme on many shops and never had a similar problem.
Does anyone know where this might be coming from?
Thank you very much in advance,
Max COSTA
Seems like a redirect issue to me. Is your store setup for Markets? If yes, what is the structure?
Ignore the above comment. This is the JS code causing the issue on the collection page:
// Récupérer tous les liens de la page
var links = document.getElementsByTagName('a');
// Parcourir les liens et ajouter un gestionnaire d'événements click
for (var i = 0; i
1 Like
Thank you so much for your quick and detailed reply! Indeed, we’ve set up markets on this shop and it’s the only shop where we’re experiencing this problem, but I’m relying on your second answer.
Do you know where to find this code? It seems that it corresponds to the Data Layers of Google Analytics, I imagine that if I remove them, I would no longer have tracking.
What do you think?
Thanks again for your help,
Without looking at the file structure of your theme (which I believe is modified), it would be difficult to tell you in which file to look the code for. If you’re using VS Code, find the file by searching for a line of code and it should bring up the file in which this code is.
As for Google Analytics, surely there must be another way to get the data you want without tampering with the click event on the product item? I have set up Google Analytics for Shopify stores and I have never had to do this way. Take a look at this article: https://www.searchenginejournal.com/ga4-ecommerce-setup/445854/#productview