|
809a9047c13a010e595e393b601b8df9
|
Creating an "add all to cart" feature?by k2d - Member - 09:44PM, Sep 11, 2008 |
|
OK…I’m almost there. I need to add a function where I can enter various quantities for each item and then hit one button at the bottom of the page that totals up the entire page. Currently, I have to hit the add to order for each item…it goes to cart and them I have to hit back to order button. Any Ideas? Take a look at my product page at: http://danpostsocks.myshopify.com/collections/collections pw: socks Thanks for your help! |
|
|
Not on seperate products. Not that I know of without some custom javascript programming. ---
evolution design
|
|
|
Hum…The functionality is almost there. It is really like I need to have every item in the shopping cart and then let them inter the quantity they want of each item and then they can click proceed to check out. Anyone else have any ideas?
|
|
|
@k2d. Use javascript. When outputting your add-to-cart buttons, attach a listener for the ‘click’ event. When clicked, read the quantity in the text field. You can then call the Shopify API function for add-to-cart, sending it the quantity and Product ID. Very clean, and works like a charm… For examples you can view A+ environmental supplies. http://www.aplusenv.com/products/poly-sheeting-clear-n465-73 Notice how a click sends the product to the cart. If you had a quantity in a text field, the same call would work. Now, if by the same token you wanted an ADD ALL button, your listener to that ‘click’ would go through the entire form and for each Product, repeat the process as per the single product. The API call for add-to-cart can accept an array of products I believe, so hopefully that means a corresponding quantity per Product ID. Would have to double check on that. Not a big deal to play with variations on this theme. ---
Implement the Logic. — Last edited 12:08PM, Sep 12, 2008 |
|
|
Thanks Bill. I sent you an email.
|
|
|
There you go… javascript kung foo! ---
evolution design
|
|
|
I have a very similar need. Implementing one “text” input for a single variant worked fine, but once I introduced multiple variants, the logic wasn’t there. I think the solution discussed here would work quite well. Here’s the store – http://printerfreaks.myshopify.com. Any ideas or help is much appreciated.
|
Jamie
Member
12:17AM, Sep 12, 2008