Latest Articles
So far this was never an issue, there were problems with uploading modules via the installer because of the ftp connection but you could allways install ocmods without any issue. However, some .. Read More
People had this issue so many times I thought I would write a bit about it. The  types of issues with opencart's 2.x modification system that I identified so far are: 1. Old Vqmod .. Read More
This small tutorial will show you how to manually add custom links to the default top menu in opencart. If you dont want to go trough all the hustle and would like to be able to completly customize.. Read More
To enable seo urls in opencart navigate in admin to system > settings , edit the store and on the server tab of the store settings you will find "Use SEO urls", set it to yes. So far e.. Read More
All Articles

Hide the header cart in opencart 1.5.2.1

In case you only display prices only if the customer is logged in , this modification is a must.

By default, even if the prices arent displayed for the unlogged customers, they become visible if the visitor adds them to cart.

Make this modification only if the above case applies to you, and the header cart will be hidden until the customer logs in.

Edit the file catalog/view/theme/yourtheme/template/common/header.tpl and find the line:

<?php echo $cart; ?>

and replace it with:

<?php if ($logged) { ?>
<?php echo $cart; ?>
<?php } ?>

Posted by Flo

5 Comments To "Hide the header cart in opencart 1.5.2.1"

Pgh On 05 May 2014
I just want to remove shopping cart word in header... not remove all of shopping cart header... anybody help me? Reply to this comment
Hassan On 08 Apr 2014
THanks alot, it works for me. :) Reply to this comment
Arab On 10 May 2013
If i want hidden total. What me do? thx Reply to this comment
Jahangir On 14 Jan 2013
where all tha amount stored plzz can u tel me Reply to this comment
Wojtek On 17 May 2012
Price is still visible in the cart, if one follow link on confirmation (popup window), after adding product to cart. On the bootom cart page. Reply to this comment

Write a comment

Your Name:


Enter the code in the box below:

Your Comment:
Note: HTML is not translated!