[ic] price based shipping charges with a different price field (bug?)

Russell Mann tech at khouse.org
Fri Dec 12 14:49:25 EST 2003


IC 4.8.3.  I have a membership that is delinated by the field "user_active"
being non zero, non null.  In my catalog.cfg, I have this:

PriceField     CommonAdjust

CommonAdjust   pricing:price_group,q3,q4,q5,q10, ;products:price, ;$
AutoModifier   pricing:price_group
AutoModifier   products:gift_cert

NonTaxableField nontaxable

UserDB         default    scratch    user_active

Autoload <<EOR
    if($Scratch->{user_active}) {
            $Config->{CommonAdjust} = ' pricing:price_group,q3,q4,q5,q10,
;products:member_price, ;$';

This works perfectly for changing the price on the product page when called
by: [item-price], and in the basket all the way through checkout to receipt.

The problem comes in calculating shipping.  One of my shipping options is
free shipping for orders over $10.00

This is what is in my products/shipping.asc file.

free    Free Shipping - U.S.    price   0       9.99    e Please select
$10.00 or more of products to get Free Shipping.
{'PriceDivide' => "1",}
free    Free Shipping - U.S.    price   10    99999999        0.00
{'PriceDivide' => "1",}

This works perfectly with this code in the ord/checkout.html page:

<select name="mv_shipmode">
[loop option=mv_shipmode
list=|[data table=country key='[default ship_country US]' col=shipmodes]|
[perl interpolate=1]
$sub = [shipping mode=[loop-code] noformat=1] + 0;
$weight = "[scratch weight]";
$code = "[loop-code]";
[if value ship_state]
$state = "[value ship_state]";
[if session ship_message]
$ship_message =  "[data session ship_message]";
return '<option value="[loop-code]">[shipping-desc [loop-code]] [shipping
mode=[loop-code]]</option>' if (($sub > 0) || (($code eq 'download') &&
($weight == 0)) || (($code eq 'free') && ($ship_message !~ 'Please

The problem comes when I set the regular price of the item to $11, and the
member price to $9.  The system seems to be calculating the "price" for the
shipping from the price FIELD, instead of the [item-price].  For example, in
this situation, the non-member should get the product for $11, and have free
shipping.  The member should get it for $9, but have no free shipping.  This
isn't what happens.  Instead, they both get the product for the right price
($11, and $9 resepectively) but both get free shipping.

This seems to be something in the internal workings of IC that might be a
bug.  Shouldn't price based shipping charges be calculated on the modified
price that the customer is seeing?  Where would I go to track this down?


Russell Mann

More information about the interchange-users mailing list