Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Removing shipping options


Guest

Recommended Posts

My shippinmg modules are UPS & USPS And all is working just fine. But I want to remove some of the options that come up when you use them. For instance I do not need the overnight options and air saver options. Is there any way to just have the ones that I want?

Link to comment
Share on other sites

My shippinmg modules are UPS & USPS And all is working just fine. But I want to remove some of the options that come up when you use them. For instance I do not need the overnight options and air saver options. Is there any way to just have the ones that I want?

 

 

 

 

I use USPS...I just check the box next to the service and that is the only service that they will see and be available to the customer.

Hope this helps you. :D

Link to comment
Share on other sites

What you need to do is edit the appropriate module file, ups.php or usps.php, and comment out the line(s) for the services you don't want to offer. For ups.php, find this code:

      $this->types = array('1DM' => 'Next Day Air Early AM',
                          '1DML' => 'Next Day Air Early AM Letter',
                          '1DA' => 'Next Day Air',
                          '1DAL' => 'Next Day Air Letter',
                          '1DAPI' => 'Next Day Air Intra (Puerto Rico)',
                          '1DP' => 'Next Day Air Saver',
                          '1DPL' => 'Next Day Air Saver Letter',
                          '2DM' => '2nd Day Air AM',
                          '2DML' => '2nd Day Air AM Letter',
                          '2DA' => '2nd Day Air',
                          '2DAL' => '2nd Day Air Letter',
                          '3DS' => '3 Day Select',
                          'GND' => 'Ground',
                          'GNDCOM' => 'Ground Commercial',
                          'GNDRES' => 'Ground Residential',
                          'STD' => 'Canada Standard',
                          'XPR' => 'Worldwide Express',
                          'XPRL' => 'worldwide Express Letter',
                          'XDM' => 'Worldwide Express Plus',
                          'XDML' => 'Worldwide Express Plus Letter',
                          'XPD' => 'Worldwide Expedited');
   }

You want to remove the options you don't want. So for example if you wanted to remove the overnight and air saver options, you'd change the code to look like this:

      $this->types = array(//'1DM' => 'Next Day Air Early AM',
                         // '1DML' => 'Next Day Air Early AM Letter',
                        //  '1DA' => 'Next Day Air',
                         // '1DAL' => 'Next Day Air Letter',
                        //  '1DAPI' => 'Next Day Air Intra (Puerto Rico)',
                        //  '1DP' => 'Next Day Air Saver',
                        //  '1DPL' => 'Next Day Air Saver Letter',
                          '2DM' => '2nd Day Air AM',
                          '2DML' => '2nd Day Air AM Letter',
                          '2DA' => '2nd Day Air',
                          '2DAL' => '2nd Day Air Letter',
                          '3DS' => '3 Day Select',
                          'GND' => 'Ground',
                          'GNDCOM' => 'Ground Commercial',
                          'GNDRES' => 'Ground Residential',
                          'STD' => 'Canada Standard',
                          'XPR' => 'Worldwide Express',
                          'XPRL' => 'worldwide Express Letter',
                          'XDM' => 'Worldwide Express Plus',
                          'XDML' => 'Worldwide Express Plus Letter',
                          'XPD' => 'Worldwide Expedited');
   }

If you end up commenting out the last line (XPD here), you'll need to replace the comma on the previous line with );

 

The same idea for usps.php.

Link to comment
Share on other sites

Thanks for your help with the shipping options.

 

I tried what you said and I still have a problem.

 

When I comment out or totally remove the other options that I don't need the names of the optiosn go away but the price of the option still shows and is selecteable by the user even though it has no name.

 

Any further ideas?

Link to comment
Share on other sites

My apologies - the method I suggested works for the USPS module, but not for UPS. Here's how to do it for UPS.

 

Find this code at around line 100 in ups.php:

          $methods[] = array('id' => $type,
                            'title' => $this->types[$type],
                            'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);

Insert before this the line:

           if ($type[0] != '1')

This will eliminate all the shipping types that begin with '1'. If you want to filter the list more exactly, you can use:

           if (!in_array($type, array('1DA','1DM')))

and expand the list in the array call as desired.

Link to comment
Share on other sites

  • 5 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...