Relative Content

Tag Archive for javascriptshopifyliquid

Disable Shopify Add to Cart button based on metafield value

I have a boolean variant metafield which when set to “True” on a variant, and this variant is selected, changes the price element to a placeholder text showing “POA”. I would also like the “Add to Cart” button to be disabled when this happens too, but that part I am struggling with. I have managed to achieve this when the page loads to the variant with the metafield set to true, but not when its selected after the page load and I guess that is where Javascript comes in. I am fairly comfortable with liquid/html coding but not Javascript. I have amended some to get the price to change. It’s a 2.0 theme from the Shopify store called “Stockmart”.

Access Quantity Value in Shopify Product Page

Im currently writing a block for my company’s product page using the Shopify theme Refresh. The block is for adding related items to the cart. To be exact we sell rock climbing holds and the block allows you to add bolts that are compatible for mounting the holds on the page. Currently I am able to add the bolts for one set of holds but I would like to be able to multiply that by the current quaintly selected on the quantity selector.