Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How To Display Price Including and Excluding VAT

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-18-2006, 02:05 AM
 
sank sank is offline
 

Advanced Member
  
Join Date: May 2006
Location: West Midlands
Posts: 34
 

Default How To Display Price Including and Excluding VAT

Hi All

I want my prices to show both including and excluding VAT, but don't want the calculation.

I've added this code at the end of my taxed_price.tpl file:-

Code:
{else}{include file="currency.tpl" value=$products[product].taxed_price}{$lng.lbl_including_tax|substitute:"tax":$tax.tax_display_name} {/if} {/if} {/foreach} {/if}

I works how i wanted but it shows net price, not taxed price.
Am I trying to pass the wrong Variable?
Is there a list anywhere of what variables are available in X-Cart to play with?

Any help would be very much appreciated

Thanks

Dave
__________________
X-Cart Gold Version 4.1.9

www.fredsbedshed.co.uk
Reply With Quote
  #2  
Old 05-18-2006, 04:10 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

http://forum.x-cart.com/viewtopic.php?t=17601
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 05-18-2006, 06:01 AM
 
sank sank is offline
 

Advanced Member
  
Join Date: May 2006
Location: West Midlands
Posts: 34
 

Default

I've altered the debug console to show variables.
I'm sure this will be very usefull, when i know smarty a little better.

My featured product array is as follows:-

Code:
Array (3) 0 => Array (38) productid => 3 productcode => M1200400 product => Premier Quality Tiger Drivers Glove provider => master distribution => empty weight => 0.00 list_price => 0.00 descr => Premier Quality Tiger Drivers Glove fulldescr => M1200400 Premier Quality Tiger Driver... avail => 1000 rating => 2 forsale => Y add_date => 1145551350 image_x => 130 image_y => 172 views_stats => 51 sales_stats => 0 del_stats => 0 shipping_freight => 0.00 free_shipping => N discount_avail => Y min_amount => 1 dim_x => 0 dim_y => 0 dim_z => 0 low_avail_limit => 100 free_tax => N product_type => N manufacturerid => 0 return_time => 0 price => 3.32 is_variant => empty is_product_options => empty v_price => empty tmbn_url => price_deducted_tax => empty taxed_price => 3.32***************************************** taxes => Array (1) VAT17_5 => Array (16) taxid => 1 tax_name => VAT17_5 formula => DST+SH address_type => S active => Y price_includes_tax => N display_including_tax => N display_info => empty regnumber => VAT 123-456-789-0000 priority => 10 rate_value => 17.5 rate_type => % tax_display_name => VAT tax_value_precise => 0.581 tax_value => 0.581 taxed_price => 3.9***************************************

As you can see above I've got 2 variables both named taxed_price. The code I've typed is obviously referencing the first one. How do I reference the second?

I thought altering this:-
Code:
{include file="currency.tpl" value=$products[product].taxed_price}
To this :-
Code:
{include file="currency.tpl" value=$products[product].taxes.taxed_price}
would do the trick but it doesn't.

Any Ideas????

Thanks

Dave
__________________
X-Cart Gold Version 4.1.9

www.fredsbedshed.co.uk
Reply With Quote
  #4  
Old 05-18-2006, 07:09 AM
 
sank sank is offline
 

Advanced Member
  
Join Date: May 2006
Location: West Midlands
Posts: 34
 

Default

I've now got this displaying the correct info everywhere except the product detail itself.
It works on featured products, in my category pages and even the shopping cart, just not the products detail page, which shows the price including VAT as 0.

I really dont understand it! Someone please help!

My final taxed_price.tpl looks as follows:-

