Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Use table rate if over certain weight??


jasonabc

Recommended Posts

Posted

Hi guys,

 

If my orders are over 135lbs I need to switch the UPS option off and just present my table rate at checkout. Just wondered if anyone had stumbled on a contribution that does this? I could get the order weight from the db directly and stick a bit of logic in the shipping page but there's no point reinventing the wheel!!

 

cheers

Posted

edit your ups.php the constructor, change this:

 

// class constructor

function ups() {

global $order;

 

to this

// class constructor
function ups() {
  global $order, $shipping_weight;

 

then few lines down where you have:

 

if ($check_flag == false) {

$this->enabled = false;

}

}

 

add beneath:

 

if($shipping_weight> 135)
	  $this->enabled = false;

 

and you can make it a switch in the database for the module to control it from there.

  • 3 months later...
Posted

Mark,

 

That sounds like a great solution for that users application.

 

I'm wondering if something similar can be done to restrict the display of UPS and USPS shipping options by either a short list of items (preferred) or a specific category, which are too big and heavy and can only ship by Fedex Freight.

 

Any ideas on how to revise the class constrictor for UPS and USPS in that case?

 

Thanks in advance for your reply and help.

 

DP

 

edit your ups.php the constructor, change this:

 

// class constructor

function ups() {

global $order;

 

to this

// class constructor
function ups() {
  global $order, $shipping_weight;

 

then few lines down where you have:

 

if ($check_flag == false) {

$this->enabled = false;

}

}

 

add beneath:

 

if($shipping_weight> 135)
	  $this->enabled = false;

 

and you can make it a switch in the database for the module to control it from there.

Archived

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

×
×
  • Create New...