Add support for the Commerce Currency Resolver module

Created on 6 June 2024, 7 months ago
Updated 7 June 2024, 7 months ago

Problem/Motivation

I am using Commerce Currency Resolver .

On my webform I am using a token [current-page:user:field_price:currency_code] to store the currency in a 'hidden' webform element. There are two currencies on the site being USD and NGN and depending on what was set on the webform source-entity page (the page/user profile on which the webform is placed) the appropriate currency gets stored inside the 'hidden' element. Then I mapped the element to the currency field of 'commerce_webform_order'.

When the webform submits, the correct currency get's pulled over to the product but there is an issue with currency conversions. We are converting currencies based on country ip.

I tried opening the commerce product directly and when I added it to cart and tried to checkout the currency conversions were working correctly but when the same product is loaded via 'commerce_webform_order' and the price and currency mapped and pulled over to the product, when I tried to checkout the currency conversions were not happening so USD stayed USD while NGN stayed NGN not minding switching countries. If I try again with the commerce product added to cart from it's product page, when I try to checkout the currencies will be converting as I switch country ip addresses.

Perhaps there is a way I should configure the module, perhaps there are some details needed to be pulled over to enable 'commerce_currency_resolver' act on the product when pulled over by 'commerce_webform_order' or perhaps this should be a feature request.

Thank you.

UPDATE: I remembered I have a second form on the site and I tried it now, for that form I didn't use a field to map the currency, it is a fixed price product so for the currency mapping on 'commerce_webform_order', I selected 'Use the product variation selected'. Again for this product, currency conversions failed to happen after the product is loaded by this webform handler but if I load the product directly from commerce, the conversions happen.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇳🇬Nigeria chike Nigeria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024