Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2008
    Posts
    164
    Plugin Contributions
    0

    Default Disable PER_WEIGHT_UNIT if UPS module active

    Just wanted to share something, in case anyone else runs into this in the future.
    I have 3 shipping methods active:
    - Free Pickup
    - UPS Shipping Module
    - Per Weight Unit

    Now, if UPS can handle the order, I don't want the "Per Weight Unit" option to show because the total usually comes to less than UPS, which is what I use to ship anyways.

    I actually just had an order come through on a $20 item, where the UPS quote was $35, and the customer selected "Per Weight Unit" of $15, in effect making the total order equal to the shipping cost. Of course, I would lose money on this if I fulfilled the order. So you see my problem.

    But being that I do get orders over the 150lb UPS weight limit, I need something to give them a quote. Even if it's off by a bit, I can let the larger orders eat into my profit a bit to close the sale.

    But I'm rambling, so here's what I did:
    In includes/modules/shipping/perweightunit.php add the following code
    PHP Code:
        // disable if UPS module can handle shipping cost, i.e. order is less than 150 lbs
        
    if (zen_get_shipping_enabled($this->code)) {
          
    $this->enabled = (($_SESSION['cart']->show_weight() > 150) ? true false);
        } 
    after:
    PHP 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);
        } 
    And voila! Hope this keeps someone from
    Last edited by bobthemolder; 21 Nov 2009 at 01:54 AM.

  2. #2
    Join Date
    Nov 2008
    Posts
    164
    Plugin Contributions
    0

    Default Re: Disable PER_WEIGHT_UNIT if UPS module active

    Does anyone know what folder I can put this in so it doesn't get overwritten in an update?

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

    Default Re: Disable PER_WEIGHT_UNIT if UPS module active

    You will need to either clone the shipping module or save a copy for future upgrades as there are no overrides for the shipping modules code files ...
    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!

  4. #4
    Join Date
    Aug 2009
    Location
    Carmi, IL
    Posts
    354
    Plugin Contributions
    0

    Default Re: Disable PER_WEIGHT_UNIT if UPS module active

    Quote Originally Posted by Ajeh View Post
    You will need to either clone the shipping module or save a copy for future upgrades as there are no overrides for the shipping modules code files ...
    Ajeh,
    What do we add to disable ups when shipping international using zones in the shipping cart? I have both UPS and zone rates showing up when I enter a international address...I don't want ups to show on international orders nor international rates showing up when shipping ups in the states.

    Shipping & Handling Charge
    UPS $16.00

    Zone Rates
    Shipping to IT (1 Boxes) $10.50

    Thanks

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

    Default Re: Disable PER_WEIGHT_UNIT if UPS module active

    Build a Zone for each of your shipping modules that only includes the places you do want to ship to ...
    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!

  6. #6
    Join Date
    Aug 2009
    Location
    Carmi, IL
    Posts
    354
    Plugin Contributions
    0

    Default Re: Disable PER_WEIGHT_UNIT if UPS module active

    Quote Originally Posted by Ajeh View Post
    Build a Zone for each of your shipping modules that only includes the places you do want to ship to ...
    I thought I had done this

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

    Default Re: Disable PER_WEIGHT_UNIT if UPS module active

    If you built the Zones and added them to the Shipping Modules, then you would only see the Shipping Modules if you were in the correct Zone ...

    On the Zone Rate make sure you have built the Zones to be Skipped correctly ...
    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!

  8. #8
    Join Date
    Aug 2009
    Location
    Carmi, IL
    Posts
    354
    Plugin Contributions
    0

    Default Re: Disable PER_WEIGHT_UNIT if UPS module active

    Quote Originally Posted by Ajeh View Post
    If you built the Zones and added them to the Shipping Modules, then you would only see the Shipping Modules if you were in the correct Zone ...

    On the Zone Rate make sure you have built the Zones to be Skipped correctly ...
    Looks like I need to read instructions again...

  9. #9
    Join Date
    Aug 2009
    Location
    Carmi, IL
    Posts
    354
    Plugin Contributions
    0

    Default Re: Disable PER_WEIGHT_UNIT if UPS module active

    Ok. I have what I need below. What & how can I set up to make this work? I do not want all shipping ways to show up in cart, only the actual shipping available to where items are being shipped.

    have basically 3 Shipping rates I need within the US (excluding Alaska & Hawaii--they will have additional rates added to cart before check out)

    FIRST RATE - USPS
    1 piece of apparel -- $9.00 (additional pieces of apparel added to cart - $1.00 for each piece added)

    SECOND RATE: - UPS
    1 Pad = $16.00 (weight 7 lbs)
    2 Pads = $27.00 (weight 14lbs)
    3 Pads = $34.00 (weight 21lbs)
    4 Pads = $41.00 (weight 35lbs)
    5 Pads = $50.00 (weight 42 lbs)
    6 Pads = $57.00 (weight 49 lbs)
    7 Pads = $64.00 (weight 56 lbs)
    8 Pads = $73.00 (weight 63 lbs)
    9 Pads = $80.00 (weight 70 lbs)
    10 Pads = $89.00 (weight 77lbs)
    and so on...

    THIRD RATE: - UPS
    1 Pad = $16.00 (weight 5 lbs)
    2 Pads = $27.00 (weight 10 lbs)
    3 Pads = $34.00 (weight 15 lbs)
    4 Pads = $41.00 (weight 20 lbs)
    5 Pads = $50.00 (weight 25 lbs)
    6 Pads = $57.00 (weight 30 lbs)
    7 Pads = $64.00 (weight 35 lbs)
    8 Pads = $73.00 (weight 40 lbs)
    9 Pads = $80.00 (weight 45 lbs)
    10 Pads = $89.00 (weight 50 lbs)
    and so on...

    *Alaska and Hawaii will have additional $5.00 added to cart before check out.
    *ALL International shipping will have additional $30.00 added to cart before check out.

    Thanks for you help.
    Pkat

 

 

Similar Threads

  1. v151 any way to add UPS mail innovations to UPS Module?
    By kapsolas in forum Addon Shipping Modules
    Replies: 0
    Last Post: 18 Dec 2014, 10:28 PM
  2. v151 UPS Shipping module - Tweak to show UPS Freight LTL
    By pexter in forum Addon Shipping Modules
    Replies: 0
    Last Post: 13 Jun 2013, 09:37 PM
  3. UPS module - let UPS determine residential or commercial???
    By GoldBuckle in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 3 Apr 2012, 03:45 PM
  4. Is it possible to disable an active shipping module for certain items?
    By Eticam in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 4 Dec 2006, 10:25 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