Hello!, And thank you for the answer.
Can I ask you where it is supposed to go within the theme.liquid file.
I’m a little bit lost, and I don’t know exactly where to place this piece of code inside of the theme.liquid file.
Thank you
Hello!, And thank you for the answer.
Can I ask you where it is supposed to go within the theme.liquid file.
I’m a little bit lost, and I don’t know exactly where to place this piece of code inside of the theme.liquid file.
Thank you
Hi @Bigjjjim
I solved my problem with change {{ product.url }} to {{ product.url | split: “?” | first }}
I found it in my product-card.liquid file.
I change :
By :
My problem is solved
Hope this help you
Its great for you if you solved the problem . So this url are not anymore indexate by google?
All the solution i tried from here didnt worked.
I had a look on my theme (SPLIT) and didnt find any liquid template called product-card.liquid.
I have a product.liquid file but not the code you are talking about.
Any idea how to solved that in other theme than yours?
Thanks!
I just make it online, then my URL are always indexed.
But they are no longer available in my internal link and Google can’t found new one. What is most important to avoid generating new ones each time we add a new product
Then, you must:
How to found the right liquid file ?
What I did was first go to my online page to look at the name of the DIV present at this location in the code, in order to find them in my liquid files.
by searching for a file with the terms “recommendation”, “card”, “product”, “featured” and looking inside.
PS : sry for my mistake, i’m bad in english :S
HI wooki,
Thanks for your time and effort trying to explain me how you did.
You said:
Thnn i had a look on my liquid sections from my SPLIT theme, and had a look on this sections: “production-recommendations.liquid, product.liquid, productquickview.liquid, main-product.liquid , main-card.liquid” to find if i found a peace of code "collection_grid,
or product-url .
The things is that i dont totally understand the original reason of the problem, and its a little bit to difficult for me i guess… I understand a bit shopify code but not that much!.
If you feel to have a look for me? ![]()
@frankymartin @fanwer @Alexis_Thery @Wooki @DariusWS
Here is an example string that is at the end of my product URLs:
?pr_prod_strat=use_description&pr_rec_id=f50a47009&pr_rec_pid=4703513280571&pr_ref_pid=4703091556411&pr_seq=uniform
I just tried adding the code below to my theme.liquid file:
{% if handle contains ‘seq=uniform’ %}
{% endif %}
{%- if canonical_url=“*seq=uniform” -%}
{%- endif -%}
And adding the code below to my robots.txt file:
{%- if group.user_agent.value == ‘’ -%}
{{ 'Disallow: /products/?pr_prod_strat=*’ }}
{%- endif -%}
The code placement is shown in the attached screenshots below. Can you please confirm if this should or should not fix the issue?
Hello Wooki,
Long time since we talked.. sorry i didnt find immediately a solution… an di had many other subjects..
I am back!
First of all, how the solution you found is going on your search console? better?
second point, no problem for you english, i am french and my english is not so good but i can understand you!
Third point: i finally found a section called “card recommendations.liquid” on my store ursul.fr
I fond this line of code:
Do you think its here i need change?
I dont understand too much liquid code..
thanks for your help!
Alexis
and is this work for you. if not, did you solve it?
@Josep97 @klaasmondria Here is another article with more detail: https://community.shopify.com/post/2490293
Hi Alexis,
I had the same problem on my website, so I tried the solution offered by Wooki and it seems to work.
I work with the free theme Sense and I tried his solution on the file called card-product.liquid.
Search it on the search bar, click on it and after that, a little CTRL+F to find “card_product.url” in the file. It seems to appear 2 times, so in the two places I add | default: ‘#’ | split: “?” | first . (See screenshot)
After that, you save it and it should work.
Now, on my website, when you click from a product page on a recommended product, the url of the downloaded page it doesn’t appear the pr_strat fallback… etc. So I think this is working, I will check my Google Search Console in the next few weeks to be sure everything is okay. I hope this message could help you.
Have a nice day,
Lucas.
@LucasFrom Please correct me if I’m wrong, but by doing it this way, you solve the issue of generating the URLs, but the product recommendation module will no longer learn/optimize because the final URL will not provide Shopify with the string to learn from.
Hi Connore ! Nice to meet you !
Yes, I confirm. This is a temporary solution, but I prefer to lose this information and not having soon 10k false links crawl by Google that are giving me problems with SEO. It’s a choice, if you need to track in details all the movements of your customers in your website, or you want Shopify to optimize this section for each client, the best option should be to contract a dev freelance or an agency and see with them how they can remove this issue.
I hope I help you with my answer, have a nice day !
Lucas.
@LucasFrom @Bigjjjim Hi! If I understand the code correctly, it means that if your product has size & colour variations (which are gone in the link after “?variant=…”), this code will block their indexing as well, right? So the GSC will only index one canonical URL of the product (which appears in one size/colour).
hello unfortunately we also have a similar problem but no one has been able to help us yet
I’m experiencing a frustrating issue with the “Add to Cart” function across both of my Shopify stores, and I hope someone here can help.
The problem occurs only on mobile devices and only for some customers. On desktop, this issue has never happened. When someone clicks “Add to Cart,” they are redirected to the cart page as usual. However, if they try to add multiple items to the cart, the page crashes, and an error message appears, such as:
“Luxus Titan Armband für Apple Watch Series & Ultra – Elegant & Robust – Bezzos-Shop…” has repeatedly encountered an issue.
After reloading the page, the items are in the cart, but this crash creates a very poor user experience.
I’ve tried switching between multiple paid themes, but the issue persists, so I’m confident it’s not theme-related.
To summarize: