Liquid, JavaScript, themes, sales channels
Hi everyone! I´m having this problem, in collections pages, the images from the products grid are pointing to non canonical URLs. With this image is clear:
I´ve changed the <a href from the product title to {{ product.url}} and work fine, and I made the same change in the <a href in the image but it didn´t work. The template is this one: product-get-images.liquid.
Anyone know how to solve this? I´m having problems with SEO because of the poor crawling from Googlebot.
Thanks!
Hi @jaimesd,
Please send the site's link and code of product-get-images.liquid file. I will check it.
Hi, thanks for the answer. I send you the code of product-get-images.liquid
{%- if settings.product_format_pjpg -%}
{%- assign image_format = 'pjpg' -%}
{%- else -%}
{%- assign image_format = null -%}
{%- endif -%}
{%- if settings.product_collection_image_size != 'auto' -%}
{%- assign stretch_size = settings.product_collection_image_size -%}
{%- assign height_procent = settings.product_collection_image_height_percent -%}
{%- endif -%}
<a href="{{ url }}" class="d-block cursor-default" data-js-product-image>
{%- capture image_id -%} data-image-id="{{ image.id }}"{%- endcapture -%}
{% render 'rimage' with image: image size: image_size format: image_format height_procent: height_procent stretch_size: stretch_size alt: title attr: image_id %}
</a>
The web is https:// thelofbox.com/
Hi @jaimesd ,
Please change:
<a href="{{ url }}" class="d-block cursor-default" data-js-product-image>
=>
<a href="{{ product.url }}" class="d-block cursor-default" data-js-product-image>
It will work fine.
If my answer can help you solve your issue, please mark it as a solution. Thank you and good luck.
Hi @LitCommerce I´ve already tried that but unfortunately, doesn´t work, I don´t know why... With that change, the image links to the collection URL, not the product. Also I´ve tried with {{canonical.url}} but nothing
Hi @jaimesd ,
You can send me staff account with email: namphan992@gmail.com
I will check it.
User | RANK |
---|---|
21 | |
21 | |
10 | |
7 | |
6 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023