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

    Default Disabling UPS for certain categories

    I need to disable UPSXML for categories 1, 38 and 39. I've read several threads on this and think this is all I need to do, but it doesn't work. Probably a syntax thing. Ideas?

    Add this code to /includes/modules/shipping/upsxml.php. The commented out code is another unsuccessful try.

    Code:
                if ($check_flag == false) {
                    $this->enabled = false;
                }
    // disable if master_categories_id 1 is in the cart
    //      if ($_SESSION['cart']->in_cart_check('master_categories_id','1') > 0) {
    //          $this->enabled = false;
    //      }
    // skip certain categories
          if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','1') > 0) {
            $this->enabled = false;
          }  
          if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','38') > 0) {
            $this->enabled = false;
          }  
          if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','39') > 0) {
            $this->enabled = false;
          }  
              }

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

    Default Re: Disabling UPS for certain categories

    If you add below the line:
    Code:
    // skip certain categories
    global $cart;
    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
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Disabling UPS for certain categories

    Sorry goober moment ... I think you have the code in the wrong place ...

    Can you move it a little higher up and below the code:
    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
            $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
          }
    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!

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

    Default Re: Disabling UPS for certain categories

    NOTE: in UPSXML the code will probably look like:
    Code:
            $this->enabled = ((MODULE_SHIPPING_UPSXML_RATES_STATUS == 'True') ? true : false);
    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
    Jul 2011
    Posts
    44
    Plugin Contributions
    0

    Default Re: Disabling UPS for certain categories

    That's it! Just pasting it higher, above this line makes it work beautifully.

    Code:
              if (($this->enabled == true) && ((int)MODULE_SHIPPING_UPSXML_RATES_ZONE > 0)) {
                $check_flag = false;
    Many thanks Ajeh! You rock.

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

    Default Re: Disabling UPS for certain categories

    You had put your code in a section where the Zone had to be tested but the Zone wasn't tested as there was no Zone set ...

    Having you move it, places it outside of that Zone Test and the results will disable the Zone test from even being looked at ...

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

  7. #7
    Join Date
    Jul 2011
    Posts
    44
    Plugin Contributions
    0

    Default Re: Disabling UPS for certain categories

    Grrrrr! Works great for frozen items in the cart as now it doesn't show the UPS (priced) shipping options when Free is selectable right below it using freeshipper and 0 weight. But put a non-frozen item in the cart and now nothing shows at all, neither regular UPS options or the freeshipper option. Just empty. Going to checkout, the only option is store walkin. That ain't gonna work so I commented it out and UPS shows on frozen items which should be just freeshipper. Hmmm.

    Seems like it should just display normal shipping for categories other than 1, 38 and 39, and show Shipping Included for those categories. Guess it's the combination that's screwing it up. Maybe I need a split category that allows a combination or something. Doesn't sound fun.

    http://www.texastamale.com/store/

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

    Default Re: Disabling UPS for certain categories

    What is the ultimate goal that you are trying to achieve here?

    Are you trying to turn off all of UPS when there is something in the cart from these categories or are you trying to turn off certain UPS shipping methods when something from these categories are in the cart?
    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!

  9. #9
    Join Date
    Jul 2011
    Posts
    44
    Plugin Contributions
    0

    Default Re: Disabling UPS for certain categories

    Good question. I suppose A) trying to turn off all of UPS when there is something in the cart from these categories. But UPS options need to kick in if there's a product with IDs other than those 3.

    They're stating at the top of shopping cart contents that all frozen items will be shipped UPS 2-day service, so I'm using Freeshipper with 0 weight on the frozen products. The rest of the bottle and jar products have UPSXML and normal UPS shipping charges applied to them.

    FROM THE SITE: All frozen items with SHIPPING INCLUDED will automatically be shipped, usually via UPS 2-day service, with no additional cost to the customer. Dry product may ship in separate package UPS Ground. Extra shipping charges will be applied to shipments going outside the 48 contiguous United States. Due to customs restrictions, frozen items can only be shipped within the 50 United States and to U.S. Territories.
    Everything works fine with the exception that, for only frozen items, UPS options are being shown above my Freeshipper option "Your shipping is included - $0". They've had 2 customers click on the UPS Ground option (for extra $) instead of the free option below it just cause they didn't see it more than likely. So I'm trying to disable showing UPS options if there's only frozen items in the cart (categories 1, 38 and 39).

  10. #10
    Join Date
    Jul 2011
    Posts
    44
    Plugin Contributions
    0

    Default Re: Disabling UPS for certain categories

    This is what's showing on only frozen items even though Freeshipper kicks in and says UPS You Shipping Is Already Included $0. Would like to not show this when only categories 1, 38 and 39 are in the cart. Being 0.00 lbs, I'm not sure what it's quoting. Guess a minimum charge.

    United Parcel Service (1 pkg x 0.00 lbs total) (UPS Ground, ETA: September 02, 2011) $8.31
    United Parcel Service (1 pkg x 0.00 lbs total) (UPS 2nd Day Air) $15.51
    United Parcel Service (1 pkg x 0.00 lbs total) (UPS Next Day Air Saver, ETA: September 02, 2011) $22.67
    United Parcel Service (1 pkg x 0.00 lbs total) (UPS Next Day Air, ETA: September 02, 2011) $26.11
    United Parcel Service (Your Shipping Is Already Included!) $0.00
    Store Pickup (Walk In - Distribution Center - 9087 Knight Rd, Mon–Fri 10-3pm) $0.00
    Store Pickup (Walk In - Retail Outlet - 3340 Fountainview, Mon–Sat 8-4pm) $0.00

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v138a Disabling COD payment for certain customers
    By moosesoom in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 20 Feb 2014, 04:17 PM
  2. Disabling the links for Top Categories in Side Box
    By Wulf359 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 13 Jan 2009, 05:50 AM
  3. Disabling Image Pop Ups.
    By wmorris in forum General Questions
    Replies: 2
    Last Post: 1 Nov 2008, 07:17 AM
  4. USPS and Disabling Flat Rate for Certain Products
    By accension in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 27 Mar 2008, 08:12 PM
  5. USPS module, disabling a service for certain weights
    By dman76 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 18 Nov 2007, 01:58 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