Jump to content

Cart Says "Your Cart Is Empty" No matter How Many Products I Add


Recommended Posts

This is what the ajax cart looks like: Its actually showing both text for an empty cart and the cart with products.

 

Whats going on? I've cleared cache and cookies, I've even tried from my phone.  Same problem.  This didn't start happening until completing the first test orders using paypal and authorize.net.

 

Thanks,

David

post-1014199-0-39252800-1431999233_thumb.png

Link to comment
Share on other sites

This is really a problem since I'm suppose to launch this website in 4 days for the client.  

 

This problem happens across multiple browsers and computers, its not something that get solved by clearing the cache.  I've also tried disabling smarty cache.  What bothers me is it was working until I placed a test order and now the site breaks.  Inside shopping-cart.tpl, there is the following:

 

{if isset($empty)}
<p class="alert alert-warning">{l s='Your shopping cart is empty. Add something....'}</p>
{elseif $PS_CATALOG_MODE}
<p class="alert alert-warning">{l s='This store has not accepted your new order.'}</p>
{else}
<p id="emptyCartWarning" class="alert alert-warning unvisible">{l s='Your shopping cart is empty. Add a product...'}</p>
 
The text that says:Your shopping cart is empty. Add something.... will appear if the shopping cart is truly empty.
 
But when you add a product, it gives the error as this:
Your shopping cart is empty. Add a product...
 
And the ajax cart module displays double as well.  The only time when it will display as it should is if you add an item to the cart, without changing pages.  Then it shows up in ajx cart as 1 Product.
 
As soon as you go to a new page it will say:
1 Product Products (empty)
 
I need some tech support please.  I would pay for it  but there is no monthly plan and I'm not paying for a year of tech support for one question.  If I knew prestashop was going to get buggy on me I would have went a different route before building this website.  Know that I'm days from launching it gives me major problems like this. Any help is greatly appreciated.
Link to comment
Share on other sites

So there was an extra closing bracket on the css class before the class called .unvisible.

 

.unvisible makes the empty cart messages display:none when there is actual products in the cart.

 

Since there was an extra closing bracket on the class right before it, the class wasn't being read, and the empty cart messages where not being displayed to none.

 

Who would have thought it was such a simple mistake! I should have started their instead of thinking it was something wrong with the store itself.

 

Prestashop is good stuff!

Link to comment
Share on other sites

  • 5 months later...

I've traced it down to the css file I was editing (global.css). 

 

I'm not sure why the css file would cause this, but I guess its where I should have began my search since its one of the only core files I edit.

Thank you for the solution suggestion (my case was CSS too), and why am I writing this post:

 

I think this can also very easily happen if you use some custom CSS for "alert" or "alert-warning" classes and put it after the definition of "unvisible" class (in global.css) and you preset style for display (e.g. display: block; or display: inline-block; ).

 

Quick solution can be putting this code at the very end of the CSS file that is overriding the original styles (or if you just modified global.css file - then at the very end of global.css):

.unvisible { display: none; }
Edited by jave.web (see edit history)
Link to comment
Share on other sites

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