Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Need UPS for everything, but added option as well.

Need UPS for everything, but added option as well.

Locked

Views: 1,209

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
21 Jun 2008, 5:08 PM
#1
highhobbies avatar

highhobbies

New Zenner

Join Date:
Jun 2008
Posts:
26
Plugin Contributions:
0

Need UPS for everything, but added option as well.

I have UPS working fine on my site. I have smaller products too and would like to offer USPS First Class for ONLY products under 1lb set at $3.49. I also would like to have USPS Priority Mail for ONLY products under 1lb set at $4.95.

How would i do this?

Example:

Product < 1Lb Options:
First Class USPS = $3.49
Priority Mail USPS = $4.95
UPS OPTION 1
UPS OPTION 2
UPS OPTION 3

Product > 1Lb Options:
UPS OPTION 1
UPS OPTION 2
UPS OPTION 3

Thank to anyone who knows how to help. :lamo:

21 Jun 2008, 5:48 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Need UPS for everything, but added option as well.

You would need to customize the USPS shipping module further for these specifics to be included ...

22 Jun 2008, 10:26 PM
#3
highhobbies avatar

highhobbies

New Zenner

Join Date:
Jun 2008
Posts:
26
Plugin Contributions:
0

Re: Need UPS for everything, but added option as well.

Which is why i'm a member of these forums.

Anyone have any ideas on how to do this?

Thanks for the help guys.

23 Jun 2008, 1:28 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Need UPS for everything, but added option as well.

Maybe you could explain what UPS Options 1 - 3 are in relation to USPS ...

Are you wanting real USPS or something that reads as USPS with those rates based on the weight being < 1lb ...

What happens at exactly 1 lb, you only show less than or greater than 1 lb?

Did you try setting up USPS with just those 2 options selected and test the shipping to see what happens? NOTE: the actual rates for USPS will show ...

23 Jun 2008, 2:10 AM
#5
highhobbies avatar

highhobbies

New Zenner

Join Date:
Jun 2008
Posts:
26
Plugin Contributions:
0

Re: Need UPS for everything, but added option as well.

Forget about UPS. That's already set up.

I need products under 1 lb to show up with the option USPS and another one to show up as USPS for 1lb and over where i can set the prices for each. Fixed rates.

23 Jun 2008, 2:28 AM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Need UPS for everything, but added option as well.

Then what would work best is to clone Flat Rate flat and make 2 new modules from that where you can then set the Flat Rate for this and set a condition on the $this->enable to be true when the weight is < 1 lb and >= 1 lb on the other ...

Look inside the flat.php and you will see where there is currently an IF statement around the $this->enable to skip the module based on Free Shipping ...

You can do something similar to moderate which one shows when based on the weight ...

A search on:
clone flat

will help you in how to make a proper clone of Flat Rate such as flatunder.php and flatover.php ... then change the language files to read as you need them ...

23 Jun 2008, 5:44 AM
#7
highhobbies avatar

highhobbies

New Zenner

Join Date:
Jun 2008
Posts:
26
Plugin Contributions:
0

Re: Need UPS for everything, but added option as well.

Did some searching.. Found people with problems, and confusing ways to fix them.

If someone could point me step by step on how to make two flat rate shipping options that only show up if the product is under 1lb, then please do.

Thanks again.

24 Jun 2008, 3:58 AM
#8
justmetoo avatar

justmetoo

Zen Follower

Join Date:
Jun 2006
Posts:
31
Plugin Contributions:
0

Re: Need UPS for everything, but added option as well.

Clone flat.php shipping module, first.

Copy the files:
/includes/modules/shipping/flat.php
/includes/languages/english/modules/shipping/flat.php

to the new filenames for under 1lb to:
/includes/modules/shipping/flatunder.php
/includes/languages/english/modules/shipping/flatunder.php

and to the new filenames for over or equal to 1lb to:
/includes/modules/shipping/flatover.php
/includes/languages/english/modules/shipping/flatover.php

In the flatunder.php files, you need to change all flat to flatunder and all FLAT to FLATUNDER, these are case sensative changes.

In the flatover.php files, you need to then change all flat to flatover and all FLAT to FLATOVER, again, these are case sensative changes.

Next, you need to manage these files so that they work based on the current shipping weight and so that the modules can work in the admin as well for configuring them.

To manage the weight in flatunder.php change the code from:

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

to include the code beneath it:

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

// hide if greater than or equal to 1lb
      if (IS_ADMIN_FLAG == false && $_SESSION['cart']->weight >= 1) {
        $this->enabled = false;
      }

You can then do something similar to manage the flatover.php for < 1 lb.