From 21137b2690b02c88f71b6baa2e99d225d8c0a4ab Mon Sep 17 00:00:00 2001 From: Jools Wills Date: Thu, 11 Aug 2016 01:15:49 +0100 Subject: [PATCH] disabled signed delivery for Australia on retail only --- .../Royalmail/Model/Shipping/Carrier/Royalmail.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/code/community/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail.php b/app/code/community/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail.php index 97ae099..0ebb508 100644 --- a/app/code/community/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail.php +++ b/app/code/community/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail.php @@ -129,8 +129,8 @@ public function collectRates(Mage_Shipping_Model_Rate_Request $request) unset($calculatedMethods[$key]); } - // no signed delivery to Australia, USA and New Zealand - if (in_array($country, array('AU','US', 'NZ')) && + // no signed delivery to USA and New Zealand + if (in_array($country, array('US', 'NZ')) && strpos($value->shippingMethodName, "TRACKED") === false && strpos($value->shippingMethodName, "SIGNED") !== false) { unset($calculatedMethods[$key]); @@ -150,6 +150,13 @@ public function collectRates(Mage_Shipping_Model_Rate_Request $request) unset($calculatedMethods[$key]); } + // no signed delivery to Australia + if (in_array($country, array('AU')) && + strpos($value->shippingMethodName, "TRACKED") === false && + strpos($value->shippingMethodName, "SIGNED") !== false) { + unset($calculatedMethods[$key]); + } + // only allow international standard to certain countries if (! in_array($country, array('AU', 'AR', 'CA', 'IL', 'RE', 'US', 'ZA')) && strpos($value->shippingMethodName, "STANDARD") !== false) {