Booster theme onclick add to cart button trigger

Kumar2573
Shopify Partner
168 8 21

<script>
$(".product_tile_color_holder ul li input").change(function(){
let vTitle = $(this).attr("data-title")
let vImgs = $(this).attr("data-img")
$(this).closest(".tab-content-product").find(".vtile").text(vTitle);
$(this).closest(".tab-content-product").find(".varimgs").attr('src', vImgs);
$(this).parents(".abs-selected-os").find('.vtile').text(vTitle);
console.log(vTitle);
$(this).closest(".tab-content-product").find(".shopify-product-form .button--addToCart").attr("onclick","BoosterTheme.cart.addToCartJSON(event, {items: [{id: "+$(this).attr("var-id")+", quantity: 1}]});")
})
</script>

Expert Shopify Plus & shopify Developer & Theme customizer
- If the problem is solved remember to click to Accept Solution
- Press Like ?? if the answer was helpful
- Still, Facing issue, Reach out to me Email :- jitendra3496@gmail.com | Skype :- jitendra2573_1
- Direct Hire me :- Direct Contact me
Replies 0 (0)