Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Join Date
    Sep 2011
    Posts
    15
    Plugin Contributions
    0

    Default Different maximum shipping weights for different shipping modules

    Hello !
    I set up 2 different "per weight unit" modules (I made a clone) with different rates, one for normal shipping, and one for small packages. The problem is, the small package rate is supposed to be only for packages under 2 kg, so I need to have a 2 kg limit for this module. But I need to keep my 50kg limit for the normal shipping module.
    How can I have a different weight limit for each module ?
    Thank you for your help.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Different maximum shipping weights for different shipping modules

    You could add to the modules:
    Code:
        // disable only when entire cart is free shipping
        if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_PERWEIGHTUNIT_STATUS == 'True') ? true : false);
        }
    
    // bof: turn off for weight over 2
          if (!IS_ADMIN_FLAG) {
            global $cart;
            if ($_SESSION['cart']->show_weight() > 2) {
              $this->enabled = false;
            }
          }
    // eof: turn off for weight over 2
    
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Sep 2011
    Posts
    15
    Plugin Contributions
    0

    Default Re: Different maximum shipping weights for different shipping modules

    That worked, thank you so much !!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Different maximum shipping weights for different shipping modules

    Thanks for the update that this was able to work for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Dec 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Different maximum shipping weights for different shipping modules

    hi..Ajeh...
    following code from file zone.php...I have install muiltple-shipping-zone- module.........

    if (IS_ADMIN_FLAG === true) {
    // build in admin only additional zones_5 if missing in the configuration table due to customization of default $this->num_zones_5 = 3
    global $db;
    for ($i = 1; $i <= $this->num_zones_5; $i++) {
    $check = $db->Execute("select * from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_ZONES_5_COUNTRIES_" . $i . "'");
    if ($this->enabled && $check->EOF)


    I was trying to limit maximum allow weight 2 kg for this shipping module...Please help...
    I was tyring to figure out but above code is quite different...I do want to mess anymore..becoz I m new with php coding and I already have done....

    I was trying

  6. #6
    Join Date
    Dec 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Different maximum shipping weights for different shipping modules

    Quote Originally Posted by inder View Post
    hi..Ajeh...
    following code from file zone.php...I have install muiltple-shipping-zone- module.........

    if (IS_ADMIN_FLAG === true) {
    // build in admin only additional zones_5 if missing in the configuration table due to customization of default $this->num_zones_5 = 3
    global $db;
    for ($i = 1; $i <= $this->num_zones_5; $i++) {
    $check = $db->Execute("select * from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_ZONES_5_COUNTRIES_" . $i . "'");
    if ($this->enabled && $check->EOF)


    I was trying to limit maximum allow weight 2 kg for this shipping module...Please help...
    I was tyring to figure out but above code is quite different...I do want to mess anymore..becoz I m new with php coding and I already have done....

    I was trying
    Thank you Ajeh,,,,I found solution from your other threads...

    Thank you again...
    Regards Inder.

  7. #7
    Join Date
    Dec 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Different maximum shipping weights for different shipping modules

    hi Ajeh...
    it was working perfectly fine for me...
    I have installed two shipping options...second option has maximum weight limit of 2 kg (above code is working perfectly fine.thank you for that..) but suddently I realized that no matter what option do the customers select, the next page shows only other expensive selection....I deactived and actived tried ....what else I can do? ....I tried to find other threads but nothing found same thank you advance.....

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Different maximum shipping weights for different shipping modules

    I am not sure what you are doing with the code you posted ...

    The Zone Rate zones does not need custom code like you are showing ...

    Can you give specific details on what exactly you are trying to do and what code changes you have made and what is working and what is not working?

    I am not fully grasping what you mean by:
    but suddently I realized that no matter what option do the customers select, the next page shows only other expensive selection
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Dec 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: Different maximum shipping weights for different shipping modules

    Quote Originally Posted by Ajeh View Post
    I am not sure what you are doing with the code you posted ...

    The Zone Rate zones does not need custom code like you are showing ...

    Can you give specific details on what exactly you are trying to do and what code changes you have made and what is working and what is not working?

    I am not fully grasping what you mean by:
    Thank you Ajeh for quick response....
    I was using code.... in zone file
    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_PERWEIGHTUNIT_STATUS == 'True') ? true : false);
    }

    // bof: turn off for weight over 2
    if (!IS_ADMIN_FLAG) {
    global $cart;
    if ($_SESSION['cart']->show_weight() > 2) {
    $this->enabled = false;
    }
    }
    // eof: turn off for weight over 2

    and it was working perfectly fine for me... (I wanted 2 kg limit for shipping)

    I have installed another shipping for bigger orders(expensive) ,

    but problem is limited weight shipping does not work properly now...

    when customers select limited weight shipping and press next for checkout...total shows with other shipping(expensive)....

    I mean it ignores the selection and shows total with another shipping...

    I hope I m successful to explain you and you can guide me....

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Different maximum shipping weights for different shipping modules

    I do not know why you have this code in the Zone Rate zones shipping module:
    Code:
    // disable only when entire cart is free shipping
        if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_PERWEIGHTUNIT_STATUS == 'True') ? true : false);
        }
    you should have in the Zone Rate zones just the new code in Red:
    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);
          }
    
    
    // bof: turn off for weight over 2
          if (!IS_ADMIN_FLAG) {
            global $cart;
            if ($_SESSION['cart']->show_weight() > 2) {
              $this->enabled = false;
            }
          }
    // eof: turn off for weight over 2
    
          // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
          $this->num_zones = 3;
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 perweightunit Shipping Module, different shipping prices for different quantities
    By kelley777 in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 29 Aug 2013, 06:09 PM
  2. Setting up shipping costs for different weights
    By Quorthon in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 9 Feb 2012, 09:23 PM
  3. Different Price for different shipping modules like ground
    By wildbill8448 in forum Built-in Shipping and Payment Modules
    Replies: 14
    Last Post: 20 Sep 2011, 11:00 PM
  4. 2 different shipping amounts and a maximum per order for shipping
    By scid in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 28 May 2011, 07:43 PM
  5. Different Shipping Methods for Different Weights
    By fsicody in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 8 Apr 2008, 06:59 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR