Hi all,
Just a Note of interest regarding the hiding of RM Modules when using the Freeshipper module
RE:

Originally Posted by
TPHoare
Try as I might I can't get the RM modules to hide if Free Shipping is applied. Weights are set to zero, zones are not an issue and hide if invalid is set to true. Have I forgotten something or is this just something that the RM modules are not programmed to do?
I am using the Freeshipper module not Freeshipping options module.

Originally Posted by
TPHoare
Sort of half solved my problem. Have inserted:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_RM1STPACKET_STATUS == 'True') ? true : false);
}
but will only work if hide if invalid switch is off in relevant shipping module admin.
Still good enough for me. Wish I knew what I was doing.
I was having the same problem, but I have a slightly different solution that doesn't require the hide if invalid switch to be set to off.
The freeshipper module allows you to set an item to "Always free shipping" and works by setting the weight for that item to zero. Unfortunately all the Big Royal Mail Modules give a shipping value to any weight that is less than or equal to 0.1Kg and increases the value according to the weight.
On the plus side this means the Big Royal Mail Module will assign the minimum value to all products that do not have a weight.
On the minus side it means that the Big Royal Mail Modules will not hide when the freeshipper module is used.
The following solution will resolve the problem but it does require that you give every product either a weight or tick the "Always free shipping" option and have the freeshipper module installed. (best to give all products a weight anyway, even downloads, in case you later remove the freeshipper module)
Failure to do so will result in the following error message at the checkout when a product with no weight AND not selected as always free shipping:
TITLE_NO_SHIPPING_AVAILABLE
TEXT_NO_SHIPPING_AVAILABLE
OK so with that understood, each Big Royal Mail Module that you wish to use will need editing thus (but make a backup first just to be safe):
1. Access the modules at includes\modules\shipping
2. Edit the Big Royal Mail Module you wish to use (e.g. \includes\modules\shipping\rm2ndletter.php)
3. Perform a search for "if ($total_weight <=" (without the " quotes)
you should find the following lines in each module:
Code:
if ($total_weight <= $zones_table[$i]) {
$this->enabled = true;
break;
}
} // end of looping through
4. insert the following code before the line: break;
Code:
// disable when entire cart is free shipping defined by total weight = 0 as initiated by freeshipper
if ($total_weight <=0) {
$this->enabled = ((MODULE_SHIPPING_xxxxxxxxxxx_STATUS == 'false') ? true : false);
}
5. Notice the xxxxxxxxxxx part. This needs to be changed to the name of the module you are editing.
e.g. if you are editing rm2ndletter.php it should look like this: MODULE_SHIPPING_RM2NDLETTER_STATUS
Remember to use UPPERCASE letters.
6. save the file and upload it to includes\modules\shipping
the finished code should look like this (assuming your editing rm2ndletter.php):
Code:
if ($total_weight <= $zones_table[$i]) {
$this->enabled = true;
// disable when entire cart is free shipping defined by total weight = 0 as initiated by freeshipper
if ($total_weight <=0) {
$this->enabled = ((MODULE_SHIPPING_RM2NDLETTER_STATUS == 'false') ? true : false);
}
break;
}
} // end of looping through
That's it. I hope this is helpful, it works for me. If I've made any mistakes or anyone has another solution, I would be glad to hear it.
TFB
Bookmarks