I am trying to edit Shopping Cart is Empty page. But I am unable to . I am editing checkout/cart/noItems.phtml in template directory. I tried to editby writing a "test" in html and also echoing via php, but nothing shows in front end
4 Answers
You're editing the right file. I have a few suggestions.
- Make sure you clear the caches every time you modify phtml files.
- Enable
Template Path Hints
inSystem > Configuration > Developer
. Change to a store view to see this field. Go back to empty cart page and you should see the right path. - If 2 is not an option (e.g. you're on a live site), check
System > Configuration > Design
. SeeCurrent Package Name
andTemplates
fields. You have to editapp/design/frontend/[Current Package Name]/[Templates]/checkout/cart/noItems.phtml
. IfTemplates
field was empty replace it bydefault
.
Hope it helps.
You can change the file in folder:
app/design/frontend/[Current Package Name]/[Templates]/checkout/cart/noItems.phtml
if you can't find the phtml file in your theme at the location checkout/cart/noItems.phtml
, you have to include it yourself.
How do i include noItems.phtml?
You can find a copy of the file at:
/app/design/frontend/base/default/template/checkout/cart/noItems.phtml
.
Just copy and paste it in app/design/frontend/[Current Package Name]/[Templates]/checkout/cart/noItems.phtml
and you're good to go.
What to do after I changed the file?
Be sure to empty the Magento cache in system >> Cache Management
and then the button Flush Magento Cache
If you use caching plugins like Redis
, Memcache
or Varnish
be sure to flush those cache systems too.
-
If this answered your question please don't forget to accept this answer. Commented Jan 15, 2019 at 10:53
- Check if cache is enabled (System -> Cache Management). I so refresh it or disable.
- Make sure that you are editing proper file (in your theme directory).
I have magento 1.9
I had a similar problem in Internet Explorer, it was not able to add products to shopping cart (error message cart is empty).
I fixed the problem by going to the control panel on my computer and go into security and set the Internet Security settings to medium - high (my computer security settings was set too high) and was not allowing the Magento shopping cart to work in Internet Explorer, also I do not think this was the problem.
But I also changed the cookie lifetime from 5400 to 86400 (cookie lifetime is change in Magento - Configuration- Web- Cookie Lifetime
It works fine now!