Page 1 of 1

which file to edit to change "your cart is empty" page?

Posted: Wed Aug 17, 2011 6:28 am
by imadam
on the checkout/cart page i've managed to find the file for when the cart has items in it, however when the cart is empty it is using a different file which i have no clue what it is. sure it's going to be obvious but i'm checking and getting no where so would appreciate some help finding it.

just to point out it's not the file catalog/view/theme/customtheme/template/checkout/cart.tpl

though that was the file i had to edit for when items were in the cart.

Re: which file to edit to change "your cart is empty" page?

Posted: Sun Aug 21, 2011 5:20 am
by imadam
any one able to help a poor chap out with this?

which file to edit to change "your cart is empty" page?

Posted: Sun Aug 21, 2011 5:56 am
by uksitebuilder
You are close, but it is the associated language file you need

Catalog/language/english/checkout/cart.php

Re: which file to edit to change "your cart is empty" page?

Posted: Sun Aug 21, 2011 4:53 pm
by imadam
hmm either i'm not understanding you or you aren't understanding me so will try reword and see.

the default cart file i mentioned in first post goes something like this...

<div container>
<div content>
<table>this is what's in your cart</table>
</div>
</div>

i've removed both the container and content divs so the styling works fine so now all the default one has is the table with items in the cart.

the trouble is when empty it's going back to <div container><div content><p>empty cart</p></div></div> and i can't find the file it's using to do this. no mention of this in the langauge file all i can find related is

$_['text_empty'] = 'Your shopping cart is empty!';

Re: which file to edit to change "your cart is empty" page?

Posted: Wed Aug 31, 2011 8:31 pm
by knotty85
I see what you mean, so I had a quick look.

in catalog/view/theme/customtheme/template/common/cart.tpl I found this:

<?php } else { ?>
<div class="empty"><?php echo $text_empty; ?></div>
<?php } ?>

So that's the call for the empty cart text mentioned in the language file, however I cannot see where it is getting the breadcrumbs and <content>/<container> etc from, I would expect like you, that the :catalog/view/theme/customtheme/template/checkout/cart.tpl would be calling this. I also made some changes to test, and it is definitely not that file, or even the language file.

Did you find it in the end?

Re: which file to edit to change "your cart is empty" page?

Posted: Wed Aug 31, 2011 9:57 pm
by imadam
nope still have no clue. given up for the minute in the hope someone offical will know

Re: which file to edit to change "your cart is empty" page?

Posted: Wed Aug 31, 2011 10:40 pm
by giantseed
I was just about to ask the same question but I think I figured it out. Open the not_found.tpl file under view/theme/yourtheme/template/error/not_found.tpl. I needed the div id="content" to be id="store_content" and changing it there fixed it. Hope that helps.

Re: which file to edit to change "your cart is empty" page?

Posted: Mon Dec 15, 2014 11:20 pm
by eddiec
Thanks, this was real help even in Opencart 2.0.