Post by simon4020 » Thu Oct 12, 2017 11:06 pm

Hi

I need to show the prices excluding tax (VAT) on the category pages. Can anyone help me with this please?

Newbie

Posts

Joined
Fri Mar 14, 2014 9:47 pm

Post by yodapt » Thu Oct 12, 2017 11:13 pm

What is the full Opencart version?

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by simon4020 » Thu Oct 12, 2017 11:20 pm

It's 2.3.0.2 thank you

Newbie

Posts

Joined
Fri Mar 14, 2014 9:47 pm

Post by simon4020 » Thu Oct 12, 2017 11:21 pm

I know I can show the prices without tax but then there is no label stating that it's ex tax. I need the label to remain.

Thanks

Newbie

Posts

Joined
Fri Mar 14, 2014 9:47 pm

Post by yodapt » Thu Oct 12, 2017 11:35 pm

So you want to show the prices without tax only on category pages?

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by simon4020 » Thu Oct 12, 2017 11:43 pm

On All pages but keep the 'Ex Tax' label. I know that I can set it in settings/option and then set 'Display prices with tax' to 'no'. But then on the front end it removes the label 'Ex Tax' which I want to keep so that customers know that the price shown is without tax.

Thank you

Newbie

Posts

Joined
Fri Mar 14, 2014 9:47 pm

Post by yodapt » Fri Oct 13, 2017 6:05 am

The following are changes to category and product pages, to keep the tax label. If you need that label in modules like featured, you need to change the respective templates as well. Personally I would opt for a message on top of those pages telling the customer all prices exclude taxes, to avoid having it written everywhere.

catalog\view\theme\default\template\product\category.tpl

line 109

Code: Select all

<?php echo $text_tax; ?> <?php echo $product['price']; ?>
line 111

Code: Select all

<span class="price-new"><?php echo $text_tax; ?> <?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>
catalog\view\theme\default\template\product\product.tpl

line 141

Code: Select all

<h2><?php echo $text_tax; ?> <?php echo $price; ?></h2>
line 146

Code: Select all

<h2><?php echo $text_tax; ?> <?php echo $special; ?></h2>

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by simon4020 » Sat Oct 14, 2017 10:50 pm

Hi

Sorry, only just seen your reply. Thank you, that's brilliant. I'll give those changes a go.

Newbie

Posts

Joined
Fri Mar 14, 2014 9:47 pm
Who is online

Users browsing this forum: No registered users and 31 guests