Product variation image field does not respect current language in its link URL

Created on 13 July 2023, 12 months ago

We have a product variation set up with an image field. The site is multilingual. The image field display in catalog is set in a way that the "Link image to" option is set to "Content". However, in the front-end, the link generated for that image always goes to the default language. We have URL aliases set to generate automatically for our products.

Here is the relevant TWIG template part that generates those links:

<div>
  {{ product.variation_field_images }}
  <div class="position-relative">
    <a href="#" class="add-to-favourites"></a>
    <h3><a href="{{ product_url }}">{{ product.title }}</a></h3>
  </div>
  ...
  <a class="btn btn-white w-100" href="{{ product_url }}">{{ 'Detail'|t }}</a>
  </div>
  {{ product.field_tag }}
</div>
πŸ› Bug report
Status

Closed: works as designed

Version

2.33

Component

Product

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024