News:

Support the VirtueMart project and become a member

Main Menu

Wrong order currency on order display and emails sent to buyer

Started by gcomo01, May 07, 2012, 20:55:28 PM

Previous topic - Next topic

gcomo01

Hi all,
I got a scenario when multiple currencies are supported for the shop. Once the currency is changed the cart shows it correctly for products and totals ... and order goes through in the chosen currency which is different from vendor's currency (buyer pays in HK$ and vendor currency is US$). The initial email that is sent to buyer and vendor shows correctly the order in the buyer's currency (HK$).
Once I go to the back end to view the orders, the order currency for this order in HK$ shows in the vendor's currency and not buyer's currency (even-though amounts are correct considering the conversion rate). Any changes that are made to the status of the order will trigger the emails sent to vendor and buyer. These emails though from now on will be in the vendor's currency and not the buyer's currency. This definitely will be confusing for the buyer and vendor alike (goes without saying).
Any idea or clue what to change to maintain the buyer's currency when displaying the order and throughout email notification to buyer and vendor ?
appreciated G

joomla 1.7.3  vm 2.0.6

gcomo01

Hi,
Just to clarify:
When order is created the currency i think is gotten from cart hence email to shopper and vendor sent is the correct currency... order is created and status set to 'P'. When the backend admin updates the status to confirmed 'C' or shipped (any other status for that matter) the emails fired to shopper and vendor for any order status changes afterwards are in the vendor's currency and not the shopper's currency that reflects the right currency when the order was created.
Additionally the invoice generated is in the vendor's currency also (only when status changed to 'C')
Anyone any idea what code I need to change to fix this ? (maybe in the administrator/..../models/orders.php file ?). Is it actually a good idea to make any changes ? Anyone knows if it may open a box of warms for payments afterwards and stuff ? :-)
Any help would be greatly appreciated
thx
G

WebSoft

Hi gcomo01

Also have VM 2.0.6, but on Joom 2.5.4

Had the same issue - really dont understand if anyone use it for multiple currencies or languages - or how it went through testing...

Close to deadline - NONE of my VM payment plugins works - they submit the currency and language, as you wrote, from the default Vendor settings.

Was a nightmare recoding - one of the plugins, stores and get the currency from the database:
It used the table virtuemart_orders/order_currency - who is wrong and comes from Vendor
- I have to fetch it from virtuemart_orders/user_currency_id

The other payment plugin dont store the orders, before submitting to the payment gateway
- had to get the correct currency from the Session/_VM

- and for both plugins I had to get the correct Language from the session

NOT cool, but at least I got the 2 providers to solve it in the future...