Closed (fixed)
Project:
UC Upsell
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Jun 2009 at 18:40 UTC
Updated:
30 Jun 2009 at 09:00 UTC
At present this module does not provide enough context when calling uc_price() for price alterers to know what they are altering. This patch passes the node itself and other relevant data so uc_vat or other price altering modules can successfully modify the prices displayed by uc_upsell.
Once this has been reviewed I will add the equivalent support code to uc_vat.
| Comment | File | Size | Author |
|---|---|---|---|
| uc_upsell-uc_price.patch | 1.26 KB | longwave |
Comments
Comment #1
torgospizzaAwesome, thanks!
I might need your help looking at a patch I did for Multicurrency. $context is something that is giving me a headache there as well. Your help is appreciated!
Comment #2
torgospizzaI've committed this change to my local working copy, however there still exists the problem of having multiple alterer functions requiring the $context['location'] be added to the individual module.
There has to be a better way (a patch, most likely) that can address this issue. It's awfully clumsy to, for instance in this case, add
to the switch($context['location']) conditional of the uc_multicurrency's price hander_alter() function.
Unless I'm not doing something correctly which could always be the case. It just seems strange that the only way I'm able to get around this is to either a) add the new location to all alterer functions, or b) just use another pre-existing location such as cart-item. Thoughts?
Comment #3
torgospizzaI also added the same $context rules for list_price, a feature patched in #482724: Not possible to display list and cost prices in the upsell block
Comment #4
torgospizzaThis is committed in dev. Assuming there are no other issues with how this works, it will be in the next stable release (1.14).
Comment #5
longwaveAlso committed the relevant change to uc_vat.