Booster theme onclick add to cart button trigger

Booster theme onclick add to cart button trigger

Kumar2573
Shopify Partner
171 8 22

<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>

Shopify Certified Developer Profile - https://www.credly.com/badges/1733d05c-2a88-490a-aef5-b01baf3b94ce/public_url
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)