Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

On table shipping - Set a fixed weight before it choosed


KommerSnart

Recommended Posts

Hi guys =)

 

In use of table for shipping method, in the code there, is it somehow possible to set a min weight before this freight is possible ?

 

Let`s say the weight is 10kg, then this shipping method will not show, but when it is more than ex. 50kg, it will show.

 

Anyone know hos to implent this into the code ??

 

Thanks for help =)

 

Kim

Link to comment
Share on other sites

yes set it as

 

50:100

 

ie

 

50kg = £100

 

so thats the minimum weight for shipping to show , apply the iso code for zones u want to show shipping

 

(may be a better way or another way, still fairly new here, worth a punt :) Back up first as always

Link to comment
Share on other sites

Thanks for your info benny2012 :)

 

But that did not work, as it works as UP to 50kg, then it costs 100.

 

What i wanted was that the hole shipping method would not show if the weight was UNDER 50kg. All over 50kg, first then, this method would show :-)

 

But thanks again =)

 

Kim

Link to comment
Share on other sites

@@KommerSnart

 

In the shipping module file make sure $cart is declared globally in the function.

Example:

 

function quote() {
global $cart;

 

after that find:

 

return $this->quotes;

 

and change it to:

 

if ( $cart->show_weight() < '50' ) {
return false;
}else{
return $this->quotes;
}

Matt

Link to comment
Share on other sites

@@KommerSnart

 

In the shipping module file make sure $cart is declared globally in the function.

Example:

 

function quote() {
global $cart;

 

after that find:

 

return $this->quotes;

 

and change it to:

 

if ( $cart->show_weight() < '50' ) {
return false;
}else{
return $this->quotes;
}

 

@@mattjt83

aa`man, that solved it!! Thanks a bunch! :)

 

Kim

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...