[ic] shipping.asc and formulas (adder or at_least field)
Randy Just
randyjust at justcomp.com
Fri Oct 28 10:28:17 EDT 2005
We are old time users of what would be considered ancient versions of Interchange (MiniVend days). I recently upgraded to 5.2.0 and have a shopping cart running under it. I have a minor problem which I am trying to resolve relating to shipping.
I am trying to use formulas in fields such as at_least or adder and seem to be striking out. In the code below I am attempting to change the minimum shipping charge for the user based on the value of the merchandise they
are ordering.
That being if the item total is $8.99 or less, then the minimum shipping charge will be $4.99. Over $8.99 and it goes to $5.49.
at_least [calc interpolate=1]$tmp1=([item-list][item_field price]*[item_quantity]+[/item-list]0);if($tmp1>8.99){$tmp2=5.49}else{$tmp2=4.99};return $tmp2;[/calc]
I have entered the info above into shipping.asc and while the system doesn't error out, it seems to be "ignoring" the calculation.
Alternatively, if I can add a formula to the adder field to add $1.00 if the merchandise total is above $8.99, that would be OK too.
What am I doing wrong?
Randy
More information about the interchange-users
mailing list