Post by SXGuy » Thu Feb 24, 2011 4:35 am

As discussed in this thread -> http://forum.opencart.com/viewtopic.php?f=20&t=27563

heres how you display prices excluding vat/tax and including vat/tax on all the category pages.

You can apply the same process, to all the product pages, related product pages, latest product pages etc etc.

The process is exactly the same. Any trouble just pm me and ill walk you through it.

Anyway for products in the category pages....

catalog/controller/product/category.php

find

Code: Select all

if ($discount) {
						$price = $this->currency->format($this->tax->calculate($discount, $result['tax_class_id'], $this->config->get('config_tax')));
					} else {
						$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
Add underneath

Code: Select all

$this->data['text_ex_price'] = $this->language->get('text_ex_price');
$this->data['text_inc_price'] = $this->language->get('text_inc_price');
find

Code: Select all

$this->data['products'][] = array( 
add before );

Code: Select all

'exprice' => $this->currency->format($result['price']),
catalog/engligh/language/product/category.php

find

Code: Select all

$_['text_model_desc']   = 'Model Z - A';
add underneath

Code: Select all

$_['text_ex_price']   = ' Ex Vat';
$_['text_inc_price']   = ' Inc Vat';
catalog/view/theme/YOURTHEME/template/product/category.tpl

find

Code: Select all

<?php if ($display_price) { ?>
add underneath

Code: Select all

<span style="color: #900; font-weight: bold;"><?php echo $products[$j]['exprice']; ?><?php echo $text_ex_price; ?></span><br />
find

Code: Select all

<span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?></span>
Replace With

Code: Select all

<span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?><?php echo $text_inc_price; ?></span>

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by catalinm75 » Tue Jun 28, 2011 3:30 am

it seems to be ok, but i am using Opencart Europa , 1.4.9.1. and i cannot find these parts of code, in that script ...:(

what can i do ?

Active Member

Posts

Joined
Fri Jun 17, 2011 2:14 am

Post by SXGuy » Tue Jun 28, 2011 3:52 am

Well first, you can say exactly which parts you can not find. as i dont believe the whole thing is not there.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by catalinm75 » Tue Jun 28, 2011 4:32 am

in the end, I found that parts of code, but were accompanied by others.
I repeat, I use OpenCart Europe, version 1.4.9.1 and use only Romanian, the other I removed.

you can help me?

Active Member

Posts

Joined
Fri Jun 17, 2011 2:14 am

Post by SXGuy » Tue Jun 28, 2011 6:17 am

I cant help you. if you cant even follow instructions.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am
Who is online

Users browsing this forum: No registered users and 4 guests