Skip to content

Commit

Permalink
Mage_Usa: added "USPS Ground Advantage" and removed "First Class Pack…
Browse files Browse the repository at this point in the history
…age" (OpenMage#3413)
  • Loading branch information
fballiano authored Aug 29, 2023
1 parent b569b88 commit 621f21f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ public function getCode($type, $code = '')
'0_FCLE' => Mage::helper('usa')->__('First-Class Mail Large Envelope'),
'0_FCL' => Mage::helper('usa')->__('First-Class Mail Letter'),
'0_FCSL' => Mage::helper('usa')->__('First-Class Mail Stamped Letter'),
'0_FCP' => Mage::helper('usa')->__('First-Class Package Service - Retail'),
'0_FCPC' => Mage::helper('usa')->__('First-Class Mail Postcards'),
'1' => Mage::helper('usa')->__('Priority Mail'),
'2' => Mage::helper('usa')->__('Priority Mail Express Hold For Pickup'),
Expand Down Expand Up @@ -569,7 +568,6 @@ public function getCode($type, $code = '')
'57' => Mage::helper('usa')->__('Priority Mail Express Sunday/Holiday Delivery Flat Rate Boxes'),
'58' => Mage::helper('usa')->__('Priority Mail Regional Rate Box C'),
'59' => Mage::helper('usa')->__('Priority Mail Regional Rate Box C Hold For Pickup'),
'61' => Mage::helper('usa')->__('First-Class Package Service'),
'62' => Mage::helper('usa')->__('Priority Mail Express Padded Flat Rate Envelope'),
'63' => Mage::helper('usa')->__('Priority Mail Express Padded Flat Rate Envelope Hold For Pickup'),
'64' => Mage::helper('usa')->__('Priority Mail Express Sunday/Holiday Delivery Padded Flat Rate Envelope'),
Expand Down Expand Up @@ -599,13 +597,13 @@ public function getCode($type, $code = '')
'INT_24' => Mage::helper('usa')->__('Priority Mail International DVD Flat Rate priced box'),
'INT_25' => Mage::helper('usa')->__('Priority Mail International Large Video Flat Rate priced box'),
'INT_27' => Mage::helper('usa')->__('Priority Mail Express International Padded Flat Rate Envelope'),
'1058' => Mage::helper('usa')->__('USPS Ground Advantage'),
],

'service_to_code' => [
'0_FCLE' => 'First Class',
'0_FCL' => 'First Class',
'0_FCSL' => 'First Class',
'0_FCP' => 'First Class',
'0_FCPC' => 'First Class',
'1' => 'Priority',
'2' => 'Priority Express',
Expand Down Expand Up @@ -648,7 +646,6 @@ public function getCode($type, $code = '')
'57' => 'Priority Express',
'58' => 'Priority',
'59' => 'Priority',
'61' => 'First Class',
'62' => 'Priority Express',
'63' => 'Priority Express',
'64' => 'Priority Express',
Expand Down Expand Up @@ -678,6 +675,7 @@ public function getCode($type, $code = '')
'INT_24' => 'Priority',
'INT_25' => 'Priority',
'INT_27' => 'Priority Express',
'1058' => 'Ground Advantage',
],

// Added because USPS has different services but with same CLASSID value, which is "0"
Expand All @@ -686,7 +684,6 @@ public function getCode($type, $code = '')
'First-Class Mail Letter' => '0_FCL',
'First-Class Mail Stamped Letter' => '0_FCSL',
'First-Class Mail Metered Letter' => '72',
'First-Class Package Service - Retail' => '0_FCP',
],

'first_class_mail_type' => [
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Usa/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<usps>
<active>0</active>
<sallowspecific>0</sallowspecific>
<allowed_methods>0_FCLE,0_FCL,0_FCSL,0_FCP,0_FCPC,1,2,3,4,6,7,13,15,16,17,22,23,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,53,57,58,59,61,62,63,64,72,INT_1,INT_2,INT_4,INT_5,INT_6,INT_7,INT_8,INT_9,INT_10,INT_11,INT_12,INT_13,INT_14,INT_15,INT_16,INT_17,INT_18,INT_19,INT_20,INT_21,INT_22,INT_23,INT_24,INT_25,INT_27</allowed_methods>
<allowed_methods>0_FCLE,0_FCL,0_FCSL,0_FCPC,1,2,3,4,6,7,13,15,16,17,22,23,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,53,57,58,59,62,63,64,72,INT_1,INT_2,INT_4,INT_5,INT_6,INT_7,INT_8,INT_9,INT_10,INT_11,INT_12,INT_13,INT_14,INT_15,INT_16,INT_17,INT_18,INT_19,INT_20,INT_21,INT_22,INT_23,INT_24,INT_25,INT_27,1058</allowed_methods>
<container>VARIABLE</container>
<cutoff_cost/>
<free_method/>
Expand Down

0 comments on commit 621f21f

Please sign in to comment.