Results 1 to 10 of 315

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Re: Zones Table Rate Shipping Module

    Thanks Linda! Ill give that a go.
    Donation made. Enjoy those donuts! :-)

  2. #2
    Join Date
    Dec 2009
    Posts
    234
    Plugin Contributions
    0

    Default Re: Zones Table Rate Shipping Module

    Thanks to Lindas help and maxidvds initial code, I now have this module turning zone tables on or off according to their weight.

    I had to tweak it a bit to only show the right table according to the weight.

    Here's what I did (note that the weights are in grams);

    Immediately beneath the closing '}' of this code;
    PHP Code:
    // disable only when entire cart is free shipping
            
    if (zen_get_shipping_enabled($this->code)) {
                
    $this->enabled = ((MODULE_SHIPPING_ZONETABLE_STATUS == 'True') ? true false);
            } 
    Add this code;
    PHP Code:
    // Scotts mod: Enable only if cart contents are LESS than 3kg
            
    global $cart;
                    if (
    $_SESSION['cart']->show_weight() > 3000) {
                    
    $this->enabled false;
                    } 
    The above code disables the zone for any weights over 3kgs (3000 grams) (and defaults to courier for us)

    This code enables the other zone table (in our case Australia Post)
    PHP Code:
    // Scotts mod: Enable only if cart contents are HEAVIER than 3kg
            
    global $cart;
                    if (
    $_SESSION['cart']->show_weight() < 3001) {
                    
    $this->enabled false;
                    } 
    The initial code, if it had both tables set to the same weight (3000 in this case) - they would both show on an order weighing exactly 3kgs. So I set the second block of code to 3001.

    This code will work for lbs too, just set a much smaller number ;)
    Donation made. Enjoy those donuts! :-)

 

 

Similar Threads

  1. Help with Zones Table Rate module ..... Please
    By MM_Dude in forum Addon Shipping Modules
    Replies: 5
    Last Post: 7 Jul 2012, 02:37 PM
  2. Zones Table Rate Shipping Module clone
    By maclean in forum Addon Shipping Modules
    Replies: 2
    Last Post: 24 Jul 2009, 04:59 PM
  3. Problem with Zones Table Rate shipping calculation
    By AlpineAire in forum Addon Shipping Modules
    Replies: 1
    Last Post: 17 Jul 2008, 03:29 AM
  4. table rate shipping, zones, quotes
    By gsdcypher in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 27 Mar 2008, 05:00 AM
  5. Clone a shipping module or define a new shipping attribute under table rate module?
    By meeven in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 4 Sep 2007, 04:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg