Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Customizing Pricing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

johnagr
Starting Member

Australia
8 Posts

Posted - May 28 2006 :  18:42:59  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
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
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - June 26 2006 :  04:59:46  Show Profile  Visit devshb's Homepage  Reply with Quote
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
Go to Top of Page

webboy
VP-CART New User

Australia
52 Posts

Posted - June 29 2006 :  07:45:36  Show Profile  Reply with Quote
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
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - June 29 2006 :  15:19:24  Show Profile  Visit devshb's Homepage  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00