Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2009
    Location
    VIC, Australia
    Posts
    4
    Plugin Contributions
    0

    Default Carrier delivery mod?

    Hi,

    I have successfully added the Australia Post module to my checkout.

    But some of my items are 2 large for post and require a carrier delivery.

    Is there way to add carrier on checkout say if the total weight was over 10kg's. i am new to zen cart, still unsure what to do..

    i need to be able to set pricing which relies on weight of product.

    My website is http://www.skyraven.com.au/

    Cheers

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Carrier delivery mod?

    This sounds like a good candidate for table rate, or (better still) zonetables shipping module.


    1. For the shipping module that you are currently using, you will need to add a small PHP edit to the module's code. This PHP edit basically tells the module that if the total weight of the consignment exceeds a certain value (in your case, 10kg), then the module is rendered "inactive".

    2. Related to 1 above, is the simple fact that if a consignment DOES exceed 10kg, then ANOTHER shipping option (eg: zonetables module) must be presented to the customer. In the case of THIS module, the PHP edit you will do does the "opposite" of what happens in "1" above... In other words, the PHP edit tells the module to become active ONLY WHEN the consignment weight EXCEEDS 10kg. All the while the customer's total cart weight is less than 10kg, this module is "inactive".

    Having these TWO shipping modules thus gives you the option to configure each shipping option differently.

    I'll need to look at the Auspost code to advise further, but hang in there... I'll be back!
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Carrier delivery mod?

    Just had a look at Auspost mod...

    I notice that Auspost will take parcels up to 20kg... why is 10kg your limit?
    20 years a Zencart User

  4. #4
    Join Date
    Jan 2009
    Location
    VIC, Australia
    Posts
    4
    Plugin Contributions
    0

    Default Re: Carrier delivery mod?

    10kg was just a number i choose, it will be 20kg, i would like to use this mod when AUSTPOST is unable to send.

    Cheers
    www.skyraven.com.au

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Carrier delivery mod?

    What CURRENTLY happens with Auspost Module when a shopper's cart exceeds 20kg?
    20 years a Zencart User

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Carrier delivery mod?

    OK, I see what happened... I filled a cart on your site then clicked shipping estimator.

    You can try this:

    (Backup all files relating to Auspost first).

    1. Get the zonetables module in the Free Software Addons.

    2. Unzip it on your local drive.

    3. Open the following file in that module for editing in a PLAIN TEXT EDITOR (or PHP editor): includes/modules/shipping/zonetable.php

    Find this code (around line 74)

    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);
        } 
    DIRECTLY BENEATH IT, add the following:

    PHP Code:
    // Check for Weight and display module if weight exceeds stated value
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() < 20) {
      
    $this->enabled false;
    } else {
      
    $this->enabled true;

    So it now looks like:

    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);
        }

    // Check for Weight and display module if weight exceeds stated value
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() < 20) {
      
    $this->enabled false;
    } else {
      
    $this->enabled true;

    What this is saying is that if the cart weight value is LESS THAN (<) 20, then DO NOT enable the module.

    You can see the conditional being applied to the value of 20 by this line:- if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() < 20) {

    Now, this 20 value assumes your selected UNIT of weight in your store is KG. If it is GRAMS, then the value will be 20000. Apply the necessary value as per your store's weight unit.

    4. SAVE the file on your local machine.

    5. Check and edit the associated LANGUAGE files of both Auspost and Zonetables modules to display appropriate module labelling and messaging to your customers.

    6. FTP the fully edited zonetables module to the appropriate locations on your server.

    7. In your admin panel, ENABLE and CONFIGURE the zonetables module to suit your shipping zone and pricing policies.

    8. TEST various order combinations (weights and regions), and adjust your language labels and messages accordingly, so that when Auspost "Over 20kg" message appears, customers are told to either contact you (Auspost default), or select the other module if they want to.
    20 years a Zencart User

  7. #7
    Join Date
    Jan 2009
    Location
    VIC, Australia
    Posts
    4
    Plugin Contributions
    0

    Default Re: Carrier delivery mod?

    With the AustPost mod, it will not allow checkout, i have now edited the Free shipping mod to display a message to contact site to arrange postage.

    Brodie
    www.skyraven.com.au

  8. #8
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Carrier delivery mod?

    OK... but why not try what I suggest?

    In that way, Auspost wont be presented as an option, but if the weight exceeds 20kg then zonetables will.

    Either way, your shopper will be given an option:

    Sorry, Auspost is unavailable to you because your cart weight exceeds 20kg, so you can:

    1. Either contact us to discuss, or
    2. Select the shipping option below...


    ... and by selecting an alternative - (priced appropriately by you) - checkout can then proceed.
    20 years a Zencart User

  9. #9
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    Default Re: Carrier delivery mod?

    I have the same problem with aust post module, it wont do orders over 20KG's

    I tried the zonetables module and edited it before I installed it but got the error

    Warning: constant(): Couldn't find constant MODULE_SHIPPING_ZONETABLE_ZONE_1 in /home/content/v/a/n/vandiermen2/html/geewiztoys.com.au/includes/modules/shipping/zonetable.php on line 91

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/v/a/n/vandiermen2/html/geewiztoys.com.au/includes/modules/shipping/zonetable.php:91) in /home/content/v/a/n/vandiermen2/html/geewiztoys.com.au/admin/includes/functions/general.php on line 21

    As this mod was made for 1.3.7, I then tried to add the same code to the zones.php (normal zone rates mod) as I thought I could also use this

    PHP Code:
    // Check for Weight and display module if weight exceeds stated value 
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() < 20) { 
      
    $this->enabled false
    } else { 
      
    $this->enabled true

    in the right place

    Then got the error on the [FONT=Verdana]original [/FONT]zone rates


    Parse error: parse error, unexpected T_IF, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/v/a/n/vandiermen2/html/geewiztoys.com.au/includes/modules/shipping/zones.php on line 120



    I really need to have a shipping mod activated only after >20, hope someone knows what I can do to make it work with out errors

  10. #10
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    Default Re: Carrier delivery mod?

    I [FONT=Verdana]accidently [/FONT]added it to the wrong spot in the zone.php

    Worked well after I added it here

    HTML Code:
     
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
            $this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
          }
     
    // Check for Weight and display module if weight exceeds stated value 
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() < 18) { 
      $this->enabled = false; 
    } else { 
      $this->enabled = true; 
    }  
     
          // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
          $this->num_zones = 3;
        }
     
     
    Seems my aust post module only works under 18KG's

    Now the normal zone rates takes over after 18KG's. Thank you schoolboy for the code.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Delivery Date Picker Mod
    By hws in forum All Other Contributions/Addons
    Replies: 28
    Last Post: 15 Jul 2021, 04:11 PM
  2. v151 Product Delivery Based On Carrier
    By SilverHD in forum Addon Shipping Modules
    Replies: 4
    Last Post: 27 Nov 2014, 02:26 AM
  3. v150 Estimated Delivery Date Mod.
    By wmorris in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 16 Feb 2012, 04:20 AM
  4. Delivery time to customer mod
    By Toft in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 24 Aug 2009, 09:03 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