Author |
Topic |
|
johnagr
Starting Member
Australia
8 Posts |
Posted - May 28 2006 : 18:42:59
|
Hi, I am trying to work out if there is a way to show product pricing in multiple currencies, BUT, depending on the currency selected I would like the product pricing to include or exclude tax. For example, we want our default currency (Australian $) to be 10%GST inclusive, but if an international customer changes to their currency, the product prices displayed exclude GST.
There is a file called productsubs2.asp which handles the currency conversion through the following function:
Function Currencypriceconvert(price) Currencypriceconvert=price*GetSess("Conversionvalue") End Function
Is it possible to use something like this (below), and if so will it work throughout the cart?
Function Currencypriceconvert(price) If GetSess("CID") = "AUD" Then Currencypriceconvert=1.1*price*GetSess("Conversionvalue") Else Currencypriceconvert=price*GetSess("Conversionvalue") End If End Function
|
|
webboy
VP-CART New User
Australia
52 Posts |
Posted - June 26 2006 : 02:59:22
|
Have you had any luck with this approach.
I'm currently after something like this.
Anyone able to help us out.
Built for the future |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - June 26 2006 : 04:59:46
|
we've got an addon which gives you extra template fields which show the various tax elements on product pages (or in email templates etc), you could use that as your base, and then just add an if statement inside the functions for the ccy aspect:
http://www.bigyellowzone.com/shopexd.asp?id=104
that way you wouldn't have to change the core vpasp ccy/currency logic which might have adverse impacts elsewhere.
In this instance, if you got the addon, you'd change this function in our file "byz_template_codes_functions_taxfields.asp" :
from:
Function BYZ_TAX_PRICE_TAX_ONLY_AUX(arg_in_value) BYZ_TAX_PRICE_TAX_ONLY_AUX = arg_in_value * getConfig("xtaxeurate") End function
to:
Function BYZ_TAX_PRICE_TAX_ONLY_AUX(arg_in_value) If GetSess("CID") = "AUD" then BYZ_TAX_PRICE_TAX_ONLY_AUX = arg_in_value * 1.1 else BYZ_TAX_PRICE_TAX_ONLY_AUX = arg_in_value end if End function
then, whenever you want to show the price (either including or not including tax, depending on the ccy) you'd change your product template field from: [formatcurrency cprice] to: [BYZ_TAX_FORMAT_CCY_PRICE_INCLUDING_TAX cprice]
as those functions are additional to normal vpasp template-fields, you can change them to do whatever you like without impacting the rest of the cart/pages.
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
Edited by - devshb on June 26 2006 05:03:54 |
|
|
webboy
VP-CART New User
Australia
52 Posts |
Posted - June 29 2006 : 07:45:36
|
I suppose i did n't explain myself properly.
What i'm after is just to show the GST and then add it to the price.
Like most retailers do in Australia.
Price = 10.00 GST = 1.00
Total = 11.00
Thanks
Built for the future |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - June 29 2006 : 15:19:24
|
yep; that's what our addon does, see here for a demo/example:
http://vpasp60access.bigyellowzone.com/example_taxfields.asp
(you could do the same thing yourself by adding a new field via shopfileio.asp, but you'd end up basically re-iterating the same logic that we use for the addon, but with the addon you'd get support/help/upgrades etc)
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
Edited by - devshb on June 29 2006 15:35:23 |
|
|
|
Topic |
|