[ic] Combining products for discounts

Bob Puff@NLE bob@nleaudio.com
Fri, 06 Apr 2001 16:21:15 -0400

> We use a field in products
> db to flag whether or not an item includes shipping.
> So your widgets A would have the flag set, if the catalog sees the
> flag it uses the quantity pricing.  I can see that getting complex
> real quick as soon as they ask for the next permutation.  :->
> We'd do that with a CommonAdjust routine.

I think I follow your logic.  So, I add another field in the products 
database called pr_group.  I set this to "1" for all the items I want to 
group together.  So far so good.  Now how do I combine the quantities of 
all the items ordered with a "1" in the pr_group field, and then fetch 
the quantity price?  I assume this would take some sort of perl?  If 
anyone could offer an example, I'd be mighty grateful.  

Currently, this is in my catalog.cfg:
PriceField     price

CommonAdjust   pricing:price_group,q10,q25,q50,q100: ;:price ;$
AutoModifier   pricing:price_group
AutoModifier   products:gift_cert

UserDB         default    scratch    dealer

Autoload <<EOR
            $Config->{PriceField} = 'no_price';