[ic] Change the price on the fly, without CommonAdjust

Ron Phipps interchange-users@lists.akopia.com
Wed Jun 27 16:11:33 2001


Hello list,

I've been reading the documentation for CommonAdjust that was posted by Mike
here:

http://developer2.akopia.com/archive/interchange-users/2001/msg03850.html

It appears that CommonAdjust is based off of values in the pricing table and
fields in the product database.  However for the project that I'm working on
does not seem to fit this mold.  I'll first explain the situation.

The code I have now generates a case order form based on records both in the
products table and support tables I have designed for the case modifiers.
Each part of the case can be customized with a different anodized color.  If
the user selects a color already in the list they are not charged extra for
these colors.  However if they select 'Custom Color' they are charged $15.00
for each additional color.  If they select Custom Color for 10 parts and the
custom color they would like is the same for all 10 parts then they are only
charged $15.00 (since the anodizing is done in a batch) not $150.00.  Each
part is a modifier to the case (the case is one product sku) and each part
also has a modifier for the color.

I already have the code that determines the price of the case and what I
would like to do is set the price of the case for that particular item in
the cart.  All of the mailing lists items I looked through (516) talked
about using CommonAdjust but in those case it was only one level of
modifiers (size, color, etc..) and in this case it is two levels (a modifier
of a modifier).  Is it possible to use perl to change the price for a
certain cart item after it is added to the cart?  Is it possible to change
the price before it's added to the cart?  If I change the price of the item
will the other subtotal and total fields work properly?

Thanks for your help!
Ron Phipps