I'm trying to get some shipping modules to appear/disappear when certain order value/weight conditions are met - eg if the order is worth more than £25 or weighs more than 2Kg disable the module, if it's less than both of those values, then enable it.
I have the following:
Quote:
if ($order->info['total'] < 25) {
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
}
|
This works perfectly for the Flat Rate shipping module (when the basket is less than £25, the module appears - when it goes over, it vanishes - brilliant!)
BUT, if I put the same code in another module (UK Special Delivery from the contributions section - being careful to chage the MODULE_SHIPPING_FLAT_STATUS bit to match the line already in the module of course...) it doesn't work!
The Flat Rate version works perfectly, the other doesn't ??
Can anyone shed any light on this please - I'm tearing my hair out trying to sort it - it's only this that's stopping the site from going live!
Many, many thanks!