Good morning how are you?
I’m trying to put images in the selections of variations and I found a video that shows how to do it, but there’s a product that is appearing with a repetition of the image instead of changing the colors according to the registered image.
If you notice the prints of the sewing device and the cat comb, the variations are ok and without repetition.
As for the pants, it has 7 variations and only two appear that are repeated, but when clicked it displays the correct enlarged image. Ex: the first 4 variations have a pink color image, but when you click on the second option, it shows the image of blue pants on the product.
That is, it is not correctly picking up the background image and repeats in the select only with lilac and gray.
With lesser importance, I don’t know if it would be possible to leave the measures in the standard format of the store, so as not to be awkward.
The code I’m using is the replacement of:
{{ value -}} {{ 'products.product.variant_sold_out_or_unavailable' | t }}For this:
{% if product.variants[forloop.index0].image != blank %}
{% else %}
{{ value -}}
{{ ‘products.product.variant_sold_out_or_unavailable’ | t }}
{% endif %}


