Jump to content

Add to cart button not working - cart stay empty


neylz

Recommended Posts

Hello,

 

It is with desperation that I have no other choice but to ask for your help on a major issues since my upgrade from 1.5.3 to 1.5.4 ..

 

The major issue is : the add to cart button is not working ... I mean, with the ajaxcart i can see the product going up when I click on the add to cart button but then nothing happens ... impossible to add anything to the cart despite uninstalling, reinstalling and spending HOURS on forums looking for a solution ...

 

 

I asked my host provider and they gave me this answer :

 

 

"I did trace the script and look at the parameters being sent. For example, when adding an item to the cart, the following Ajax request was sent:

 

POST http://w2beauty.com/?rand=1366822772541

controller:cart

add:1

ajax:true

qty:1

id_product:7161

token:19a2ff1f3d6ede5ae04e283bb3fbd4cb

 

And this is the data that was returned by PrestaShop to the browser:

{

"products": [

],

"discounts": [

],

"shippingCost": "$0.00",

"shippingCostFloat": "0",

"wrappingCost": "$0.00",

"nbTotalProducts": "0",

"total": "$0.00",

"productTotal": "$0.00",

"hasError" : false

}

 

I did this with several items, and while the request has a varying "id_product" for different items, the server response (from the PrestaShop script) is always exactly the same. This basically shows that the item is not being added to the cart, and the response confirms it (0 nbTotalProducts, $0.00 total)."

 

 

 

I don't really understand it myself but the option he is offering me is a rollback as he cannot help me more on that issue ...

 

 

 

This is my website : www.w2beauty.com

 

 

If anyone can help, I would be so thankful !

Link to comment
Share on other sites

  • 3 weeks later...

I discoverd the same issue on my site today.

 

Currently running 1.5.3 and even though I've come across other posts about this problem, nothing they suggested seems to work.

 

I've uninstalled and re-installed, Disabled ajax function, tried version from 1.4.7 and 1.5.4...

I even edited my cookie.php file and I'm still having this issue.

 

Hopefully somebody has a solution because I can't go forward until it's fixed.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I've read solution for this problem somewhere on this forum but i can't find it. Yap, i got the same problem with neylz and even worse my site can't change the currency.

 

So the soultion is change your "shop domain" and "SSL Domain". Change it without "www." before your domain. Change it from "www.yoursite.com" into "yoursite.com

 

It works like a charm, but we still want our domain with "www" right ? How's solution for "www" thing ?

 

Thanks

  • Like 2
Link to comment
Share on other sites

HI sketchharris, another option you have is to upgrade to 1.4.11, from there you can try the upgrade to 1.5.4.1. It's hard to say what exactly the problem stems from because during an upgrade from 1.4 to 1.5 there are a lot of files and tables that are changed.

 

Yeah that's not going to work. I'm not really sure how to downgrade and we're a little nervous that doing this might damage the entire store. I'd rather someone with more knowledge of prestashop to do that for us.

 

I'd rather recreate the entire site with a fresh install of 1.5.4 and call it a day. My only regret is that categories and products will be lose some data. This has happened before as well. We downloaded a CSV of all products and categories but after uploading to a new install, we had to spend two days filling in the blanks that didn't go through.

 

In short I'm growing frustrated with Prestashop.

 

Hi, I've read solution for this problem somewhere on this forum but i can't find it. Yap, i got the same problem with neylz and even worse my site can't change the currency. So the soultion is change your "shop domain" and "SSL Domain". Change it without "www." before your domain. Change it from "www.yoursite.com" into "yoursite.com It works like a charm, but we still want our domain with "www" right ? How's solution for "www" thing ? Thanks

 

Tried that. Didn't work.

Link to comment
Share on other sites

  • 1 month later...

I tried the solution proposed by Alabid taking out the www and it's awesome but it's working. To use this you have to force de recompilation of the cache.

 

I will try to find another solution anyway.

 

Thanks.

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...
  • 2 weeks later...

I did a fresh install of version 1.6.0.5.  I'll add a product to the cart and when clicking 'Proceed to Checkout' it shows the cart is empty!

 

I really need to get this working NOW!  My client is ready to launch her on-line business, next week! 

 

The store is at: www.mylocketoflife.com/shop

 

 

SOLVED!  Go to 'Modules' and click on the 'Cart Block' module.  Select 'NO' for ajax cart.

Edited by 3pinespro (see edit history)
Link to comment
Share on other sites

I did a fresh install of version 1.6.0.5.  I'll add a product to the cart and when clicking 'Proceed to Checkout' it shows the cart is empty!

 

I really need to get this working NOW!  My client is ready to launch her on-line business, next week! 

 

The store is at: www.mylocketoflife.com/shop

 

please don't double post, use your new topic here: www.prestashop.com/forums/topic/320619-cart-always-empty

 

thanks

Link to comment
Share on other sites

  • 3 years later...

Just in case is usefull to anyone: I had same problem in my old shop prestashop 1.4.8. Trying to add items to the shopping cart but nothing happened, untill i cleared the cookies in the web browser the cart worked again, but after  a time the problem cameback. Sometimes after that it adds one item, but  i couldn´t add more.

After trying clearing cache in  browser, flushing cache in server, changing parameters in performance backoffice, forcing compile, disabling cache.. nothing worked...

I read something about prestashop version compatibility vs php version, then i checked the PHP version my shop was using in the CPanel- PHP config of my hosting provider. I got in there and i saw there was selected PHP 5.6 that is a newer version.  I selected PHP 5.4 and all problems with the cart were solved. 

 

Note: If you change from PHP version it generetes a new  php.in  i file in the root folder of the hosting. If you have customized your php.ini first save it and then change the version.

Edited by saag1 (see edit history)
Link to comment
Share on other sites

  • 7 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...