Hi, I know that Hynecker is completely right and that is not the appropriate method, but two filters are enough to localise in the templates the currency as a function of the country. Combined with a context processor that passes the country of the request to the template every user (logged in or not logged in) gets immediately the right currency. The bookkeeping remains in the currency of the shop as the prices are not converted internally.
def localise_amount(amount, country):
"""
takes the amount of the shop and converts it to the local currency
"""
return conversion(amount,country)
register.filter('localise_amount', localise_amount)
def localise_amounts(amounts,country):
"""
takes the amounts for the configurable products and converts it to the
local currency
"""
for i,j in amounts.iteritems() :
try :
j["PRICE"]["1"]=conversion(j["PRICE"]["1"],country)
j["TAXED"]["1"]=conversion(j["TAXED"]["1"],country)
except :
pass
return amounts
register.filter('localise_amounts', localise_amounts)
-----Ursprüngliche Nachricht-----
Von: [email protected] im Auftrag von Mika Sjöman
Gesendet: Mi 30.03.2011 09:50
An: Satchmo users
Betreff: regional pricing?
Hi there
I finally got my satchmo store up and running. Now I need to mod it so
that different regions get different pricing in different currencies,
like this:
USA - special US prices, USD Currency
EU - two different language choices; portugese & english, All in Euro,
same price for whole region, BUT also this region has a product
category International and US does not have.
International: two different language choices: chinese and english.
USD pricing.
If anybody has a clue how this could be done, that would be highly
appreciated.
Sincerely yours
Mika
--
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en.
<<winmail.dat>>
