Purchase multiple items with single Dynamic checkout button

New Member
7 0 0

Is there any way to purchase multiple items simultaneously with a single dynamic checkout (buy it now) button?


I currently have the following:

{% assign variant = product.selected_or_first_available_variant %}
{% form 'product', product %}
    <input id="hidden-variant-id" name="id" type="hidden" value="{{ variant.id }}" />
    {{ form | payment_button }}
{% endform %}

and I'm using Javascript to change the value of the id input as the user switches variants.


However, my client wants to be able to purchase multiple products as a bundle on a single page. I have all of the variant ids for the various items to purchase, but it's not obvious whether there's any way to accomplish this within the product form.


Is it somehow possible to use a form with a 


instead of 


 to add multiple variants at once?


Alternatively, maybe it's possible to create a checkout object with Javascript and send that to the Dynamic Checkout button somehow?


Here is how you can add multiple products to cart that belong to a collection https://gist.github.com/carolineschnapp/9122054


And the same thing using Ajax http://www.codeshopify.com/blog_posts/how-to-add-multiple-products-with-an-ajax-cart


By combining both ideas I have created something like https://nichegeek.myshopify.com/collections/bundles/products/football-bundle 

Available for hiring. Inbox me lixonic[at]gmail[dot]com
New Member
7 0 0

Thanks @Lixon_Louis 


Have you had any luck combining this approach with dynamic checkout buttons?



I haven't yet, although I'm not 100% sure that I'm combining the correct form action with the correct inputs.


Not sure about the checkout method, but you can skip the cart if you want to.  I have updated the example here 




Available for hiring. Inbox me lixonic[at]gmail[dot]com