Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Default Enabling/Disanbling USPS & UPS qoutes

    I want to be able to have products to select what shipping modules they can be uses for. Like UPS only or USPS only. I've got everything working but can't find the correct place to make the changes in the code in either UPS.php or USPS.php. can anybody help me out?
    Beau

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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    How are you identifying which Products can be UPS and which can be USPS?

    What should happen when you have a mixed cart of both UPS and USPS Products?

    Do you have Products that can be either UPS or USPS and need to display both shipping modules?
    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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    How are you identifying which Products can be UPS and which can be USPS?
    What should happen when you have a mixed cart of both UPS and USPS Products?
    Do you have Products that can be either UPS or USPS and need to display both shipping modules?
    I plan to have a couple of flags in the products table in the database.
    product_ships_USPS_only T/F
    product_ships_UPS_only T/F
    We have products that can be shipped, UPS, USPS and also Store pickup. Some can only be shipped by only UPS, or USPS, or Store Pickup. Other products will let the customer select how they want the product shipped.
    Mixed carts that have want to show the shipping separated for each product. The customer can select the type of shipping the want within those limits.
    Beau

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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    The problem will occur on a Mixed cart where there is a Product for UPS only and a Product for USPS only ...

    Now the only shipping that will work is Store Pickup ...

    Is that what you expected would happen in this circumstance?
    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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    Yea, just about. Can we have it just post a message if the customer has mixed shipping telling them we don't support that and ask them to divide the cart into separate orders?
    Beau

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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    Will you be marking the Products as to how they can be shipped on the Product _info, listings, shopping_cart etc.?
    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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    Yes, Every product that has limited shipping options will be marked in the product listing.
    Beau

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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    Assuming your values are 0 or 1 for product_ships_UPS_only where 1 means yes only UPS, you could use the code below in RED in the file:
    /includes/modules/shipping/usps.php

    Code:
          global $template, $current_page_base;
          // CUSTOMIZED CONDITIONS GO HERE
          // Optionally add additional code here to change $this->enabled to false based on whatever custom rules you require.
          // -----
    
    // bof: check cart for UPS only products
          $ups_only = $_SESSION['cart']->in_cart_check('product_ships_UPS_only','1');
          if ($ups_only) {
            $this->enabled = false;
          }
    // eof: check cart for UPS only products
    
          // -----
          // eof: optional additional code
        }
    
        $this->notify('NOTIFY_SHIPPING_USPS_UPDATE_STATUS');
    You can adapt something like that for UPS, but I have not looked at it yet ...
    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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    I can't find where to put this code. I've done searches on the usps.php file and can not find anything that looks like the surrounding code
    Code:
          global $template, $current_page_base;
    .
    .
    .
    
        $this->notify('NOTIFY_SHIPPING_USPS_UPDATE_STATUS');
           // -----
    The best I can do is here.
    Code:
      function usps() {
        global $order, $db, $template, $current_page_base;
    This is the file header for usps.php
    **
    * USPS Module for Zen Cart v1.3.x
    * RateV3 Updates to: January 4, 2010
    *
    * @package shippingMethod
    * @copyright Copyright 2003-2009 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: usps.php 15202 2010-01-09 21:31:35Z ajeh $
    */
    Do I need to get a newer version of the file?
    Beau

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

    Default Re: Enabling/Disanbling USPS & UPS qoutes

    You should be using the current USPS March 7, 2014 K3 version and this code goes around line 203 ...

    You should signup for the News and Announcement forum:
    http://www.zen-cart.com/forumdisplay...-Announcements

    And the update information for the USPS March 7, 2014 K3 is:
    http://www.zen-cart.com/showthread.p...######-changes%29
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 USPS Module not producing estimates; UPS working; Production mode on & USPS verified
    By gingertea in forum Built-in Shipping and Payment Modules
    Replies: 15
    Last Post: 21 May 2013, 03:25 AM
  2. UPS & USPS Shipping
    By cameo in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 28 Nov 2009, 03:21 PM
  3. How do I get UPS and USPS quotes in Zen Cart to match USPS/UPS rates in my PayPal?
    By chachab in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 22 May 2008, 06:13 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