[ic] Custom shipping help

Kevin Walsh kevin at cursor.biz
Sat Jun 17 14:46:43 EDT 2006


David Bordas <david.bordas at wanadoo.fr> wrote:
> I'm trying to do something about shipping without finding any solution 
> for the moment.
> Perhaps should i write a custom shipping method to help me ?
> 
> In fact, i've got 2 problems :
> 
> (1) apply an express shipping method to some special products (like 
> cheese, like this 
> http://www.testadaz.com/mic/scan/co=yes/sf=prod_group/se=Fromages/tf=category/va=categorie=Fromages/va=ss_categorie=/st=db.html)
> 
> (2) give a free shipping charge for all order enough expensive (more 
> than 150 Euros).
> 
> For the moment, i'm doing like this :
> 
> (1) For free shipping, i use a standard shipping by price, and give 
> shipping charge to 0.01 when subtotal is higher than 150 Euros.
> This works well.
> 
> (2) For cheese, i use a standard shipping by weight, and put big weight 
> to all products under cheese category.
> Extract of shipping.asc (-> is a tab):
> Normal  -> Normal weight -> 0 -> 99999 -> 7-> {'PriceDivide' => "1",}
> Normal  -> Normal weight -> 99999 -> 9999999 -> 0 -> {'PriceDivide' => "1",}
> Express -> Express -> weight -> 0 -> 9999999 -> 20
> 
> So, normal orders can choose between "normal" and "express" and chesse 
> ones will be to "express" all the time.
> This works.
> 
> But now i didn't know how to do (1) and (2) at the same time !!
> 
> Perhaps should i had an additional field called ship_express to the 
> products table.
> And then use a usertag to force express shipping to all orders with 
> products mark with ship_express tag ?
> 
> Something quite similar to Moe 
> (http://www.icdevgroup.org/pipermail/interchange-users/2001-October/013671.html).
> But i need to force a different shipping method, not to add some charges.
> 
> Did someone have an idea ?
> 
Set your country-specific shipping choices to "free_or_express" and
"normal", and then set up your shipping.asc something like this
(untested):

free_or_express: Express yourself
    crit    [subtotal noformat=1]
    min     0
    max     150
    cost    >>express

    min     150
    max     9999999
    cost    0.00
    free    Free!

express: Express yourself
    crit    weight
    min     0
    max     9999999
    cost    20

    min     9999999
    max     999999999999
    cost    e Too much cheese, Grommit!

normal: It's ok to be normal
    crit    weight
    min     0
    max     99999
    cost    7


Note the cascade from free to express.  In theory, the above would
do this:

    * All orders would be offered free Express shipping if the cost
      is greater than 150.

    * Ordinary (light weight) orders would have a choice of Normal (7)
      or Express (20), depending upon the actual weight.

    * Cheese (heavy weight) orders would only offer Express (20)
      unless the order qualifies for free postage, of course.

It's best to play around with the shipping rules until they look right.
It's sometimes tricky to get them exactly correct the first time.  The
above example might get you started.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/


More information about the interchange-users mailing list