Results 1 to 8 of 8
  1. #1
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default How can i limit shipper for liquid products

    I ship some products which are liquid and must be shipped UPS. How can I select UPS for liquid products?

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: How can i limit shipper for liquid products

    Nothing is built in for this, you'll have to create some custom code.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Apr 2009
    Posts
    417
    Plugin Contributions
    2

    Default Re: How can i limit shipper for liquid products

    Have a look at l big royal mai. I added attributes to limit shipping. You could do something similar with your shipping methods.
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  4. #4
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: How can i limit shipper for liquid products

    buy the fantastic advanced shipper mod, it's worth it, we've been using it for years and couldn't function without it.

    Zen Cart and it's community are the best!!

  5. #5
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default Re: How can i limit shipper for liquid products

    I have perhaps a solution. I use it for a type of "letterbox-package". I made a zones variant for it and added code to disable that module if certain categories are found in the cart.

    Since you permanently have to disable other shipping modules than UPS for it, it could work for you too. However some conditions come with this:
    • all liquids must be in a category or categories by themselves
    • you can not do it in the admin panel
    • you'll have to edit some files


    So, if you do this: backup your files first!

    Example category is 5, adjust this to your category.
    Insert following code in the modules you don't want to ship liquids in:
    PHP Code:
          // bof skip certain categories
          
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','5') > 0) {
              
    $this->enabled false;
          }
          
    // eof skip certain categories 
    in zones I placed it under:
    PHP Code:
          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
            
    $this->enabled = ((MODULE_SHIPPING_BRIEVENBUSPOST_STATUS == 'True') ? true false);
          } 
    If there's more than one category, repeat the code with the next category and so on. I tried using '1' || '2' || '3' instead of '5' to exclude 1, 2 and 3 but that fails to work properly.

    It has to be placed where the code is for checking if the module has to be shown.

  6. #6
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default Re: How can i limit shipper for liquid products

    Quote Originally Posted by Philibel View Post
    I have perhaps a solution. I use it for a type of "letterbox-package". I made a zones variant for it and added code to disable that module if certain categories are found in the cart.

    Since you permanently have to disable other shipping modules than UPS for it, it could work for you too. However some conditions come with this:
    • all liquids must be in a category or categories by themselves
    • you can not do it in the admin panel
    • you'll have to edit some files


    So, if you do this: backup your files first!

    Example category is 5, adjust this to your category.
    Insert following code in the modules you don't want to ship liquids in:
    PHP Code:
          // bof skip certain categories
          
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','5') > 0) {
              
    $this->enabled false;
          }
          
    // eof skip certain categories 
    in zones I placed it under:
    PHP Code:
          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
            
    $this->enabled = ((MODULE_SHIPPING_BRIEVENBUSPOST_STATUS == 'True') ? true false);
          } 
    If there's more than one category, repeat the code with the next category and so on. I tried using '1' || '2' || '3' instead of '5' to exclude 1, 2 and 3 but that fails to work properly.

    It has to be placed where the code is for checking if the module has to be shown.
    Good idea, I will try it even though I dont like changing code. I am surprised ZenCart has not addressed this issue. Its common knowledge that certain products must be shipped by specific shippers in the USA.

  7. #7
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default Re: How can i limit shipper for liquid products

    I took another look at the code and for my use I needed limitations to different quantities.
    The code could cleaner for an overall limitation to zero.

    PHP Code:
        // bof skip certain categories
            
    if (IS_ADMIN_FLAG == false)  {
                if (
    $_SESSION['cart']->in_cart_check('master_categories_id','5') == true) {
                    
    $this->enabled false;
                }
                }
        
    // eof skip certain categories 
    Example is category 5, adjust as needed.

    -------------------------------------------------------------------------------------------------------------------------------------------

    I also thought you could have use for Numinix Product Fields if you add the product field "Products condition". If all liquids are therein marked as "liquid", you could use:

    PHP Code:
        // bof skip liquids
            
    if (IS_ADMIN_FLAG == false)  {
                if (
    $_SESSION['cart']->in_cart_check('products_condition','liquid') == true) {
                    
    $this->enabled false;
                }
                }
        
    // eof skip liquids 
    Than you don't need to enter a lot of code for every category, leave products in every category according to other criteria and still grab them all as liquids.

    Always test in a test environment or test site.

  8. #8
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default Re: How can i limit shipper for liquid products

    Which PHP file is this code supposed to be placed?

 

 

Similar Threads

  1. v154 Maximum Postage limit for advanced Shipper Module?
    By PudzPud in forum Addon Shipping Modules
    Replies: 7
    Last Post: 15 Aug 2016, 12:56 AM
  2. v151 Ceon Advanced Shipper - how can I limit the display of available shipping methods?
    By dysfunctional in forum Addon Shipping Modules
    Replies: 4
    Last Post: 31 Jan 2015, 04:03 AM
  3. Optional Container Charges for Liquid Products Sold by the Pound
    By brewbrothers in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 9 Jul 2011, 09:37 PM
  4. Replies: 11
    Last Post: 19 Dec 2009, 06:44 PM
  5. How can i limit amount of products per buyer?
    By sagivle1 in forum Managing Customers and Orders
    Replies: 3
    Last Post: 14 Apr 2009, 04:52 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