Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/2.7.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Rickard committed Apr 15, 2016
2 parents ecf1de5 + ba64d13 commit cbd5227
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 50 deletions.
8 changes: 4 additions & 4 deletions app/code/community/Meanbee/Royalmail/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ public function _getWeight()

switch ($unit) {
case 'kg':
$weight *= 1000;
// do nothing, as default royalmail value
break;
case 'lb':
$weight *= 453.59237;
$weight *= 0.45359237;
break;
default: // case 'g':
// No need to do anything..
default: // case 'g'
$weight /= 1000;
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,18 @@ public function collectRates(Mage_Shipping_Model_Rate_Request $request)
if (empty($allowedMethods) == false) {

$data = $request->getData();

$dataClass = Mage::helper('royalmail');
$dataClass->setWeightUnit($this->getConfigData('weight_unit'));
$dataClass->setNegativeWeight($removeWeight);
$dataClass->_setWeight($data['package_weight']);

$calculatedMethods = $this->calculateMethodClass->getMethods($data['dest_country_id'],
$data['package_value'], $data['package_weight']);
$data['package_value'], $dataClass->_getWeight());

// Config check to remove small or medium parcel size based on the
// config value set in the admin panel
if ($data['package_weight'] <= 2) {
if ($dataClass->_getWeight() <= 2) {
if (Mage::getStoreConfig('carriers/royalmail/parcel_size') == Meanbee_Royalmail_Model_Parcelsize::SMALL ||
Mage::getStoreConfig('carriers/royalmail/parcel_size') == ""
) {
Expand All @@ -119,10 +125,6 @@ public function collectRates(Mage_Shipping_Model_Rate_Request $request)
foreach ($calculatedMethods as $methodItem) {
if ($allowedMethod[1] == $methodItem->shippingMethodNameClean) {

$dataClass = Mage::helper('royalmail');
$dataClass->setWeightUnit($this->getConfigData('weight_unit'));
$dataClass->setNegativeWeight($removeWeight);

$method = Mage::getModel('shipping/rate_result_method');

$method->setCarrier($this->_code);
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Meanbee/Royalmail/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<config>
<modules>
<Meanbee_Royalmail>
<version>2.7.4</version>
<version>2.7.6</version>
<depends>
<Mage_Shipping />
</depends>
Expand Down
18 changes: 9 additions & 9 deletions lib/Meanbee/RoyalmailPHPLibrary/data/3_deliveryMethodMeta.csv
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ WORLD_ZONE_TWO_INTERNATIONAL_SIGNED_SMALL_PARCEL_EXTRA_INSURANCE,50.01,250,250,"
WORLD_ZONE_TWO_INTERNATIONAL_ECONOMY_LETTER,0,20,20,"International Economy Letter"
WORLD_ZONE_TWO_INTERNATIONAL_ECONOMY_LARGE_LETTER,0,20,20,"International Economy Large Letter"
WORLD_ZONE_TWO_INTERNATIONAL_ECONOMY_SMALL_PARCEL,0,20,20,"International Economy Small Parcel"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_500,0,500,500,"Special Delivery: Guaranteed by 1pm"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_1000,501,1000,1000,"Special Delivery: Guaranteed by 1pm"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_2500,1001,2500,2500,"Special Delivery: Guaranteed by 1pm"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_500,0,500,500,"Special Delivery: Guaranteed by 1pm"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_1000,501,1000,1000,"Special Delivery: Guaranteed by 1pm"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_2500,1001,2500,2500,"Special Delivery: Guaranteed by 1pm"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_50,0,50,50,"Special Delivery: Guaranteed by 9am"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_1000,51,1000,1000,"Special Delivery: Guaranteed by 9am"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_2500,1001,2500,2500,"Special Delivery: Guaranteed by 9am"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_500,0,500,500,"Special Delivery: Guaranteed by 1pm Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_1000,501,1000,1000,"Special Delivery: Guaranteed by 1pm Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_2500,1001,2500,2500,"Special Delivery: Guaranteed by 1pm Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_50,0,50,50,"Special Delivery: Guaranteed by 9am Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_1000,51,1000,1000,"Special Delivery: Guaranteed by 9am Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_2500,1001,2500,2500,"Special Delivery: Guaranteed by 9am Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_500,0,500,500,"Special Delivery: Guaranteed by 1pm Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_1000,501,1000,1000,"Special Delivery: Guaranteed by 1pm Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_2500,1001,2500,2500,"Special Delivery: Guaranteed by 1pm Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_50,0,50,50,"Special Delivery: Guaranteed by 9am Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_1000,51,1000,1000,"Special Delivery: Guaranteed by 9am Saturday"
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_2500,1001,2500,2500,"Special Delivery: Guaranteed by 9am Saturday"
UK_CONFIRMED_ROYAL_MAIL_SIGNED_FOR_FIRST_CLASS_LETTER,0,50,50,"Signed For: First Class Letter"
UK_CONFIRMED_ROYAL_MAIL_SIGNED_FOR_FIRST_CLASS_LARGE_LETTER,0,50,50,"Signed For: First Class Large Letter"
UK_CONFIRMED_ROYAL_MAIL_SIGNED_FOR_FIRST_CLASS_SMALL_PARCEL,0,50,50,"Signed For: First Small Parcel"
Expand Down
60 changes: 30 additions & 30 deletions lib/Meanbee/RoyalmailPHPLibrary/data/4_deliveryToPrice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -396,36 +396,36 @@ UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_2500,0.001,0.100,24.06,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_2500,0.101,0.500,26.46,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_2500,0.501,1.000,28.20,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_2500,1.001,2.000,32.64,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_500,0.001,0.100,10.74,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_500,0.101,0.500,11.70,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_500,0.501,1.000,13.26,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_500,1.001,2.000,16.20,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_500,2.001,10.000,34.92,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_500,10.001,20.000,52.44,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_1000,0.001,0.100,11.94,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_1000,0.101,0.500,12.90,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_1000,0.501,1.000,14.46,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_1000,1.001,2.000,17.40,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_1000,2.001,10.000,36.12,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_1000,10.001,20.000,53.64,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_2500,0.001,0.100,14.34,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_2500,0.101,0.500,15.30,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_2500,0.501,1.000,16.86,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_2500,1.001,2.000,19.80,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_2500,2.001,10.000,38.52,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_1PM_SATURDAY_2500,10.001,20.000,56.04,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_50,0.001,0.100,21.36,50,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_50,0.101,0.500,23.76,50,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_50,0.501,1.000,25.50,50,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_50,1.001,2.000,29.94,50,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_1000,0.001,0.100,23.56,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_1000,0.101,0.500,25.96,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_1000,0.501,1.000,27.70,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_1000,1.001,2.000,32.14,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_2500,0.001,0.100,27.06,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_2500,0.101,0.500,29.46,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_2500,0.501,1.000,31.20,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVER_9AM_SATURDAY_2500,1.001,2.000,35.64,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_500,0.001,0.100,10.74,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_500,0.101,0.500,11.70,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_500,0.501,1.000,13.26,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_500,1.001,2.000,16.20,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_500,2.001,10.000,34.92,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_500,10.001,20.000,52.44,500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_1000,0.001,0.100,11.94,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_1000,0.101,0.500,12.90,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_1000,0.501,1.000,14.46,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_1000,1.001,2.000,17.40,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_1000,2.001,10.000,36.12,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_1000,10.001,20.000,53.64,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_2500,0.001,0.100,14.34,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_2500,0.101,0.500,15.30,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_2500,0.501,1.000,16.86,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_2500,1.001,2.000,19.80,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_2500,2.001,10.000,38.52,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_1PM_SATURDAY_2500,10.001,20.000,56.04,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_50,0.001,0.100,21.36,50,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_50,0.101,0.500,23.76,50,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_50,0.501,1.000,25.50,50,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_50,1.001,2.000,29.94,50,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_1000,0.001,0.100,23.56,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_1000,0.101,0.500,25.96,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_1000,0.501,1.000,27.70,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_1000,1.001,2.000,32.14,1000,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_2500,0.001,0.100,27.06,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_2500,0.101,0.500,29.46,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_2500,0.501,1.000,31.20,2500,
UK_GUARANTEED_ROYAL_MAIL_SPECIAL_DELIVERY_9AM_SATURDAY_2500,1.001,2.000,35.64,2500,
UK_CONFIRMED_ROYAL_MAIL_SIGNED_FOR_FIRST_CLASS_LETTER,0.001,0.100,1.73,50,
UK_CONFIRMED_ROYAL_MAIL_SIGNED_FOR_FIRST_CLASS_LARGE_LETTER,0.001,0.100,2.05,50,
UK_CONFIRMED_ROYAL_MAIL_SIGNED_FOR_FIRST_CLASS_LARGE_LETTER,0.101,0.250,2.36,50,
Expand Down

0 comments on commit cbd5227

Please sign in to comment.