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

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