Game5ive.com Posted October 3, 2014 Share Posted October 3, 2014 Empty Cart problem in Prestahsop 1.6.0.9 Fresh Install Hello We have maked our Shop new with Fresh Install of Prestashop 1.6.0.9 because we had problems with old Shop that was first 2012 1.4 then 2013 upgraded to Prestashop 1.5 and 2014 to 1.6.0.9 but there was many errors also 10000 Products. Now we have new with now 700 products. But many customers now have error when at product to cart then go to checkout cart is empty. I tryed also self same error when i clear cache and cookies i then must add products more than 10 times to the cart that it work. I tryed it with different Browser look at js if errors or so but nothing also no error with Error Debug on and in Prestashop error log is this error " *ERROR* 2014/10/03 - 00:39:39: Invalid product vars at line 104 in file classes/Link.php *ERROR* 2014/10/03 - 00:39:45: Invalid product vars at line 104 in file classes/Link.php" This comes of this module but has nothing to do with the cart error: "http://addons.prestashop.com/en/seo-prestashop-modules/16928-advanced-url.html" What can i do to find out why it not work? When i started with prestashop 1.4 i never had error like this it worked more then 1,5 Years good with that then upgrade to 1.5 error comes. but now it fresh install and all configurated with 1.6 Can anyone help ? Shop: http://game5ive.com Kind regards Link to comment Share on other sites More sharing options...
JPresta.com Posted October 3, 2014 Share Posted October 3, 2014 Just to be sure it's not due to PageCache, can you uninstall it and test again? Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 3, 2014 Author Share Posted October 3, 2014 Just to be sure it's not due to PageCache, can you uninstall it and test again? Hello yes i can try again without pagecache. Page cache maked some Theme errors i must repair at my account block. So now i uninstalled it but same !! You also test and have this problem at my shop ? Link to comment Share on other sites More sharing options...
JPresta.com Posted October 3, 2014 Share Posted October 3, 2014 So now i uninstalled it but same !! You also test and have this problem at my shop ? Yes, looks like nothing is saved in database. When I add the product it's shown in the cart, but if I change page or refresh it, cart is empty. Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 3, 2014 Author Share Posted October 3, 2014 (edited) O now it work i tested now with 2 Browser can Page Cache make this error ? Cleared now cache and cookies and i think now it work. What can there be the error ? Hmm. Edited October 3, 2014 by Game5ive.com (see edit history) Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 3, 2014 Author Share Posted October 3, 2014 No sry it not work Link to comment Share on other sites More sharing options...
JPresta.com Posted October 3, 2014 Share Posted October 3, 2014 O now it work i tested now with 2 Browser can Page Cache make this error ? Cleared now cache and cookies and i think now it work. What can there be the error ? Hmm. Still does not work for me Link to comment Share on other sites More sharing options...
JPresta.com Posted October 3, 2014 Share Posted October 3, 2014 Hmmm, looks like you are using cloudflare, can you test without it? Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 3, 2014 Author Share Posted October 3, 2014 Hmmm, looks like you are using cloudflare, can you test without it? Yes i now also disabled all in cloudflare (know you a better one or allways disable cloudflare ? i never had problems.) Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 3, 2014 Author Share Posted October 3, 2014 Now i also disabled APC cache. Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 3, 2014 Author Share Posted October 3, 2014 (edited) Now at Cookies is only one Prestashop Cookies with all on Page Cache , APC Cache and Cloudflare there are 2 Cokkies with name Prestashop: http://i.gyazo.com/1980e428b11bfd0cb04febfd2ca03edc.png And now only APC Cache on at server but not in prestashop also not work and witout it all caches i think it work. Edited October 3, 2014 by Game5ive.com (see edit history) Link to comment Share on other sites More sharing options...
JPresta.com Posted October 3, 2014 Share Posted October 3, 2014 Don't know where to search now... no log in MySQL? Apache? PHP? 1 Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 3, 2014 Author Share Posted October 3, 2014 (edited) Don't know where to search now... no log in MySQL? Apache? PHP? No there is nowhere an Error or so on in a Log . Hmm thats bad. Can nobody help ? Edited October 3, 2014 by Game5ive.com (see edit history) Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 3, 2014 Author Share Posted October 3, 2014 Oh and the empty cart is also when i deactivate the ajax cart !!! Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 4, 2014 Author Share Posted October 4, 2014 Nobody ? Link to comment Share on other sites More sharing options...
El Patron Posted October 4, 2014 Share Posted October 4, 2014 disable onepagecheckout module and re-test. http://screencast.com/t/1hy1eN9K8 Link to comment Share on other sites More sharing options...
El Patron Posted October 4, 2014 Share Posted October 4, 2014 what are the url's you have under sep&url's for shop domain and shop domain ssl? Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 4, 2014 Author Share Posted October 4, 2014 what are the url's you have under sep&url's for shop domain and shop domain ssl? I allready tested without onepagecheckout. The error you send is google font can not loaded over https: ! same url for shop http and https like at the server configuration. I also tested without https it also has same error cart empty. thank you. Link to comment Share on other sites More sharing options...
El Patron Posted October 4, 2014 Share Posted October 4, 2014 strange...one minute I can keep cart...another not as for error, well you should look at all errors, not disregard posting of error. so no exclamation points, hit the like button instead. I have seen some cart issues solved by emptying the following db tables http://screencast.com/t/a9ih32M21qWa did you test without the advanced url module? and when did this start, it's helpful if you can explain when this started. 1 Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 4, 2014 Author Share Posted October 4, 2014 strange...one minute I can keep cart...another not as for error, well you should look at all errors, not disregard posting of error. so no exclamation points, hit the like button instead. I have seen some cart issues solved by emptying the following db tables http://screencast.com/t/a9ih32M21qWa did you test without the advanced url module? and when did this start, it's helpful if you can explain when this started. Thanks i try this in DB. (Oh this tables was allready empty.) hmm Yes i tested without Advanced URL, bad is that it not worked. Same empty cart. Crazy thing I cannot say when it started i maked fresh install and configured all of shop added products and tested all for 3 weeks and then i gone LIVE and this error happens at customers and me when i clean cache and cookies. Regards Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 4, 2014 Author Share Posted October 4, 2014 (edited) In MYsql Log i found now this: 141004 18:03:01 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. Statement: UPDATE `ps_cart_product` SET `quantity` = `quantity` + 1, `date_add` = NOW() WHERE `id_product` = 3 AND `id_cart` = 749 LIMIT 1 This comes when then cart work and is not anymore empty when cart stay empty at mysql is no log. Regards Edited October 4, 2014 by Game5ive.com (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted October 4, 2014 Share Posted October 4, 2014 Thanks i try this in DB. (Oh this tables was allready empty.) hmm Yes i tested without Advanced URL, bad is that it not worked. Same empty cart. Crazy thing I cannot say when it started i maked fresh install and configured all of shop added products and tested all for 3 weeks and then i gone LIVE and this error happens at customers and me when i clean cache and cookies. Regards personally to sleep better at night, I'd post in job offers, and try to get cartexpert, also a moderator, we can hold hands with you all day but you I am sure want this fixed yesterday. edit: I asked cartexpert so review post. (fingers crossed) 1 Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 4, 2014 Author Share Posted October 4, 2014 personally to sleep better at night, I'd post in job offers, and try to get cartexpert, also a moderator, we can hold hands with you all day but you I am sure want this fixed yesterday. edit: I asked cartexpert so review post. (fingers crossed) Thank you that sounds good . 1 Link to comment Share on other sites More sharing options...
CartExpert.net Posted October 4, 2014 Share Posted October 4, 2014 Hi. have read the thread. This appears to us that you have either a corrupt install or import of data. Please detail exactly how you implemented the upgrade step by step. Regards. Robin. The CartExpert Team 1 Link to comment Share on other sites More sharing options...
Game5ive.com Posted October 4, 2014 Author Share Posted October 4, 2014 (edited) Hi. have read the thread. This appears to us that you have either a corrupt install or import of data. Please detail exactly how you implemented the upgrade step by step. Regards. Robin. The CartExpert Team I have maked fresh install and imported customers and orders from a shop that was upgraded to 1.6.0.9 . But i maked a test store and with this design it has same error when i change at test store to Prestashop Default Theme it work. I think the theme has somewhere an error or not ? Test shop: http://2015.game5ive.com/de/ Regards. Edited October 5, 2014 by Game5ive.com (see edit history) 1 Link to comment Share on other sites More sharing options...
zedic Posted January 21, 2015 Share Posted January 21, 2015 Hi, for me it looks like a cookie problem. I have a similar problem in my shop, and I found that this problem is very hard to replicate, because sometimes it works, and sometimes not. The deal is that, when you add a product to cart for the first time, a new cart is created and it's saved in database. But then presta tries to save cart_id to a cookie variable id_cart. It goes good for the first time, but when you refresh your page or go to another page (for example checkout) that cookie variable disappears. Unfortunately I have no solution for this as for now. Link to comment Share on other sites More sharing options...
vekia Posted January 21, 2015 Share Posted January 21, 2015 prestashop doesnt store information about cart in cookie. prestashop store it in session, so i suppose that: - you use some non default theme with hige customization Link to comment Share on other sites More sharing options...
zedic Posted January 21, 2015 Share Posted January 21, 2015 Yes, I'm using customized theme but: - the default code while creating new cart says: $this->context->cookie->id_cart = (int)$this->context->cart->id; - And as it says in documentation: PrestaShop uses encrypted cookies to store all the session information, for visitors/clients as well as for employees/administrators. - And also: Data stored in a visitor/client's cookie id_cart The ID of the current cart displayed in the cart block. Correct me, if I'm wrong. Regards. Link to comment Share on other sites More sharing options...
simon_68 Posted January 23, 2015 Share Posted January 23, 2015 I had exactly the same problem, solution that worked for me: my ps_orders table was partly corrupted, especially fields id_cart, payment, conversion_rate and module. When I corrected those, cart works perfectly. Link to comment Share on other sites More sharing options...
zedic Posted January 23, 2015 Share Posted January 23, 2015 Hello, what do you mean by "corrupted"? It has bad data in it, or it was problem with types of those fields? Regards Link to comment Share on other sites More sharing options...
simon_68 Posted January 24, 2015 Share Posted January 24, 2015 The reason was bad data in those fields, type was ok. Link to comment Share on other sites More sharing options...
newbie87 Posted January 25, 2015 Share Posted January 25, 2015 Hello, I am having the same problem. I added a product to cart, popup on page said product added, click Proceed to Checkout - cart is empty. Oddly enough we are moving from 3D cart because of this! Can you share with us exactly what info was bad and how you corrected the info in those fields? I did get an error message after attempting to add a product about 8 times. Message said "can't add product to cart; text: "error"; error thrown:"; response text: blank field. Anyone with idea as to why this is happening and how to correct? Thanks in advance for your reply. Link to comment Share on other sites More sharing options...
simon_68 Posted January 26, 2015 Share Posted January 26, 2015 I'm not a specialist and I think it's hard to tell in general which values are right and which are wrong, you'll have to find this yourself. If you google, you'll find the ways how to correct those values. There is also another way that I used to locate the problem: - Install fresh prestashop in a test site, e.g test.yourdomain.com - If cart works correctly on fresh installation, copy production database to test site. If it stops working then, you'll know the problem in somewhere in DB. - Overwrite test DB with fresh data again and copy table group by table group from production DB and you'll locate the problematic table and data. Be careful, the above procedure is not explained in detail, and there is no guarantee that it will produce result. Anyway, maybe will give somebody an idea how to locate a problem on site, not only with empty cart. It worked for me... 1 Link to comment Share on other sites More sharing options...
newbie87 Posted January 26, 2015 Share Posted January 26, 2015 Thank you very much for your reply. We are migrating a database and it may be damaged. Not sure how to work that out because we do not have access to the backend of that site or the database in order to correct any potential problem before the export. Clearing the ache does not solve the problem.We will try this to see if we can isolate the problem field. Link to comment Share on other sites More sharing options...
newbie87 Posted January 26, 2015 Share Posted January 26, 2015 A bit more help if you please... Can you tell me specifically what constituted "bad data" in your database? Not the exact data (i.e. customer info) but what caused it to be bad - a quotation mark or symbol in a place it should not be? extra spaces? And what specifically did you do to correct the issue? Thanks in advance for your reply. Link to comment Share on other sites More sharing options...
simon_68 Posted January 26, 2015 Share Posted January 26, 2015 No problem, I can tell what specifically I had to do. I migrated the site including DB as well, together with old orders, and had to fix the following fields in ps_orders table: id_cart: there were values from 1 to 2000; set to 1 for all old orders payment: there was value "varies"; set to "PayPal" for all old orders, this is a currently valid payment method in my store conversion_rate: was 1000; set to 1 module: there was value "varies"; set to "paypal" for all old orders, this is a currently valid payment module in my store Hope it helps! Link to comment Share on other sites More sharing options...
newbie87 Posted January 27, 2015 Share Posted January 27, 2015 Thank you! Link to comment Share on other sites More sharing options...
zedic Posted January 27, 2015 Share Posted January 27, 2015 @simon_68 Thanks for your response. Unfortunatelly, all data in my ps_orders table seems to be correct. So I'll be searching further. Regards. Link to comment Share on other sites More sharing options...
Flying Eagle Posted September 10, 2015 Share Posted September 10, 2015 still no solutions ? Link to comment Share on other sites More sharing options...
Libor Zeman Posted September 15, 2015 Share Posted September 15, 2015 (edited) PS 1.6.1.1. - Hello, I am solve the same problem, looks cookies problem. Cart is empty, I lost 5 days, no result, lost customers.... any idea? Somebody? www.zemanboots.com Very simply, I have disabled max modules, cart after refresh page or finish order or input another product is empty, I can see abandoned cart in BO, that is all.... Any idea? Edited September 15, 2015 by Libor Zeman (see edit history) Link to comment Share on other sites More sharing options...
simon_68 Posted September 16, 2015 Share Posted September 16, 2015 Hi Libor, I've checked your site and the cart behaves exactly like mine did. My problem was problematic data in the ps_orders table as described above; after repairing it works bp. Link to comment Share on other sites More sharing options...
Libor Zeman Posted September 17, 2015 Share Posted September 17, 2015 (edited) Hi, I tried check ps_orders, but problem is the same..... !!! I don't know, it is critical situation for me... Edited September 17, 2015 by Libor Zeman (see edit history) Link to comment Share on other sites More sharing options...
simon_68 Posted September 18, 2015 Share Posted September 18, 2015 (edited) Then the 100 % solution is the following: - do a fresh installation of prestashop to a test site, e.g. subdomain of you site or some other server - implement / copy functions, products and DB from your site to the test site step by step - observe the point when cart stops working and you'll locate the problem I seems complicated but was the only way for me and it didn't took me more then some hours. Edited September 18, 2015 by simon_68 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts