KungFuKittyLa Posted October 30, 2010 Share Posted October 30, 2010 Hello,I am using PrestaShop 1.3.2.Is there a feature/hack of having a product list, with a single "Add to Cart" button at the end? This way the user can select quantities and add all products to cart at a go.Thanks,~KungFuKittyLa~ Link to comment Share on other sites More sharing options...
razaro Posted October 30, 2010 Share Posted October 30, 2010 Try solution from here Link to comment Share on other sites More sharing options...
KungFuKittyLa Posted October 30, 2010 Author Share Posted October 30, 2010 Hi, Razaro,That solution does not work for me. See meowsy.com where I am testing things out.I get an error "null quantity" when I add something to the cart and there is no single add to cart button, but one with each product.. Link to comment Share on other sites More sharing options...
razaro Posted October 30, 2010 Share Posted October 30, 2010 Have you change code like in posts #5 and #9 in the module blockcart, file ajax-cart.jsajaxCart.add(idProduct, null, false, this); Replace with ajaxCart.add(idProduct, null, false, this, $('#quantity_wanted_'+idProduct).val()); Link to comment Share on other sites More sharing options...
KungFuKittyLa Posted October 30, 2010 Author Share Posted October 30, 2010 Hi, I tried those changes, they don't work. To be clear, what I am trying to do is, replace this:Product A -- Quantity a [Add to cart]Product B -- Quantity b [Add to cart]Product C -- Quantity c [Add to cart]by Product A -- Quantity aProduct B -- Quantity bProduct C -- Quantity c[Add to cart]I will have to create an "Add to Cart" button outside the foreach loop, and on clicking it somehow add the quantities from the text boxes above into the cart...:-S Link to comment Share on other sites More sharing options...
razaro Posted October 31, 2010 Share Posted October 31, 2010 I tried with some jQuery to emulate clicks on Add to cart buttons but that didn't worked correctly.It adds one product quantity OK but for other sometimes double and sometimes random, do not know why.Here is what I tried maybe it helps.First I edit classes so that button after list have class .addall and code is $('a.ajax_add_to_cart_button').css("visibility","hidden"); $('a.addall').click(function(){$('a.ajax_add_to_cart_button').trigger("click")}); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now