Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / USPS shipping on all except one item need UPS

USPS shipping on all except one item need UPS

Locked

Views: 979

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
19 Nov 2008, 8:01 PM
#1
pmorelli avatar

pmorelli

New Zenner

Join Date:
Nov 2008
Posts:
18
Plugin Contributions:
0

USPS shipping on all except one item need UPS

Hello,

I have the Free shipping option along with USPS for upgradable shipping for services like priorty, etc. But I have one product that I only want to ship UPS, therefore no free option or USPS. Could someone inform me how to make a product have a specific shipping method only? All shipping is USA only. I have the newest version installed. Any help would be appriciated. Thanks, Paul

23 Nov 2008, 5:18 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS shipping on all except one item need UPS

The shipping modules need the $this->enabled to evaluate as true or they will not display ...

You can add conditions in the Payment modules on controlling that setting based on anything you want to test for ...

25 Nov 2008, 2:47 AM
#3
pmorelli avatar

pmorelli

New Zenner

Join Date:
Nov 2008
Posts:
18
Plugin Contributions:
0

Re: USPS shipping on all except one item need UPS

Thank you for getting back to me! Btt I do not see a place in UPS shipping to put a condition. Also is it possible to turn off the free shipping option on this one item? Thanks again

25 Nov 2008, 4:17 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: USPS shipping on all except one item need UPS

In the shipping module for the USPS there is the code:

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false);
    }

The existing IF statement stops the $this->enabled from being able to run when the shipping is Free Shipping and makes its value false ...

You can add other conditions either within this code or after to determine when the $this->enabled should be true or false based on your conditions ...

Free Options freeoptions can also have something similar done on the code for its $this->enabled ...

      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_FREEOPTIONS_STATUS == 'True') ? true : false);
      }

So you can again turn off the $this->enabled by setting its value to false when this product is in the cart ...

However, what do you want to happen when 7 things are in the cart and 1 of them is this 1 product?

26 Nov 2008, 3:25 AM
#5
pmorelli avatar

pmorelli

New Zenner

Join Date:
Nov 2008
Posts:
18
Plugin Contributions:
0

Re: USPS shipping on all except one item need UPS

Very helpful Thank you! I see the problem with multiple items in the cart. I may have to make that a free shipping option item as well and add flate rate to the price and desable the USPS options to the item.

Thank you!