Multiple prices...

2 views
Skip to first unread message

mmarshall

unread,
Oct 5, 2008, 9:19:52 PM10/5/08
to Satchmo users
I just got a client who will need to give different prices to certain
customers. (wholesale prices to retailers.) I see a little talk
about this in the mailing list back in January, but with nothing
conclusive. Is there anything new here?

I would be glad to help with an implementation.

MWM

Matthew Marshall

unread,
Oct 8, 2008, 8:37:20 PM10/8/08
to satchm...@googlegroups.com
I've started working on this.

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

Reply all
Reply to author
Forward
0 new messages