I've got an ubercart site which has a different currency sign for each order - I handle this by storing the order's currency sign in the data serialized field of uc_order, and pulling it out again in a price handler I assigned via hook_uc_price_handler.

However, inside of the order page at admin/store/order, which is created via uc_order_admin in uc_order.admin.inc, the $context that is passed to uc_price doesn't contain the $order object, even though you do have some order information in that function. I'm going to reply to this with a patch that does include that information.

CommentFileSizeAuthor
#2 ubercart-621134.patch634 bytesjcfiala
#1 ubercart-621134.patch607 bytesjcfiala

Comments

jcfiala’s picture

Status: Active » Needs review
StatusFileSize
new607 bytes

So, here's the patch that I came up with. it's really just doing one thing - adding the existing $order to the existing $context.

Now, it's not a complete order object, so anyone working with a price alterer will have to pick up on that and fetch the data they *do* need, but it at least gives the order_id, which is, I think, necessary.

Thank you.

jcfiala’s picture

StatusFileSize
new634 bytes

You know, i did that patch from uc_order, not from ubercart.

Here's the patch done from the ubercart directory.

longwave’s picture

Status: Needs review » Closed (duplicate)

More comprehensive patches for this are being worked on in #1097668: Multicurrency support