Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Disable shipping method


PSX Norge

Recommended Posts

I use 3 different shipping methods. Pickup, Norwegian servicepackage and table rate. If the total weight in the order is over 5000 grams, I want to disable this shipping option. Did something simular with payment option to skip one option if totat order was over a certain amount. This worked excellent. Try do the same thing in the shipping option, but no result.The code I try to put in the table rate module:

 

// disable the module if the order's weight value is over 5000 gram

if ($this->enabled == true) {

if ($order->info['weight'] > '3500') {

$this->enabled = false;

}

}

 

But it does not happend anything on the shipping page. ANy good ideas? :'(

Link to comment
Share on other sites

Also tried this verson, but no luck. Kan someone please nudge me inn the right direction her?

 

// disable the module if the order's total weight is over 5000 grams

if ($this->enabled == true) {

if ($order->products['weight'] > '5000') {

$this->enabled = false;

}

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...