Page 1 of 1

[SOLVED] Display price incl. VAT and excl. VAT on Front End

Posted: Sat Oct 30, 2010 3:10 am
by dbe
Hi guys,
Can anyone point me in the right direction?
I'd like to see the price incl. VAT and excl. VAT on the product detail...

Greets

Re: Display price incl. VAT and excl. VAT on Front End

Posted: Sat Oct 30, 2010 4:37 am
by kedgetech
Mate,
I was actually planning to do something similar to this. One of requests i got from our client is to modify the actual/normal price to RRP price. Special price will be actual price
Total Sale price : special price + GST /VAT . I will let you know once i am done.

Re: Display price incl. VAT and excl. VAT on Front End

Posted: Tue Nov 02, 2010 1:39 am
by dbe
Okay guys,

I'm almost there.

I got both prices to show up in the Product Detail, using the following topic on this forum:
http://forum.opencart.com/viewtopic.php ... 25&start=0

There's one thing however that I don't really understand.
I get the following error, stating that a language variable can't be found:
Image

Checking the line number on the file stated shows the following:

Code: Select all

			  <tr>
				<td><b><?php echo $text_price_ex; ?></b></td>
				<td><?php if (!$special) { ?>
                  <span class="precio"><?php echo $price_exvat; ?> </span>
                  <?php } else { ?>
                  <span class="oldprice"><?php echo $price; ?></span> <span class="especial"><?php echo $special; ?></span>
                  <?php } ?></td>
			  </tr>
My best guess is that the code can't find the variable $text_price_ex;.

In my language file however, the variable is created:

Code: Select all

<?php
// Text
$_['text_enlarge']        = 'Click to enlarge';
$_['text_discount']       = 'Quantity Discount:';
$_['text_options']        = 'Available Options:';
$_['text_error']          = 'Product not found!';
$_['text_price']          = 'Price (Tax incl.):';
$_['text_price_ex']       = 'Price (Tax excl.):';
$_['text_availability']   = 'Availability:';
$_['text_model']          = 'Model:';
This is saved in the file catalog\language\english\product\product.php file.

Any suggestions? ???

Greets.

Re: Display price incl. VAT and excl. VAT on Front End

Posted: Tue Nov 02, 2010 4:23 pm
by dbe
Anyone? O0

Re: Display price incl. VAT and excl. VAT on Front End

Posted: Tue Nov 02, 2010 5:01 pm
by billyggla
Did you add it to the controller file?

Re: Display price incl. VAT and excl. VAT on Front End

Posted: Tue Nov 02, 2010 7:40 pm
by dbe
billyggla wrote:Did you add it to the controller file?
Thanks!
That did the trick!

Re: [SOLVED] Display price incl. VAT and excl. VAT on Front

Posted: Wed Nov 17, 2010 7:53 pm
by deeve
Have found this topic rather confusing!

Followed the previous thread which lost me when someone mentioned the code should be before the 'else' statement. Was not sure of whether should be different code as in 'discounts' statement the variable $discount should be present.

Am now trying to include this concept into Category pages but have hit a brick wall as these are in a list & am not confident as to how to declare the required variable in the Category controller.

Any helpful advise appreciated..

For my sins, am still working in 1.3.4