Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default Product Shipping - certain products only by UPS

    I have some products that can only be shipped via UPS. Is there any way to force UPS shipping on an order that has a product which can only be shipped via UPS?

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

    Default Re: Product Shipping

    What shipping modules do you use?

    Is there something that identify these Products for only shipping UPS besides the products_id?

    About how many of these products do you have for only UPS shipping?
    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
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default Re: Product Shipping

    Quote Originally Posted by Ajeh View Post
    What shipping modules do you use?

    Is there something that identify these Products for only shipping UPS besides the products_id?

    About how many of these products do you have for only UPS shipping?
    I do not know of any product attribute that would identify however There may be something I am not familiar with.

    I use USPS and UPS.

    I have less than a dozen liquid items that cannot be shipped USPS but can be shipped UPS.

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

    Default Re: Product Shipping

    You could customize the code for:
    /includes/modules/shipping/usps.php

    and add the code in RED around line 492:
    Code:
    // eof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart
    
    // bof: Skip and only use UPS
      $chk_cart = 0;
      $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');
      $chk_cart += $_SESSION['cart']->in_cart_check('products_id','15');
      $chk_cart += $_SESSION['cart']->in_cart_check('products_id','110');
      $chk_cart += $_SESSION['cart']->in_cart_check('products_id','17');
      if ($chk_cart > 0) {
        // turn off USPS
        continue;
      }
    // eof: Skip and only use UPS
    
            // Detect which First-Class type has been quoted, since USPS doesn't consistently return the type in the name of the service
    The lines for:
    $chk_cart += $_SESSION['cart']->in_cart_check('products_id','12');

    are for the products_id of the Products that can only be shipped UPS and you can add as many as you like ... I used 12, 15, 110 and 17 in my example ...
    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
    Mar 2005
    Posts
    107
    Plugin Contributions
    0

    Default Re: Product Shipping

    I would like to do the opposite. I have a few products we can ship by USPS. everything else is shipped by UPS. Can I see a sample of the code to accomplish this?

    Thanks

  6. #6
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Product Shipping

    Quote Originally Posted by n8pbm View Post
    I would like to do the opposite. I have a few products we can ship by USPS. everything else is shipped by UPS. Can I see a sample of the code to accomplish this?

    Thanks
    What happens if only one product of many is set to ship via USPS? Do all products get sent via UPS? is the purchase stopped? Or do they all get sent via USPS?

    The answer to that somewhat changes how the above could be approached.

    If the use of USPS is an all or nothing thing, then the above could be used to sum up all of the (few) product that can be sent via USPS, then instead of:
    Code:
    if ($chk_cart > 0) { 
      continue;
    Instead if all product in the cart must be USPS in order to use USPS, then if the sum of the $chk_cart items is not equal to the number of product in the cart or none of the product are to be sent by USPS then need to skip and use only UPS.

    So the if statement would become:
    Code:
    if ($chk_cart != $_SESSION['cart']->count_contents() || $chk_cart == 0) {
      continue;
    Thus no USPS product, then no USPS, if one or more product can only be sent via UPS then send via USPS, if however, all product in the cart are USPS only then process as a USPS.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Mar 2005
    Posts
    107
    Plugin Contributions
    0

    Default Re: Product Shipping

    Thanks. If there are other products in the cart then we would only ship UPS. So the cart can only include products that ship USPS in order for the USPS to be active.

    I will give it a try and see if O can get it working

    Thanks again

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

    Default Re: Product Shipping - certain products only by UPS

    The issue of shipping liquids via USPS has become more problematic over the years. Bottom line if the product is a liquid it is just not safe to ship via USPS legally. Since the fact that it is a liquid, it needs to ship by UPS. At the same time USPS custom codes changes are also problematic since they change regularly. Has anyone come up with an idea how to force liquid products can only be shipped via UPS?

  9. #9
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Product Shipping - certain products only by UPS

    Quote Originally Posted by jodean View Post
    The issue of shipping liquids via USPS has become more problematic over the years. Bottom line if the product is a liquid it is just not safe to ship via USPS legally. Since the fact that it is a liquid, it needs to ship by UPS. At the same time USPS custom codes changes are also problematic since they change regularly. Has anyone come up with an idea how to force liquid products can only be shipped via UPS?
    The process, as Ajeh and others hinted at with some potential examples, is to:
    1. Determine a way to identify which products require the specialized rule.
    2. Inside the relevant shipping modules add some code to enforce the rule (turning themselves on when they can be used, and off when they cannot).
    3. Then figure out how you will handle situations where a customer puts multiple products in cart that apply to conflicting rules. (It's way easier to force customers to place separate orders for separate items by blocking checkout if they have a mismatch. Or you could explore multiple shipments: there's an old plugin that does "some" of that, although its purpose is not an exact match to your situation.) Most likely it's best to just force the entire order to go with one carrier or the other, by disabling the module that doesn't apply. Then the customer only sees quotes for sending their entire order via one carrier. Then it's up to them to decide whether to split their purchase into separate orders to see whether they save much/anything on shipping.

    That said, I often see forward-thinking merchants simply mark the specific products' prices "up" (perhaps with a one-time charge, perhaps named "shipping surcharge" to explain it) by an amount that on-average covers the specialized shipping requirements (and then when shipping just ship the specialized items via the necessary carrier, and the rest of the order via regular carrier), and let it all average-out in the end, thus making both the cart and the customers' shopping experience simpler. In most cases this is best.

    Alternatively, many have said that "Advanced Shipper" by Ceon can do anything. I don't know if it's maintained or current anymore. I've never used it, mostly because it's quite invasive.

    Or, you could get into writing heavily customized code to grab quotes from multiple carriers in one order and combine them carefully to offer choices to your shoppers.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,571
    Plugin Contributions
    30

    Default Re: Product Shipping - certain products only by UPS

    "Advanced Shipper" by Ceon can do anything. I don't know if it's maintained or current anymore. I've never used it, mostly because it's quite invasive.
    It is maintained. It does not overwrite any core files. Apart from doing almost anything it can get quotes from UPS and Fedex, not that I have ever used them.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Shipping cost problem only for certain products
    By jami1955 in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 2 Oct 2014, 03:03 PM
  2. Replies: 0
    Last Post: 2 May 2011, 10:14 PM
  3. Charge shipping only for certain products
    By elabuwa in forum Addon Shipping Modules
    Replies: 5
    Last Post: 29 Apr 2011, 05:44 PM
  4. Flat rate shipping only for certain products
    By commdiver in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 13 Mar 2011, 02:08 PM
  5. UPS-only on certain products
    By vooboo13 in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 6 Jan 2010, 07:21 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