Add variants pictures to variant selectors

Add variants pictures to variant selectors

divadminlocal
Tourist
12 0 1

Hi,

 

I'm using Sense 10.0

 

Schermata 2023-06-20 alle 19.34.31.png

 

 

 

I'm trying to do something very simple: I have a product with 3 variables: wallet / wallet+x / wallet +y

In the variant selector i want to put also the picture and the price instead of just the name of the variant.

 

Like this ( i've made it with html ) but is not connected to the picture of the variants:

 

Schermata 2023-06-20 alle 19.37.22.png

 

 

I'm trying to access to the variants object but i can access just to the selected variant, but not to all of them.

 

Here is where is written the code that shows the name of the 3 variables:

 

<label for="{{ section.id }}-{{ option.position }}-{{ forloop.index0 }}">
<span>{{ value -}}</span><span class="visually-hidden">{{ 'products.product.variant_sold_out_or_unavailable' | t }}</span>
</label>

 

I've tried to put here also the image but seems impossible.

Can you help me?

Replies 2 (2)

zaczee
Globetrotter
855 46 42

Hi,

 

Can you share your store url

 

divadminlocal
Tourist
12 0 1

Now is protected by a password, is not published. But is the standard Sense theme anyway, version 10.0. In the pictures i've shown the button for the selection of the variant that are red but i've just added some css, nothing special.