Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2009 at 14:44 UTC
Updated:
6 Aug 2009 at 15:20 UTC
Jump to comment: Most recent file
uc_order currently renders product descriptions (in core this is the attributes ul list) using its own code and doesn't hook through hook_cart_item_description(). It's a simple fix to get around this but the hook name is no longer representative of what the hook does. I've created a patch to fix both of these things. Patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 513696_product_description.patch | 11.77 KB | Island Usurper |
| #4 | 513696_200907211612-0400.patch | 13.46 KB | sammys |
| #1 | 513696_200907081045-0400.patch | 6.72 KB | sammys |
Comments
Comment #1
sammys commentedPatch attached.
Comment #2
sammys commentedChanged title so commit log and changelog will be more informative for contrib/third-party module developers.
Comment #3
Island Usurper commentedThat looks like a lot of logic to be put into a theme function. I'm not sure I want to subject designers to that (says the author of theme_uc_catalog_browse() :P).
Sammy's told me that he's thinking of splitting it into two layers, so we'll see how that pans out.
Comment #4
sammys commentedOk... here's the resulting patch.
Comment #5
fenstratExcellent idea.
A couple of notes on the patch:
* Implementation of hook_cart_item_description().is now
* Implementation of hook_product_description().Need to remove:
//return '';from the end of uc_product_get_description
Comment #6
Island Usurper commentedFixed issues mentioned in #5. I also found a way for check_plain() to be run twice on option names, so that's fixed.
I saw where the product is being put into the #product key of the description's attributes, but I think it makes more sense to pass the product directly as a parameter to drupal_alter(). I left #product alone though. Some other render alterer from higher up the tree may possibly need it.
Comment #7
sammys commentedWorks fine on my testbed with the extensions I've made working too. RTBC!
Comment #8
Island Usurper commentedIs good. Committed.