New feature, tiered pricing

3 views
Skip to first unread message

Bruce Kroeze

unread,
Oct 16, 2008, 2:18:41 PM10/16/08
to satchm...@googlegroups.com
After the presentation at DjangoCon, there was quite a lot of interest in the "tiered pricing" I discussed.  I've made my solution a bit more general and added it to Satchmo trunk as of this morning.

Using it is quite simple:
1) enable it in INSTALLED_APPS
2) make a user group for the tier.
3) Add that group to some users.
4) Make a PricingTier, associating the group to the tier, and setting any default percentage discount.
5) If you want specific tiered pricing for a product, then edit the product.  You'll see a new section, "Tiered Prices", where you can set prices by tier.

The logic is pretty simple when figuring prices:

1) If the user is anonymous or has no groups, use the non-tiered price as normal
2) If the user has a group and that group has a tier:
2a) look for explicit prices (see #5 above) for that product.  If found, return it.
2b) else return the non-tiered price reduced by the default tier discount percent.
3) If the user has multiple tiers, return the lowest amount found in 2a & 2b.

This is all signal and admin magic, fully backward compatible and completely optional.

--
Bruce Kroeze
http://solidsitesolutions.com
Dynamic Designs, Optimized
Reply all
Reply to author
Forward
0 new messages