I have one price field with three currencies enabled - English, French, and Spanish.

Currency Handling is set to use a dedicated field for French and Spanish.

By default, this creates commerce_price_eur and commerce_price_cad with a Price Textfield widget.

However, it is not setting the currency code to a default of EUR or CAD.... therefore, when I use feeds import, it is defaulting to USD as the currency.

I have tried to edit the field, but it is locked. Additionally, using feeds tamper to Set a value of the currency to EUR or CAD also does not work.

Any suggestions, or is this a bug with the importer?

Thanks

Comments

das-peter’s picture

Project: Commerce Multicurrency » Commerce Feeds
Category: support » feature

As the fields created by commerce_multicurrency have set their related currency in the instance setting I assume the feed module doesn't rely on the field instance setting and uses the stores default currency.
...
I just took a look in the feed price field mapper.
Looks like it would accept the currency as input, but if the currency isn't present it falls back to the stores default currency (Line 59 / 69).

Thus I'd change this issue to an feature request and hand it over to Commerce Feeds.

pcambra’s picture

Status: Active » Fixed

So yeah, thanks for the report and the suggestions!

Fixed in -dev
http://drupalcode.org/project/commerce_feeds.git/commit/cb2bcdc

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

stan turyn’s picture

I'm really struggling to get Commerce Feeds to set correct currency. Whatever I do it still defaults to store's default currency. Can anyone confirm that the dev version of the module does it successfully for them?

pcambra’s picture

Obviously, this has been tested prior to commit to the last dev version.

You need first use a dev version of the module that is newer than March 16th, have several currencies enabled and map the currency with your data origin (xml, csv).

stan turyn’s picture

Thanks for your reply, pcambra. I've been at it for the last 2 days and checked for the things you mentioned (and many others) dozens of times.

But I think I'm finally nailing where it breaks (not sure about the cause yet) - the weird thing is that once I break the importer by, say, inserting a dot in CSV header field and creating a mapping for that dotted column, there is no way for me to recover by deleting just the offending mapping and correcting a CSV - no, the only way is to delete the whole importer and create a brand new one and voila - import starts working. Not sure if behaviour like this has been reported but I'll update here once I'm sure I can reproduce it.

pcambra’s picture

If you need to open an issue because you've found a problem, please open it in a different, new issue.
Thanks