Quick view of featured product add to cart does not work because Product id is missing

Highlighted
New Member
1 0 0

I am working on a store store which have featured products collection.

store is https://vitavocalhealth.com/

On featured products collection there is QUICK VIEW light box. (You can see the QUICK VIEW button by hovering over the product image)

I have found that it comes from a separate liquid template.

QUICK VIEW light box there is an Add to cart button that does not work.

But there is also a main add to cart button that works. I added that to QUICK VIEW light box. But there it does not works because the product id is missing.

this is the code {{ product.variants.first.id }} that get id on main add to cart button and work but does not work on QUICK VIEW light box if added to Add to cart button.

The button also has code to get button text {{ 'products.product.add_to_cart' | t }} it works fine but the {{ product.variants.first.id }} does not work on QUICK VIEW light box.

I search and tired some solutions but could not got the product id.

Thanks!

0 Likes