I'm running Drupal 7.8 with Commerce 7.x-1.x-dev dated 2011-Sep-03 and commerce_multicurrency downloaded from GIT main branch on 2011-Sep-10. I'm developing an electronic hardware store in Russian language.

I switched my website to English to look for "site:commerce-currency" token for rules.
The price conversion started working to my greatest joy.
But after I switched back to Russian - "Set the currency price" rule showed up with an error:
"Data selector site:commerce-currency for parameter currency_code is invalid."
The "site:commerce-currency" is just not present among Data Selectors.
Screenshot 1, Screenshot 2, Screenshot 3

Obviously, currency switching stopped working, in spite of several cache flushes.
I tried changing back to English as default, but the error on Store rules page persists.
I also tried to downgrade to official Commerce 7.x-1.0 release, but it didn't help.
Please, look into this. It might have something to do with language arrays, but I'm not sure.
I suspect default language switching because I didn't change anything else when the currency conversion broke.

P.S. Thank you a lot for this great module, cuz I am lazy and it can save a lot of time... maybe... =)

Comments

Ace Cooper’s picture

Issue summary: View changes

minor spelling checks

Ace Cooper’s picture

Issue summary: View changes

Image links fixed

das-peter’s picture

Assigned: Unassigned » das-peter
Status: Active » Needs work

Hi Ace,

thanks for the feedback. I experienced this issue too - unfortunately I couldn't figure out what's the root cause.
I deleted/reverted the rule and restarted memcache (to make sure there are really no artefacts) and after that it was working again.
Maybe there's something wrong with rules or entity - while presenting the module at Drupal Camp Luzern I came across this, maybe related, issue: #1269100: Dirty flag should be cleared on cache clear - fago moved the work on this into this ticket #1270042: Rules remain dirty even if they've been fixed via the UI

However I'll try to reproduce this and figure out what's going wrong. It's unlikely that it's related to the language the site operates in since all the necessary operations are language independent.

Ace Cooper’s picture

StatusFileSize
new109.92 KB

¡Hola, Peter!

Thank you for the remark on rules being language-independant.
In fact I also suspected the currency switching block to write the session currency variable incorrectly.
As for the "site:commerce-currency" token - I managed to get it back by doing the cache flush while on the rule editing screen.
But still the currency selection block didn't affect the USD prices on my site, so I gave up at first.

I moved to test the Commerce Kickstart and MartPlug installation profiles, hoping to find anything useful there.
This made me replace my htdocs folder of my XAMPP. Later I received you reply and it inspired me to do more testing.
I returned to the working copy of my website, went into rules and deleted the Action of "Set the currency price" rule.
Then I made a cache flush and created this rule again, saved and went back to the front page for another cache flush.
And the magic started happening again - the currency conversion worked like a charm! (screenshot)

I hope you will get more feedback on the matter from other users soon. ¡Muchas gracias!

mayar’s picture

I have same problem. After some changes the rule corrupted. Reverting rule and cache flush helps.
PS: Russian lang is used.

das-peter’s picture

Status: Needs work » Fixed

Just pushed a change which should fix this.
I thought that the implementation of hook_entity_property_info_alter() has to / can be placed in a xxx.info.inc file. But unfortunately it seems like this file isn't included every time the hook is invoked.
This inconsistent behaviour lead to circumstances where the currency property was lost and never recovered again.
Now the implementation is in the module file and the behaviour seems to be consistent.

Ace Cooper’s picture

Out-freaking-standing! Peter, thank you so much!
The module now works for me in all intended windows: filter views, cart block and checkout. (screenshot 1, screenshot 2)

Obviously a token of gratitude from me after I finish my project! =)
(and bottle of good stuff to the DrupalCon where we meet).

P.S. There is a minor glitch in views when converting the prices for several product displays linked to the same commerce product, but I have created a separate issue for that.

das-peter’s picture

Version: » 7.x-1.0-beta1

@Ace Cooper: The new issue you opened is related to Commerce Core. I've updated the issue accordingly and added patch: #1281664-1: Price conversion in views for several displays linked to the same commerce product.

Ace Cooper’s picture

Status: Fixed » Closed (fixed)
Rohit _Saxena’s picture

Title: Data selector site:commerce-currency for parameter currency_code is invalid. » Currency Converter | Currency Conversion | Currency Exchange | Dollars to Pounds - currencyconvertere.com
Project: Commerce Multicurrency » Currency converter
Version: 7.x-1.0-beta1 » 7.x-1.2
Component: Code » User interface
Assigned: das-peter » Rohit _Saxena
Status: Closed (fixed) » Active
Issue tags: +currency Converter

Currency Converter : Currency Converter is used in different countries. There is different currencies and a currency is often unique in this country. International trade and have worked in overseas currency conversion necessary. Conversion of currency is the currency of a country in a different form may be used i.e dollars to pounds with currency exchange . Often the foreign exchange play vital role to make the service of process, or travel to another country. There is different currencies and a currency is often unique in this country. International trade and have worked in overseas currency conversion necessary. Conversion of currency is the currency of a country in a different form may be used i.e dollars to pounds with currency exchange . Often the foreign exchange play vital role to make the service of process, or travel to another country.

das-peter’s picture

WTH?

das-peter’s picture

Title: Currency Converter | Currency Conversion | Currency Exchange | Dollars to Pounds - currencyconvertere.com » Data selector site:commerce-currency for parameter currency_code is invalid.
Project: Currency converter » Commerce Multicurrency
Version: 7.x-1.2 » 7.x-1.0-beta1
Component: User interface » Code
Assigned: Rohit _Saxena » das-peter
Status: Active » Closed (fixed)

Issue was definitely hijacked .
Cleaning up.

das-peter’s picture

Issue summary: View changes

Still more grammar