Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  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: 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
    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: 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
    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: 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!

  7. #7
    Join Date
    Feb 2013
    Location
    Melbourne Australia
    Posts
    33
    Plugin Contributions
    0

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

    How cool, I've been trying to work how to do that for ages,

    Very handy,

    Cheers

  8. #8
    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 letting us know that this was able to help you as well ...
    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
    Sep 2006
    Posts
    163
    Plugin Contributions
    1

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

    Is there a way to get the shipping weight of an order afterwards?

    I'm trying to generate a feed file to make Interlink shipping labels. The problem is that I can't find a way to get it to include the correct weights.

    There is a very old plugin that does this, but it takes the list of products in the order, works out the weight of each and uses that as the weight of the order. I'm able to add a calculation for packaging, but I'm not able to find a way to include additional weights of attributes.

    It looks easy enough to do it for the contents of the basket (using the $shipping_weight), but less obvious (to me) how to do it for an order in the system. Am I missing something?

  10. #10
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

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

    Quote Originally Posted by hairydog View Post
    Is there a way to get the shipping weight of an order afterwards?

    I'm trying to generate a feed file to make Interlink shipping labels. The problem is that I can't find a way to get it to include the correct weights.

    There is a very old plugin that does this, but it takes the list of products in the order, works out the weight of each and uses that as the weight of the order. I'm able to add a calculation for packaging, but I'm not able to find a way to include additional weights of attributes.

    It looks easy enough to do it for the contents of the basket (using the $shipping_weight), but less obvious (to me) how to do it for an order in the system. Am I missing something?
    The order process includes a table for attributes (orders_products_attributes), the table on its own does not include the weight of the attributes, but does offer sufficient information to retrieve the associated attribute information that (still) exists in the store side.

    There are three paths that I could see to address this. The first, would be to pull all of the order information together using a left join of the attributes order table and the data that might still exist in the store to obtain all of the weights. (risk is that at some point in the future the live store data may change, so "historical" information would be lost, but on a day-to-day basis would give up-to-date information.
    The second is to modify the various orders tables to capture the weight information and during the purchase process to store that data in the applicable table. Then retrieval would be similar as above but not include the live store data, just the order info.
    The third option (which I guess could be made to a fourth as well) would be to create a new table that contains all of the desired weight information and perhaps anything else seen as important to the shipping process that could be either pulled in like above or is a self standing table to obtain order weight information and then as necessary linked to other order data.

    Whatever method is chosen, it could also make sense to use a combination of methods at the beginning if relatively recent historical information is needed for more than just "today's" shipment with the expectation that once the order history is "established" that only logged order info would be valued. At the same time, by having a live versus recorded comparison available, one could then compare the old with any new plans....

    I know not direct code assistance, but does seem like there is some things to be considered before jumping in with code.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 3 123 LastLast

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

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