We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Disabling Auto Select Variant in Spotlight code

Disabling Auto Select Variant in Spotlight code

p_and_p
New Member
7 0 0

Hi! I've been trying for days to figure out how to disable variant autoselect in the code for the Spotlight theme. I don't like that when you click on a product with variants, it automatically goes to the photo of whichever variant is auto selected instead of the primary photo.

 

I've tried to follow other tutorials. I only found one for Spotlight, and it was unsuccessful. My code looked very slightly different, but I tried so many times to edit and delete lines of code based on this tutorial and those for other themes.

 

The only thing that changed for me was that at one point it disabled the variant picker to change pictures based on which variant was selected, which definitely wasn't ideal. Is there anyone who can help me with this?

 

Reply 1 (1)

DaisyVo
Shopify Partner
4469 501 599

Hi @p_and_p 

 

Since your product has variants, customers will need to select one of the variants to place an order.

Regarding the main image before a variant is selected, here are two options:

  1. Set the main image as the image for the first variant
    You can do this here: Screenshot.

  2. Remove the variant images and use only one product image
    You can do this here: Screenshot.

I hope this helps

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution