[ic] Re: CommonAdjust calculated price

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Mon Oct 14 16:39:00 2002


Daniel A. Shockley writes: 

> Hello, 
> 
> I need to add an additional calculated (not static as Options typically 
> are) charge to an item in a cart. The problem is that the additional 
> amount charged is based on the number of characters typed into a text 
> field that is part of an Option. 
> 
> I wrote perl code that can calculate the amount I need to add. It's just 
> not clear to me where I need to add this. Do I need to create an Option 
> for every possible character count: 1 through MY_LIMIT, or can I include 
> this in a scratch variable that CommonAdjust can parse in the price 
> chaining process? 
> 
> I can see how to have CommonAdjust lookup a static price for an Option, 
> but the price is based on the LENGTH of what was typed in, not on an 
> option chosen from a Select popup. I can calculate the additional price 
> using perl, of course, but how do I get CommonAdjust to see that price?

CommonAdjust [calc_price] 

where [calc-price] is a UserTag which calculates the price for
a given item and its quantity, both found in Vend::Interpolate::item. 

Search the archives for a sample implementation of calc_price. 

Bye
     Racke 


-- 
Prolific Interchange Consulting (Excellent German Quality !).
Take a look at Materialboerse (http://www.materialboerse.de/), WITT
(http://www.witt-weiden.de/), Boxmover (http://shop.boxmover.ch/) or
Passionshop (http://www.passionshop.com/racke). Need a shop ? Contact us.