Jump to content

Empty Cart problem in Prestahsop 1.6.0.9 Fresh Install


Recommended Posts

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

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

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 by Game5ive.com (see edit history)
Link to comment
Share on other sites

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

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

 

10.04.2014-10.33.png
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.

  • Like 1
Link to comment
Share on other sites

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

 

10.04.2014-10.33.png

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

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 by Game5ive.com (see edit history)
Link to comment
Share on other sites

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)

  • Like 1
Link to comment
Share on other sites

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 .

  • Like 1
Link to comment
Share on other sites

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 by Game5ive.com (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...

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

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

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

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...

  • Like 1
Link to comment
Share on other sites

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

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

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

  • 7 months later...
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 by Libor Zeman (see edit history)
Link to comment
Share on other sites

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 by simon_68 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...