This module doesn't affect the price field shown in a view.
Superficially, a fix is a simple matter of dealing with $context['location'] = 'views-price-handler' in uc_discount_price_handler_alter.

However -- the $node object that is available as this point is not a true node. Rather, it's an object whose properties are all the fields of the Views query.
This means that if, say, our discount needs to check taxonomy, that data might simply not be present in the $node object.
We could node_load() a whole $node to pass on to ca_pull_trigger().
However (again) -- we don't necessarily have a nid, or know where it is.
This is because our view could be a view of story nodes with CCK-attached products. Or a view of users with products they have created. In either of these cases, we don't know what property of $node is the actual nid of the product we care about.

Which means that fixing this has to happen in Ubercart core. Filing an issue there...

Comments

joachim’s picture