Code:
{* $Id: taxed_price.tpl,v 1.7.2.1 2005/07/27 09:50:23 max Exp $ *} {if $taxes} {foreach key=tax_name item=tax from=$taxes} {if $tax.tax_value gt 0} {if $tax.display_including_tax eq "Y"} {if $display_info eq ""}{assign var="display_info" value=$tax.display_info}{/if} {$lng.lbl_including_tax|substitute:"tax":$tax.tax_display_name}{if $display_info eq "V" or ($display_info eq "A" and $tax.rate_type eq "$")} {if $is_subtax ne 'Y'}<SPAN id="tax_{$tax.taxid}">{/if}{include file="currency.tpl" value=$tax.tax_value}{if $is_subtax ne 'Y'}</SPAN>{/if}{elseif $display_info eq "R"} {if $tax.rate_type eq "$"}{include file="currency.tpl" value=$tax.rate_value}{else}{$tax.rate_value}%{/if}{elseif $display_info eq "A"} {if $tax.rate_type eq "%"}{$tax.rate_value}% ({if $is_subtax ne 'Y'}<SPAN id="tax_{$tax.taxid}">{/if}{include file="currency.tpl" value=$tax.tax_value}{if $is_subtax ne 'Y'}</SPAN>{/if}){/if}{/if} {else}{include file="currency.tpl" value=$products[product].taxes.VAT17_5.taxed_price}{$lng.lbl_including_tax|substitute:"tax":$tax.tax_display_name} {/if} {/if} {/foreach} {/if}

To see for yourself the URL is http://www.lasafety.co.uk/xcart
__________________
X-Cart Gold Version 4.1.9

www.fredsbedshed.co.uk
Reply With Quote
  #5  
Old 07-02-2006, 04:47 AM
 
nikkodalbani nikkodalbani is offline
 

Member
  
Join Date: May 2005
Posts: 21
 

Default Tax - VAT 17.5%

Hi,
Checked your site, looks like everything is working.

I am trying to display the taxed price only, how would I go about doing that?

Zaid
www.nikkoe.com
__________________
www.littlediode.com
4.1.7 (4.4.2 in progress)
Reply With Quote
  #6  
Old 07-05-2006, 12:28 AM
 
nikkodalbani nikkodalbani is offline
 

Member
  
Join Date: May 2005
Posts: 21
 

Default Easier way to display TAX in product.

1. Login as admin
2. Open General settings page and activate "When a customer isn't logged in, it is presumed that he is from the default country" option. After you have activated the option all anonymous users (before they log in order enter registration information) will see prices for UK location (with taxes value).
3. Open the VAT 17.5 tax page at http://nikkoe.com/xcart/admin/taxes.php?taxid=1, tick "Display product price including tax" option and save the changes. Now you customer will see prices including tax rate.
__________________
www.littlediode.com
4.1.7 (4.4.2 in progress)
Reply With Quote
  #7  
Old 12-11-2006, 05:10 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default Re: How To Display Price Including and Excluding VAT

Hi,

Its a very old post but i will be grateful if any one could reply to this vat issue i have copied all the code now the vat is showing properly on product list page but it shows 00.00 in product details page. Any help PLEASE

Thanks
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #8  
Old 04-02-2008, 12:53 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: How To Display Price Including and Excluding VAT

An oldish thread, but maybe useful to some people.
If you wish to do the same thing on the product page - this is one answer.
Duplicate the taxed_price.tpl template that is shown earlier, e.g call it taxed_price_p.tpl

and in the else line, change the value to this:
value=$product.taxes

then edit the product.tpl file and call this new file, instead of the original.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #9  
Old 04-03-2013, 02:00 AM
 
Noodl3s Noodl3s is offline
 

Advanced Member
  
Join Date: Jul 2011
Posts: 57
 

Default Re: How To Display Price Including and Excluding VAT

v4.5.2 - I am trying to display product prices as follows:

Ex VAT Price (larger font)
Vat amount
Inc VAT Price

I know this is an old thread but any assistance appreciated

Regards
__________________
X-cart 4.4.3
Reply With Quote
  #10  
Old 04-04-2013, 02:57 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: How To Display Price Including and Excluding VAT

Try using:
{currency value=$product.price},
{currency value=$product.taxed_price}
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:24 PM.

   

 
X-Cart forums © 2001-2020