Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On all reports (Orders, Affiliates, Customer, Products, etc.) the currency shows up as the Ubercart default currency only. If the default currency was $, all of the items in the list are labeled $, even if the purchase was in Euros.
We need to connect the order with the currency and show the orders/purchases with the correct currency.
Comment | File | Size | Author |
---|---|---|---|
#4 | uc_order.admin_.inc_.patch | 2.74 KB | nicolasb_cdip |
Comments
Comment #1
amitaibuI have overhauled the module, to properly keep the currency and order total on the $order object -- this will apply only to new orders, not to old ones, so reducing the "critical".
You will see the change when you visit admin/store/orders/1 as there's a full uc_order_load(), but you will still not see it admin/store/orders (patches are welcome...)
Comment #2
bmeadan CreditAttribution: bmeadan commentedThis doesn't address the problem. The issue is on lists (tables, views, etc.).
Order lists like admin/store/orders is exactly where the problem is. This includes, but is not limited to any tables generated by contrib modules, such as uc_affiliate, where the user should be able to view his affiliate orders in the currency in which they were purchased. The user should be able to view a list of all her orders on user/[nid]/orders in the purchased currency as well.
Comment #3
amitaibuThe fix was on a more basic level (and a more important one). Anyway, the next thing to do is see how we can pass the $order object into the context of uc_cck_currency_price_handler_alter(), as Ubercart doesn't do it for us (for a good reason -- as they didn't want to uc_order_load() on every list).
Comment #4
nicolasb_cdip CreditAttribution: nicolasb_cdip commentedI have been working on this problem and I found a solution but I think it's not the best way to fix this issue because it's hacking ubercart core.
I found 2 pages where the problem came up, which are the admin orders pane (admin/store/orders) and the My Orders History page of an user account (user/1/orders). I'm not sure those are the only ones but the patch I'm providing is a way to fix the bug for those two.
Let me know if there is an other place where the bug appears.
As I said before I think there is a best way to fix this but my contribution can help to find it.
I can provide screenshots to show you before/after situations.
Comment #5
amitaibuThis issue belongs in Ubercart. Please note that your patch has some tabs that should be replaces by 2 spaces.
Comment #6
longwaveWe need proper multicurrency support before multicurrency reports can be implemented in core.
Comment #7
TR CreditAttribution: TR commentedNew features should go into 7.x-3.x at this point.
Comment #8
TR CreditAttribution: TR commentedMarking this as a duplicate of #568854: Replace uc_reports with Views and adding a link to this issue so that we will remember to inlcude the currency in the replacement reports.