Closed (fixed)
Project:
Commerce Multicurrency
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2012 at 20:54 UTC
Updated:
6 Mar 2018 at 23:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
edxxu commentedSame problem. After installing commerce discount module and setup a rule to give user a free product as discount, the multicurrency seems doesn't work.
Comment #2
skyredwangRegarding #1, if the free product is set up with non-default currency, then the total calucaltion works fine; but, if the free product is set up with default currency, then the bug above takes place.
Comment #3
jantoine commentedUsing the latest 1.x-dev release of this module and having correctly configured individual currency price fields, I have a 30% discount on a set number of products that continued to work across the board after enabling the Commerce Multicurrency module. I am using the 1.0-alpha4 version of Commerce Discount. Please re-open if this is still an issue with the module versions I've listed or newer.
Comment #5
rintoug commentedUsing the latest, still I am facing this issue. Anyone got this solved? I've tried the latest dev release though.
@skyredwang #1 also not working for me.
Comment #6
RAWDESK commentedHi,
The drupal discount multicurrency mantra was working like a charm to me until last week i started to experiment with Free product discounts. As my client requested, i setted price to zero for these products.
Result :
- product price 0€ -> discount total 0€ (OK)
- in $ : product price 0$ -> discount total 0€ and also all the rest of commerce total components ! (not OK)
To have this free product selected i had to manually adapt the free product rule though (generated by discount module), in this way that a second condition needed to be fulfilled in an OR relation with the € condition (eg. commerce-order:total > 100$).
Overriding this rule therefore resulted in the same symptom as described in this thread.
My solution was to clone the existing € discount, and adapt the rule afterwards so it takes a $ amount condition instead of €.
Additionally a second (AND) condition was added to both rules : site:commerce-currency = "EUR" (or "USD").
Overview :
I would strongly suggest that discount maintainer should provide a multicurrency port into commerce discount. This way the discount admin UI has the ability to select a currency when entering an amount condition to a discount.
Comment #7
loparr commentedI can confirm, that discount module does not work with multi currency. Any workaround??
Comment #8
millionleaves commentedMy solution was similar to #6. Create a discount in the default currency, then duplicate the rule this creates, and modify the duplicate to check the currency of the order, and apply an appropriate discount. You'll need to do this for each currency you support. Also, you won't be able to manage the additional rules through the Discount UI.
Comment #9
AlAngel commentedI believe this is an issue with the 'Commerce Discount' module, not 'Commerce Multicurrency' so this issue should probably be moved.
However, I also encountered this issue when using the '% off' discount offer type. The solutions proposed in #6 and #8 helped for '$ off' but not '% off' (specifically, 'Order discount', I'm not using 'Product discount').
I discovered my issue was due to a rule defined in the 'Commerce Discount' module, the
commerce_discount_percentage()function (in commerce_discount.rules.inc) was sometimes calculating the discount$discount_amountusing the correct figure but the wrong currency (usually, the default currency).To correct this, I replaced the following lines of code within the the 'commerce_order' switch case in the
commerce_discount_percentage()function:Replace:
With:
And replace:
With:
The changes are:
* Create
$line_item_currencyto store the line item's currency.* Use this to check if the
$discount_amountarray has the same currency code...if not, update it.(I haven't created a patch because I believe more work is needed for a solid solution)
Comment #10
berenddeboer commentedI had the same problem with a free product. I believe the error is actually in the commerce_discount module: it does not call the proper methods to calculate the price I think.
See attached patch, that solved all problems for me.