Forums / Built-in Shipping and Payment Modules / Want to use fixed shipping price but also provide USPS/UPS

Want to use fixed shipping price but also provide USPS/UPS

Started by kman55 on 20 Dec 2012, 7:59 PM · Views: 1,021

Results 1 to 4 of 4
20 Dec 2012, 7:59 PM
#1
kman55 avatar

kman55

New Zenner

Join Date:
Feb 2011
Location:
Washington, D.C.
Posts:
80
Plugin Contributions:
0

Want to use fixed shipping price but also provide USPS/UPS

Hello

I would like to be able to provide a fixed shipping price, for example: $6 fixed shipping on all order. However, there are some items that are heavy 10lbs+ which is really expensive to ship. For these items, I would like to continue to use UPS/USPS shipping option and let the customer pay what the real cost will be. If I use the fixed price shipping module, is there a way to override this price so that when the weight of the order is over 10 pounds, then instead of the fixed price, the UPS/USPS prices are displayed?

http://www.kinkykupid.com. WARNING: Please note that this site is intended to sell Adult Toys, Novelties and Costumes. Please do not click the link if you may find it offensive.

23 Dec 2012, 9:17 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Want to use fixed shipping price but also provide USPS/UPS

If you were to use the Flat Rate flat shipping module and the UPS shipping module with the following changes ...

/includes/modules/shipping/ups.php

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

[B]    // bof: turn off shipping if weight is Less than 10 lbs
    if (!IS_ADMIN_FLAG) {
      if (($_SESSION['cart']->show_weight()) < 10) {
        $this->enabled = false;
      }
    }
    // eof: turn off shipping if weight is Less than 10 lbs

[/B]    if ($this->enabled) {

/includes/modules/shipping/flat.php

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

[B]      // bof: turn off shipping if weight is Greater than 10 lbs
      if (!IS_ADMIN_FLAG) {
        if ($_SESSION['cart']->show_weight() >= 10) {
          $this->enabled = false;
        }
      }
      // eof: turn off shipping if weight is Greater than 10 lbs
[/B]
      if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {

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 Jan 2013, 3:00 PM
#3
kman55 avatar

kman55

New Zenner

Join Date:
Feb 2011
Location:
Washington, D.C.
Posts:
80
Plugin Contributions:
0

Re: Want to use fixed shipping price but also provide USPS/UPS

Thanks Ajeh. This is exactly what I was looking for. I was also able to use the same code for ups.php to /includes/modules/shipping/usps.php and got what I needed. Thank you again for your help.

http://www.kinkykupid.com. WARNING: Please note that this site is intended to sell Adult Toys, Novelties and Costumes. Please do not click the link if you may find it offensive.

4 Jan 2013, 3:03 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Want to use fixed shipping price but also provide USPS/UPS

You are most welcome ... thanks for the update that this is working for you ... :smile:

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!