Shopify JavaScript Override Add to Cart Button to add a Custom Bundle

Shopify JavaScript Override Add to Cart Button to add a Custom Bundle.

add script to theme.liquid before the end body tag

The problem with ajax cart is that it’s a bit slowing if your adding one by one for quite a few products.
A quicker way could be to use shopify add to cart permalinks
/cart/35230234129:1,35225816913:1,35225876433:1,35231416593:1,
you can also apply discounts here using ?discount=<code>
Then the problem is that it ships the cart page completely, and it also removes any other products from cart (which the user may already have added).
Slightly hacky but a pretty good solution.
Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *