[ic] discounting scheme

Russell Mann tech at khouse.org
Fri Jul 11 12:22:33 EDT 2003


IC 4.6.3

I've figured out how to handle my discounting for "members" as defined by an
expire date in the user db.  I hold the member price and regular price in
the products db.  Then I run my UserTag to test for a logged in user being a
member or not.  Then I do this:

(loop through item-list)

[if scratch membership =~ /Success/]
	[calc]$Scratch->{item_discount} = [item-field price]-[item-field
	[if scratch item_discount]
		[discount [item-code]][item-field member_price]*$q[/discount]
		[calc]$member_subtotal += $Scratch->{item_discount} *

Now here's yet another twist on things.  I am using Quantity Discounting,
and QTY Disc. Groups.  If a product has a member price less than the regular
price,  and also has a quantity discount involved, the member pricing
discount takes effect, and the quantity pricing discount does not.

Product Group BPS.

BPS001 = $14.95 - member $14.95
BPS002 = $14.95 - member $13.95

Both of these are in the BPS discount group which says "Qty >= 3, $10.00

I add two of BPS001, and one of BPS002 to my cart.  Login, test positive for
Pricing comes out as:
BPS001 QTY: 2 - Price: $10.00
BPS002 QTY: 1 - Member Discount - $1.00 - Price: $13.95

I'd like the system to recognize that $10.00 is LESS than $13.95 and give
the Quantity discount instead of the Member discount in this scenario.

Any ideas?



More information about the interchange-users mailing list