My approach has been to add a "segment" column to the Price model. The
get_product_quantity_price function filters the prices by segment from a
thread local value. (The thread local value is set by middleware.)
So far this seems to be working. I'm not a big fan of how the unit_price
attribute changes based on who is looking at it, but that can be fixed
with more work.
Does anyone see anything inherently wrong with this approach?
If anyone's interested I pasted what I've done so far here:
http://dpaste.com/hold/83282/
MWM