Results 1 to 10 of 21

Hybrid View

  1. #1
    Join Date
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default How to make inactive one shipping table if the order get more than 4 kg?

    Hi guys,

    I have tried to search the answer without success. So I hope somebody know the answer.

    I need to make one of my table rate shipping method inactive if the order is bigger than 4 kg. The reason is because if the order is more than 5 kg. that would suppose to use bigger size box that it is allowed by the post. So that I want this shipping method to be inactive and let the user less options.

    Thank you in advance!

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

    Default Re: How to make inactive one shipping table if the order get more than 4 kg?

    What is the specific shipping module that you want to turn off when weight is greater than 4?

    What version Zen Cart are you using?
    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!]
    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
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default Re: How to make inactive one shipping table if the order get more than 4 kg?

    Hi,

    The shipping module is Table shipping. Zen Cart version is 1.5.4.

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

    Default Re: How to make inactive one shipping table if the order get more than 4 kg?

    You can customize the file:
    /includes/modules/shipping/table.php

    by adding the code in RED:
    Code:
    // bof: skip if over 4
    if ($shipping_weight > 4) {
      //skip
    } else {
        $this->quotes = array('id' => $this->code,
        'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
        'methods' => array(array('id' => $this->code,
        'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
        'cost' => $shipping + (MODULE_SHIPPING_TABLE_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_TABLE_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_TABLE_HANDLING) ) ));
    }
    // eof: skip if over 4
    
        if ($this->tax_class > 0) {
    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!]
    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
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default Re: How to make inactive one shipping table if the order get more than 4 kg?

    Ajeh,

    Thank you!

    It is amazing how people in this forum are helping!

    So far is working perfect! Thank you again!

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

    Default Re: How to make inactive one shipping table if the order get more than 4 kg?

    Thanks for the update that this is working 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!]
    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!

 

 

Similar Threads

  1. How do i insert more than one image for one item?
    By len47811 in forum General Questions
    Replies: 8
    Last Post: 23 Aug 2010, 06:41 AM
  2. How do i add more than one image for one product?
    By len47811 in forum General Questions
    Replies: 1
    Last Post: 12 Jul 2010, 03:38 AM
  3. How do i get more than 10 products per screen in the admin area?
    By silentsigma in forum Customization from the Admin
    Replies: 9
    Last Post: 3 May 2010, 04:25 AM
  4. Can you make Fedex your default shipping if you offer more than one type of shipping?
    By catangirl in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 1 Oct 2007, 03:20 AM

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