PDA

View Full Version : need a shipping rules consultant


whiterabbit
December 21st, 2004, 01:29 PM
this shipping rules got me stuck. :confused:

If all the products have prices, and dimensions are within tolerance, then RTR should only fail if they are NON-USA addresses? Is that absolutely correct?

I want to use two different rules for an International Express service:
-If the qty is 1 then $10 per item
-if the qty is 2 or more than $6.25 per item.

I can't make a rule for both NON-US addresses AND with a quantity condition.

Will it work if I implement it as two priority 1 rules, that kick in when RTR fails?

this rules are difficult. Seems like I often can't do what I want...

It would be nice, for testing purposes, if I could quickly rule a 10 or 12 test shopping carts again the rules...like i wish I could create 1 basket for an order of 12 products for texas, another with 1 product for canada, another with 12 products for Japan, etc. I wish I could play them all aganist the rules and see the results for testing...maybe version 13? hehe :)

whiterabbit
December 21st, 2004, 01:46 PM
I have an electronic dictionary in my store called the Canon G50. In the product page I selected to use a specific service. I selected to use a service I created called "International Service Express Mail" and set a price of $12.00.

WHen I add the item to my cart, the cart uses another service, but the correct amount. I think the code is just grabbing the wrong value for the text:
A default shipping method of United Parcel Service Express Mail ($12.00) has been added to your order.

If I add another product to the cart along with the G50, I get the correct text:

Please choose your shipping method...

The following item(s) will be shipped using International Service Express Mail at a cost of $12:
(1) Canon Wordtank G50


Choose your shipping method for the remaining item(s):



U.S.Postal Service Priority Mail - $5.05

U.S.Postal Service Media Mail - $1.84

whiterabbit
December 21st, 2004, 03:14 PM
I want to modify the RTR rates by multiplying the rate by 1.25 and adding $1.30 to it. Can someone tell me what line to change? I think I need to change something in this section:

$postage_i = $index['POSTAGE'][0];
$rate['postage'] = $vals[$postage_i]['value'];
$rate['service'] = $full_service_names[$x];
if($index['ERROR']) {
$error_num_i = $index['NUMBER'][0];
$rate['error']['number'] = $vals[$error_num_i]['value'];
$error_desc_i = $index['DESCRIPTION'][0];
$rate['error']['description'] = $vals[$error_desc_i]['value'];
}
$rates[] = $rate;
unset($rate);
}
if (!$rates[1]) {
return $rates[0];
} else {
return $rates;
}

Is this it?
$rate['postage'] = ($vals[$postage_i]['value']* 1.25) + 1.30;

haha!