X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to Display inc VAT & Ex VAT Pricing, Plz Help! (https://forum.x-cart.com/showthread.php?t=10555)

CC 11-24-2004 07:40 AM

How to Display inc VAT & Ex VAT Pricing, Plz Help!
 
Hi all

I am totally baffled and lost at working out how I can make X-Cart display all prices with an inc and EX VAT price.

I see loads of people who have done it, so I think it must be easy, but I cant do it. :(

I have searched for 2 days on the forums trying to find a thread with this on but cant.

Could someone please please help me find out how to do it?

All I need is for the page to display something like this:
Price: бё30.00 ex VAT
бё35.25 inc VAT

Thanks VERY much in advance!

CC 11-25-2004 08:39 AM

Anyone? :cry:

Jonny 11-26-2004 08:30 AM

One way to do this would be to use a Math equation in the Smarty template:

Code:

{math equation="price*((100+vatamount)/100)" price=$products[product].price vatamount=$products[product].vat format="%.2f" assign="incvat"}

the 'vatamount' needs to be the percentage of vat i.e 17.5

incvat variable would then include your vat inclusive price.

Please note that this is taken from our version of XCart which is 3.2.1, so this may differ in later versions.

But it gives you an idea.

CC 11-26-2004 09:00 AM

Hi

Thanks very much.
It is the headstart we need.

Right now we have had to hard code it as the same display for the normal price *1.175

Obviously the hard coding of such is not good for the site, so I want to find the correct way to do it.

I have to say I thought I would be flamed with loads of replies saying how easy it was and how I should search better, as sooo many sites have this working already.
But I guess it is not as common or easy as I thought.

Many thanks.

Jonny 11-26-2004 10:26 AM

The code in my previous post pulls the VAT value from each product in the $products array, so you could have seperate VAT values for each product.

i think the later version have a central VAT figure that you can reference.

About you getting flamed, I dont think I have ever seen anyone get flamed on here for asking a question, that is what's great about this forum.

Also, the search isn't that great to be honest, most of what I search for either pulls back 2000+ results or about 5 :D

CC 11-28-2004 09:42 AM

Cheers mate, appreciate it again.

Altho I appear to have found the flaming sessions you have managed to avoid in that case. ;)

I put on my asbestos suit just in case. :lol:

Jonny 11-28-2004 09:56 AM

hahahaha, good luck ;)

stuartn 10-26-2006 02:41 PM

Re: How to Display inc VAT & Ex VAT Pricing, Plz Help!
 
Okay, I'm getting stuck on this too....

Which template do you alter to achieve the item being listed with both the VAT inclusive and NON inclusive across the product page and listing pages.

Many thanks in advance for this...


All times are GMT -8. The time now is 12:28 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.