hakana VIP
Total posts: 425
15 Aug 2015 20:21

Hi Sergey,

I am importing data from my old OSE Membership. For the same plan, you can define different currencies there. When I imported the data, all the old sales data is in USD although some of them were sold for EUR. Is there a way to display the old subscriptions in the currency they were sold for? Or Emerald was build to work with only one currency for each plan?

This will always create a problem if somebody like me changes the currency of the product according to the buyers country. The easiest way to solve this is to add another column (currency) to the subscriptions table. So no matter what currency the plans has, subscriptions will be recorded with its own currency when sold and in the history will have the right currency. Actually you are doing this with the amount. No matter what the amount of the current plan is, in the history the (s)old prices are being kept.

If you add currency column to the subscriptions table, you can display the sales page in the admin like this: If the currency field is empty, get the currency from the plans table, if the currency has a value, read it from the currency subscriptions table.

Thank you once again. Kind regards, Hakan

Last Modified: 24 Aug 2015


hakana VIP
Total posts: 425
16 Aug 2015 08:34

I still would like to have the above feature if possible. On the other hand, I also realize that payment gateways work with fixed currency. I mean, if I change it from the plan details page; everytime I have to change the currency from the payment gateway.

So there are two options in this case,

  1. I have to change the currency from the gateway manually everytime I change it in plan details.
  2. Or you let us select available currencies from the gateway (not just one as it is now, but multi selection). So if I change the currency from the plan, during the payment the currency will be sent to the payment gateway automatically.

Looking forward to hear your ideas. Would like to discuss further. But the idea in the first post is still my priority if it is possible. (keeping the currency in the history sales data)


Sergey
Total posts: 13,748
17 Aug 2015 06:38

hakana Or Emerald was build to work with only one currency for each plan?

People can pay in any currency. I mean if someone have EUR card and you have USD gateway account, he still can pay. But it will converted acording to your gateway account Currency. I know that in PP you can use different currencies but this is exclusive feature of PP. That is why Emerald is designed to display only one currency.

Also because convertion rate by your gateway may be different and it will be hard to show real price.

hakana The easiest way to solve this is to add another column (currency) to the subscriptions table.

That only looks easy. I will also need to add currency manager with conversion rates which should be updated manually on time. Also gateway will have only one currency configure anyway and bill in gateway will be formed in that base currency acording to conversion rate. That does not change much. When there are currencies in eCommerce solution there is always a base currency anyway.

hakana Or you let us select available currencies from the gateway (not just one as it is now, but multi selection).

As mentioned it is not easy. Even if I add currency selector for user I do not know how to convert the price correctly. If I miss 1USD then you might get into troubles. Customer will complain that you took more that it was saying. Co currency conversion have to be done acording to that gateway rate.

But problem is that different currencies at gateway are not for buyer. Those are for seller to set what is his base currency. And after selection this what all sales will be converted to (except paypal). So, since those currencies are not for buyer, there is no API to get currency rate on the fly.

Some gateways solve this problem differently. For example 2CO allow customer to change currency right in the bill. It is not that transaction is different. It will be absolutely the same, only difference it will show in invoice selected currency.

And this is way to go for emerald. We have to show invoice in selected currency. But we do not know how to convert correctly. So we have to allow user to enter amount which would be problematic in tirms of trust.


hakana VIP
Total posts: 425
17 Aug 2015 06:51

I understand these all. Actually, what I wanted was no more a converter. I give coaching to clients and they buy my services. When they contact me, I present them the payment with their currency, according to the deal we have made.

So I just change the currency and the amount of the plan in the backend and present them the currency that we agreed. But if I keep switching the currency like this manually, it causes problems when I keep the history. Because the history shows the records in the last currency of the plan.

I can show you what I mean if you like. If you dont want to add another column I can understand that but still it will be better for the component to keep the records in a proper way, with the original currencies.

For the converter, I have some simple implementation ideas if you like but this is no more my priority.

Looking forward to hearing from you :-)


hakana VIP
Total posts: 425
17 Aug 2015 07:01

I have no interest for a converter currently, but just to show you how it goes with another component, I can send you the link of my old web site:

http://www.relationshipcoach.net/daily-practices/buy-now/register.html

Here in the back end, in the settings area, you just define the available currencies and set the proportions. Like: 1 USD; 1.5 EUR; 2 TL

So you set the price in USD but by the help of the combobox, buyer sees the price in another currency. This is not an accurate conversion, but they see the price of the product if they want to buy with their own currency. The price difference might not look fair but this is how it works with the other component.

As I repeat one more time, it would be better to keep record of the currencies in the subscription table, if possible. Conversion is not that much important for me now.


Sergey
Total posts: 13,748
19 Aug 2015 10:42

hakana Here in the back end, in the settings area, you just define the available currencies and set the proportions. Like: 1 USD; 1.5 EUR; 2 TL

I do not know who designed this but it will not work correct. It might work if your extension is designed for particular payment gateway. But if it is universal and work with any payment gateway, it will not work. What if I have chosen TL but my CC is USD? It will charge me in USD but not the same amount plan has in USD.

As I have mentioned, gateway currency selector is not for customer but for gateway vendor. He have to select correct currency to avoid confusions and conflicts. And if he allow user to select currency it is his responsobility to provide crrect conversions and recalculations. But when you send order to gateway, it should be the same currency you selected in gateway backend as base for your account.

But I understand what you need. I can store in the plan currency sign parameter and use it draw a price.

But i cannot do that in Emerald 9 because t all happens mainly in templates. So if I change it all Emerald custom templates will lose backward compatibility. I can only add it to Emerald 10.


hakana VIP
Total posts: 425
19 Aug 2015 15:45

Hi Sergey,

Thank you very much for your detailed answer.

Sergey But i cannot do that in Emerald 9 because t all happens mainly in templates. So if I change it all Emerald custom templates will lose backward compatibility. I can only add it to Emerald 10.

I think you can keep the backward compatibility with the solution below but you know better anyway.

If you add currency column to the subscriptions table, you can display the sales page in the admin like this: If the new currency field in the subscriptions table is empty, get the currency from the plans table (as before), if the currency field in subscriptions table has a value, read it from the currency subscriptions table.


Sergey
Total posts: 13,748
20 Aug 2015 06:58

hakana If you add currency column to the subscriptions table, you can display the sales page in the admin like this: If the new currency field in the subscriptions table is empty, get the currency from the plans table (as before), if the currency field in subscriptions table has a value, read it from the currency subscriptions table.

Yes, that is right. But here is how I show the price in template

EmeraldApi::getPrice($item->total, $item->params)

First parameter is the amount and second is parameters of the plan where currency sign is stored. In order to pass there new parameter I have to change how it is called in every template.

Let me think what I can do.


Sergey
Total posts: 13,748
20 Aug 2015 07:23

I made some changes will release today.


hakana VIP
Total posts: 425
20 Aug 2015 07:55

You rock as always :-) Thank you very much.


Sergey
Total posts: 13,748
24 Aug 2015 13:23

Could not release last week.

Powered by Cobalt