• SumoMe

Do you want to hide the subtle Ex Tax value under your product prices in OpenCart but still want it calculated with the price? You might already know that you can hide the tax in the administration panel:

  1. Go to your store administration
  2. Go to System > Settings
  3. Click the Edit link that corresponds to your store
  4. Go to Option tab
  5. Click No in Display Prices With Tax field

Using this method, the tax value will indeed be hidden as well as in your product’s price calculation. The tax will only be calculated in the total of your shopping cart (VAT). But what if you still want the tax to be included in the price calculation of your product list and only hide the Ex Tax value under it?

It is very easy and as proof I will show you how to do this in two ways: (Under the assumption that you are using OpenCart’s default theme or a close modification of it)

1. Directly modifying your theme (not recommended)

Yes, I don’t recommend this but discussing how to do this will help you understand more how to do it in the second method.

You need only to open from your root directory the file catalog/view/theme/default/template/common/header.tpl and insert the following code before <?php echo $google_analytics; ?> in the <head> tag:

<style> .price-tax { display: none; } </style>

As you can see, it is only a matter of hiding the .price-tax class through CSS. No magic there.

2. Modifying your theme using vQmod (recommended)

In this method, you will do the same thing as the first one but with vQmod. If you are not familiar with vQmod I highly suggest that you start doing so especially if you are heavily modifying your OpenCart installation. Go to their website and be enlightened.

Here’s the code for the XML file of vQmod doing the same thing. You need only to change the theme directory (here it is default) depending on what you are using:

<modification>
	<id>Hide Tax</id>
	<version>1.5.x</version>
	<vqmver>1.0.8</vqmver>
	<author>maca</author>
	<!-- Start: Test: Hide Tax -->
	<file name="catalog/view/theme/default/template/common/header.tpl">
		<operation>
			<search position="before"><![CDATA[
				<?php echo $google_analytics; ?>
			]]></search>
			<add><![CDATA[
				<style> .price-tax { display: none; } </style>
			]]></add>
		</operation>
	</file>
</modification>

With this, you are done. Test the sh*t out of that product list and see the tax hide from fear. 😀

Let me know if you have any suggestions or violent reactions. D: