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... =)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | - Selix 2011-09-16 17-57-00.png | 114.54 KB | Ace Cooper |
| #5 | - Selix 2011-09-16 18-00-07.png | 85.21 KB | Ace Cooper |
| #2 | Cart - Selix.png | 109.92 KB | Ace Cooper |
| Editing action -Convert the unit price to a different currency- - Selix.png | 65.46 KB | Ace Cooper | |
| Product pricing rules - Selix.png | 81.91 KB | Ace Cooper |
Comments
Comment #0.0
Ace Cooper commentedminor spelling checks
Comment #0.1
Ace Cooper commentedImage links fixed
Comment #1
das-peter commentedHi 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.
Comment #2
Ace Cooper commented¡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!
Comment #3
mayar commentedI have same problem. After some changes the rule corrupted. Reverting rule and cache flush helps.
PS: Russian lang is used.
Comment #4
das-peter commentedJust 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.
Comment #5
Ace Cooper commentedOut-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.
Comment #6
das-peter commented@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.
Comment #7
Ace Cooper commentedComment #8
Rohit _Saxena commentedCurrency 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.
Comment #9
das-peter commentedWTH?
Comment #10
das-peter commentedIssue was definitely hijacked .
Cleaning up.
Comment #10.0
das-peter commentedStill more grammar