Community Forums

Latest Products

General support for technical problems with OpenCart v1.x

Latest Products

Postby eddy-r3 » Mon Mar 12, 2012 10:08 am

Hey guys, just wandering how to set the latest products to display the price Exc TAX? At the moment its displaying the full price including TAX and would like this to be Exc TAX.

Any ideas or suggestions would be great!

Many thanks! :D
eddy-r3
 
Posts: 43
Joined: Mon Jan 30, 2012 8:46 pm

Re: Latest Products

Postby eddy-r3 » Mon Mar 12, 2012 10:12 am

At the moment in template/module/latest.tpl i have the following

<div class="pricetag"><?php echo $product['price']; ?></span></div>

is it this that needs changing? i tried altering 'price' to 'tax' but that didnt work :(
eddy-r3
 
Posts: 43
Joined: Mon Jan 30, 2012 8:46 pm

Re: Latest Products

Postby Qphoria » Mon Mar 12, 2012 12:02 pm

If you want to show price ex tax... then are you from USA? You will most likely just want to set "Display Prices with Tax" to NO in the main system settings under the options tab.

But if instead you really just want this custom setup, then do this:

1. EDIT: catalog/controller/module/latest.php

2. FIND:
Code: Select all
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));


3. REPLACE WITH:
Code: Select all
$price = $this->currency->format($result['price']);
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18242
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Latest Products

Postby eddy-r3 » Mon Mar 12, 2012 12:08 pm

Super that worked a treat! :)

Thankyou VERY much

PS > Im in England so everything is setup as VAT but said TAX as i pressumed it was easier not to explain the VAT/TAX difference lol :) THanks again!
eddy-r3
 
Posts: 43
Joined: Mon Jan 30, 2012 8:46 pm

Re: Latest Products

Postby eddy-r3 » Tue Mar 13, 2012 8:11 am

Ok so that worked great, but, if you enter into the categories the products are laid out in the same manner and are showing as full price and NOT exc VAT. Is there anyway to change this to?

I have looked @ /templates/product/category.tpl and have the following:

Code: Select all
<div class="prod_info">
            <?php if ($product['price']) { ?>
            <?php if (!$product['special']) { ?>
            <div  class="pricetag"><?php echo $product['price']; ?></span></div>
            <?php } else { ?>
            <span style="color: #FF006C; font-weight: bold; text-decoration: line-through;"><?php echo $product['price']; ?></span>
            <div  class="pricetag2"><?php echo $product['special']; ?></div>
            <?php } ?>
            <?php } ?>


Now i pressume that
Code: Select all
<div  class="pricetag"><?php echo $product['price']; ?></span></div>
displays the price as a whole, how would i get it to display the price exc VAT?

MANY THANKS in advance! :)
eddy-r3
 
Posts: 43
Joined: Mon Jan 30, 2012 8:46 pm

Re: Latest Products

Postby eddy-r3 » Tue Mar 13, 2012 8:12 am

PS > In the admin panel, i know there is an option to turn this off, but on the PRODUCTS Page i want to display both inc/exc VAT :)
eddy-r3
 
Posts: 43
Joined: Mon Jan 30, 2012 8:46 pm

Re: Latest Products

Postby simonmcp » Mon Mar 19, 2012 12:25 am

eddy-r3 wrote:PS > In the admin panel, i know there is an option to turn this off, but on the PRODUCTS Page i want to display both inc/exc VAT :)


You do realise that in England you have to show the VAT inclusive price anywhere you show the price unless you only allow VAt registered business' to buy from you. Otherwise a private buyer can assume the price is VAT inclusive and you may be legally bound to sell at that price. Check out the really interesting ::) Customs and Excise site for the exact rules.
simonmcp
 
Posts: 4
Joined: Fri Jan 20, 2012 3:47 pm


Return to General Support

Who is online

Users browsing this forum: 2snAK, Bulkroka, hashmat, SimplyToyz and 46 guests

Hosted by Arvixe Web Hosting