FonZ Posted February 9, 2014 Share Posted February 9, 2014 (edited) Hi all, I've made the following: On each product page I display a table with the attributes of the product in which you get to see the price and you get a 'requested amount' input box. Customers can order multiple items 'at once', so if they want 10 items of the first attribute and 20 of the third, they just fill out the form, hit 'add to cart' and both items get added to the cart. Works pretty fine, but I had to take out the animation (no big deal) and I've played around with timed loops etc, but that's not the issue. So now it seems solid, BUT (and here's where I hope someone has some kind of input) every first time I visit the page and trigger the function, only the last item gets added while I was asking to add 4 or 10, so all others get removed after being added. After that, the function just works fine and adds the entire list to the cart. My thoughts are that somewhere in the initial call there's one action (set cookie maybe?) which is causing this strange behavior (ie. causing lag or has to be executed before all other stuff can take place). I'm not sure where to look and which tools to use to debug it because I'm extremely new to PS and I'm actually a shop owner, not a coder (I used to be ). Any input is highly appreciated. Edited February 9, 2014 by FonZ (see edit history) Link to comment Share on other sites More sharing options...
FonZ Posted February 17, 2014 Author Share Posted February 17, 2014 And the answer was right here! Initiating the cart id and setting the cookie. http://www.prestashop.com/forums/topic/255116-solved-create-new-page-with-cart-not-initialising/ Link to comment Share on other sites More sharing options...
Recommended Posts