This repository has been archived by the owner on Feb 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
95 changed files
with
1,287 additions
and
1,340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ity/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail/Firstclasslargelettersignedfor.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Meanbee | ||
* @package Meanbee_Royalmail | ||
* @copyright Copyright (c) 2008 Meanbee Internet Solutions (http://www.meanbee.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
class Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Firstclasslargelettersignedfor | ||
extends Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Abstract { | ||
|
||
protected function getRates() { | ||
$helper = Mage::helper('royalmail'); | ||
$rates = $this->_loadCsv('firstclass_largeletter_signedfor'); | ||
|
||
if ($helper->getWorldZone($this->_getCountry()) == Meanbee_Royalmail_Helper_Data::WORLD_ZONE_GB) { | ||
return $rates; | ||
} | ||
|
||
return null; | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...ommunity/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail/Firstclasslettersignedfor.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Meanbee | ||
* @package Meanbee_Royalmail | ||
* @copyright Copyright (c) 2008 Meanbee Internet Solutions (http://www.meanbee.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
class Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Firstclasslettersignedfor | ||
extends Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Abstract { | ||
|
||
protected function getRates() { | ||
$helper = Mage::helper('royalmail'); | ||
$rates = $this->_loadCsv('firstclass_letter_signedfor'); | ||
|
||
if ($helper->getWorldZone($this->_getCountry()) == Meanbee_Royalmail_Helper_Data::WORLD_ZONE_GB) { | ||
return $rates; | ||
} | ||
|
||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...mmunity/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail/Internationallettereconomy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Meanbee | ||
* @package Meanbee_Royalmail | ||
* @copyright Copyright (c) 2014 Meanbee Internet Solutions (http://www.meanbee.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
class Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Internationallettereconomy | ||
extends Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Abstract { | ||
|
||
public function getRates() { | ||
$helper = Mage::helper('royalmail'); | ||
if ($helper->getWorldZone($this->_getCountry()) !== Meanbee_Royalmail_Helper_Data::WORLD_ZONE_GB) { | ||
return $this->_loadCsv('internationalltettereconomy'); | ||
} | ||
return null; | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
...ommunity/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail/Internationallettersigned.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
/** | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Meanbee | ||
* @package Meanbee_Royalmail | ||
* @copyright Copyright (c) 2014 Meanbee Internet Solutions (http://www.meanbee.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
class Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Internationallettersigned | ||
extends Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Abstract { | ||
|
||
protected $insureOver = 50; | ||
protected $additionalInsuranceChargeEu = 2.50; | ||
protected $additionalInsuranceChargeNonEu = 2.50; | ||
protected $additionalInsuranceChargeWz1 = 2.50; | ||
protected $additionalInsuranceChargeWz2 = 2.50; | ||
|
||
public function getRates() { | ||
$_helper = Mage::helper('royalmail'); | ||
$country = $this->_getCountry(); | ||
$worldZone = $_helper->getWorldZone($country); | ||
|
||
|
||
if (!$_helper->isCountryAvailableForInternationalSigned($country)) { | ||
return null; | ||
} | ||
|
||
|
||
switch($worldZone) { | ||
case Meanbee_Royalmail_Helper_Data::WORLD_ZONE_GB: | ||
return null; | ||
case Meanbee_Royalmail_Helper_Data::WORLD_ZONE_EU: | ||
$rates = $_helper->addInsuranceCharges( | ||
$this->_getEuRates(), | ||
$this->additionalInsuranceChargeEu, | ||
$this->getCartTotal(), | ||
$this->insureOver | ||
); | ||
break; | ||
case Meanbee_Royalmail_Helper_Data::WORLD_ZONE_ONE: | ||
$rates = $_helper->addInsuranceCharges( | ||
$this->_getWzRates(), | ||
$this->additionalInsuranceChargeWz1, | ||
$this->getCartTotal(), | ||
$this->insureOver | ||
); | ||
break; | ||
case Meanbee_Royalmail_Helper_Data::WORLD_ZONE_TWO: | ||
$rates = $_helper->addInsuranceCharges( | ||
$this->_getWzRates(), | ||
$this->additionalInsuranceChargeWz2, | ||
$this->getCartTotal(), | ||
$this->insureOver | ||
); | ||
break; | ||
default: | ||
return null; | ||
} | ||
return $rates; | ||
} | ||
|
||
protected function _getEuRates() { | ||
return $this->_loadCsv('internationallettersigned_eu'); | ||
} | ||
|
||
protected function _getWzRates() { | ||
return $this->_loadCsv('internationallettersigned_wz'); | ||
} | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
...munity/Meanbee/Royalmail/Model/Shipping/Carrier/Royalmail/Internationalletterstandard.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Meanbee | ||
* @package Meanbee_Royalmail | ||
* @copyright Copyright (c) 2014 Meanbee Internet Solutions (http://www.meanbee.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
class Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Internationalletterstandard | ||
extends Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail_Abstract { | ||
|
||
|
||
public function getRates() { | ||
$_helper = Mage::helper('royalmail'); | ||
$country = $this->_getCountry(); | ||
$worldZone = $_helper->getWorldZone($country); | ||
|
||
|
||
switch($worldZone) { | ||
case Meanbee_Royalmail_Helper_Data::WORLD_ZONE_GB: | ||
return null; | ||
case Meanbee_Royalmail_Helper_Data::WORLD_ZONE_EU: | ||
$rates = $this->_getEuropeRates(); | ||
break; | ||
case Meanbee_Royalmail_Helper_Data::WORLD_ZONE_ONE: | ||
case Meanbee_Royalmail_Helper_Data::WORLD_ZONE_TWO: | ||
$rates = $this->_getWzRates(); | ||
break; | ||
default: | ||
return null; | ||
} | ||
return $rates; | ||
} | ||
|
||
protected function _getEuropeRates() { | ||
return $this->_loadCsv('internationalletterstandard_eu'); | ||
} | ||
|
||
protected function _getWzRates() { | ||
return $this->_loadCsv('internationalletterstandard_wz'); | ||
} | ||
|
||
} |
Oops, something went wrong.