Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi ,
Somebody tried to add code to update cart button based on variant inventory, but it was not done fully. Here is the code -- it fails because inv_qty array is not defined.
var bcd1=inv_qty[ variant.id ];
if(bcd1<1){
var html23='<span id="AddToCartText-product-template-pre">Pre order</span>';
cache.$addToCartText.html(html23);
}
else{
cache.$addToCartText.html(theme.strings.addToCart);
}
I'd try to either comment this part of code by wrapping it with /* ... */, or add the code I "invented" in this forum post: https://community.shopify.com/c/Shopify-Design/Display-variant-inventory-quantity-on-product-page-Bo...
My code must be added somewhere in product template.
My e-mail address is in the signature -- send me an e-mail.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024