Na eshopu je základní měna CZK.
Doplňková měna je EUR.
Nyní je třeba aby zákazník, který si nakoupí v CZK (a zapomene překliknout měnu na EUR) a dodací i fakturační adresu navolí SK, přepočítat total amount do EUR a tuto hodnotu odesílat do platební brány.
Četl jsem tento příspěvek:
viewtopic.php?t=64439
ale tohle se mě netýká, protože zde zákazník měnu prostě přepne v modulu currency.
Zjednodušeně řečeno:
- v DB je měna objednávky CZK
- na platební bránu je třeba odeslat celkovou částku v EUR
Jak toho dosáhnout aniž by se musel v pluginu programovat přepočet měny?
Přepočet výše objednávky do jiné měny
- pinochico
- Phoca Member
- Posts: 17
- Joined: 31 Mar 2009, 12:19
- Nidzo
- Phoca Professional
- Posts: 394
- Joined: 07 Nov 2018, 14:55
Re: Přepočet výše objednávky do jiné měny
Maybe option for creating currency rule or country / zone rule that will automatic change currency according to shipping/billing country?
For example when customer from SK selects Slovakia in shipping address field after save those data, Phoca Cart changes currency in Euro. If selected country is Czech Republic , currency stays CZK
For example when customer from SK selects Slovakia in shipping address field after save those data, Phoca Cart changes currency in Euro. If selected country is Czech Republic , currency stays CZK
- Jan
- Phoca Hero
- Posts: 48416
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Přepočet výše objednávky do jiné měny
This would perhaps be a very unpleasant surprise for the customer. If a customer buys in a store in a currency, he does not expect to be automatically switched to another. For example, I have dollars in my bank account, so I just want to buy in dollars and don't expect someone will change it to other currency (and I will incur, for example, an unwanted cost when transferring money to another currency).
I think this is more of a payment plugin question. If any part asks for a different currency, the plugin should recalculate it. But the original question remains. What about a customer whose currency we changed against his will?
If you find Phoca extensions useful, please support the project
- pinochico
- Phoca Member
- Posts: 17
- Joined: 31 Mar 2009, 12:19
Re: Přepočet výše objednávky do jiné měny
I don't know what to do with a customer like that.
All I know is that if the eshop is in CZK (Czech republic) and I want to pay using the internet banking of a Slovak bank (invoicing country is Slovakia), this payment method will only work if the payment is in EUR == this is a payment gateway provision that I am not able to bypass.
This means that already on the payment gateway the Slovak banks will not appear.
I thought of doing a conversion (and I thought there is an internal function in PhocaCart for that), but as Honza rightly says, probably the customer would be surprised if he has internet banking in CZK.
So I probably wouldn't bother, just if he changes the currency to EUR, the Slovak banks will show up (but there is no rule in Phocacart for that yet for the payment plugin - not yet or I don't know about this), if he leaves CZK, they won't show up.
All I know is that if the eshop is in CZK (Czech republic) and I want to pay using the internet banking of a Slovak bank (invoicing country is Slovakia), this payment method will only work if the payment is in EUR == this is a payment gateway provision that I am not able to bypass.
This means that already on the payment gateway the Slovak banks will not appear.
I thought of doing a conversion (and I thought there is an internal function in PhocaCart for that), but as Honza rightly says, probably the customer would be surprised if he has internet banking in CZK.
So I probably wouldn't bother, just if he changes the currency to EUR, the Slovak banks will show up (but there is no rule in Phocacart for that yet for the payment plugin - not yet or I don't know about this), if he leaves CZK, they won't show up.
- Nidzo
- Phoca Professional
- Posts: 394
- Joined: 07 Nov 2018, 14:55
Re: Přepočet výše objednávky do jiné měny
Pinochicos was right. It is different from my topic he linked. His case requires payment gateway.
I just need to send invoice to customer in currency based on country, because many of them, even if you warn them with 30px red font, just leave default currency. Then seller must contact him and ask them to create new order or create new order by itself.
Payment method is paying to bank account and customer gets payment instructions in same e-mail with invoice.
I just need to send invoice to customer in currency based on country, because many of them, even if you warn them with 30px red font, just leave default currency. Then seller must contact him and ask them to create new order or create new order by itself.
Payment method is paying to bank account and customer gets payment instructions in same e-mail with invoice.
- Jan
- Phoca Hero
- Posts: 48416
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Přepočet výše objednávky do jiné měny
Hi, technically, when address is saved, there is event:
onPCTonUserAddressBeforeSaveCheckout
so there the plugin can change the currency (it can do it for data stored and even for the user on the website - to change the currency in session)
So technically this can be done, the question about unexpected change of currency still remains
Another solution can be adding the "currency rule" to the payment methods. So the payment method will be only displayed in case, the currency fit.
And both solutions are not perfect:
a) chaning currency solves the problem to use right currency in payment method - but it is unexpected
b) currency rule prevents from displaying the payment method completely.
Jan
onPCTonUserAddressBeforeSaveCheckout
so there the plugin can change the currency (it can do it for data stored and even for the user on the website - to change the currency in session)
So technically this can be done, the question about unexpected change of currency still remains
Another solution can be adding the "currency rule" to the payment methods. So the payment method will be only displayed in case, the currency fit.
And both solutions are not perfect:
a) chaning currency solves the problem to use right currency in payment method - but it is unexpected
b) currency rule prevents from displaying the payment method completely.
Jan
If you find Phoca extensions useful, please support the project
- pinochico
- Phoca Member
- Posts: 17
- Joined: 31 Mar 2009, 12:19
Re: Přepočet výše objednávky do jiné měny
) currency rule prevents from displaying the payment method completely.
I'd like that,
- if it's not applied, the payment plugin behaves the same as it does now.
- if it is applied, it shows Slovak payments for EUR, Czech payments for CZK.
I am therefore in favour of option b.
I'd like that,
- if it's not applied, the payment plugin behaves the same as it does now.
- if it is applied, it shows Slovak payments for EUR, Czech payments for CZK.
I am therefore in favour of option b.
- Nidzo
- Phoca Professional
- Posts: 394
- Joined: 07 Nov 2018, 14:55
- Jan
- Phoca Hero
- Posts: 48416
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Přepočet výše objednávky do jiné měny
If you find Phoca extensions useful, please support the project
- pinochico
- Phoca Member
- Posts: 17
- Joined: 31 Mar 2009, 12:19
Re: Přepočet výše objednávky do jiné měny
Díky
150 == 150 v pořadí?
150 == 150 v pořadí?