Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2009 at 22:17 UTC
Updated:
22 Jul 2009 at 02:50 UTC
Jump to comment: Most recent file
It's currently impossible to make changes to product entries or add extra information (such as links containing user ID) to the order product table. I've patched Ubercart to do this so that the order_uid field of each product is set. The only alternative to doing this is to have the entire order being passed to theme functions.
It's fairly heavyweight to call uc_order_load() because of the lack of caching.
Patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 511958_200907061818-0400.patch | 610 bytes | sammys |
Comments
Comment #1
sammys commentedPatch attached
Comment #2
cha0s commentedDependency injection! Me likey.
Comment #3
rszrama commentedWould it be helpful to have any other information in here? i.e. the order ID. : ?
If not, I'm happy to commit as is; I do kind of wonder if it should be $product->uid instead of $product->order_uid, but without a strong case in favor of ->uid I'd just leave it alone.
Comment #4
sammys commentedI'm thinking it's important to distinguish the product node uid from the order uid. I can't think of anything else that needs to be there. Can I suggest we add them as needed?
Some of this would be moot if we had order caching of some sort as well though I still don't like the heavy weight of stack usage for something simple like the order ID.
Comment #5
rszrama commentedCommitted as is.