Bulk Add to Cart

garsingtonopera
New Member
2 0 0

Hi everyone, hope you can help...

I'm using a custom link within our template to allow the bulk addition of all items in a Collection to the cart. Trouble is that it then takes you to the Checkout page, rather than the Cart. Can anyone suggest how to alter the code to take the user to the Cart next and not the Checkout (we want to capture order notes before checkout)?

 

<a style="width:400px;padding:20px;text-align:center;display:block;margin:50px auto;background:red;color:white;" href="{{ shop.url }}/cart/{% for product in collection.products %}{{ product.selected_or_first_available_variant.id }}:1{% unless forloop.last %},{% endunless %}{% endfor %}">Add all items to cart</a>

 

Thanks!

0 Likes