4

I need to add new packing method one rate in fedex packing serive in magento1. Any suggestion would be appreciated.

I had a reply from fedex saying As per the Developer Resource Guide- To specify FedEx One Rate Pricing Option in the Web Service Transaction, perform the following steps:

  1. Specify the "FEDEX_ONE_RATE" ShipmentSpecialService.

  2. The FedEx Packaging Types that are valid/available with the One Rate pricing option are the following:

    • FEDEX_ENVELOPE
    • FEDEX_SMALL_BOX
    • FEDEX_MEDIUM_BOX
    • FEDEX_LARGE_BOX
    • FEDEX_EXTRA_LARGE_BOX
    • FEDEX_PAK
    • FEDEX_TUBE
  3. Specify a U.S. origin and a U.S. destination.

Note: Intra-Hawaii shipments are not allowed for One Rate pricing.

  1. Specify one of the following FedEx Express services:

    • FIRST_OVERNIGHT
    • PRIORITY_OVERNIGHT
    • STANDARD_OVERNIGHT
    • 2_DAY
    • 2_DAY_AM
    • EXPRESS_SAVER

Note: Web Services clients can request both One Rate and weight-based (non-One Rate) rates in a single RateRequest by specifying "FEDEX_ONE_RATE" as a ServiceOptionType in the RateRequest.variableOptions.

1

As I understood you need to add custom container type for that you need to rewrite Mage_Usa_Model_Shipping_Carrier_Fedex in your module.

I am mentioning changes that you need to done after rewrite:

 protected $_customizableContainerTypes = array('YOUR_PACKAGING',
                                                'one_rate');

Need to update following portion in getcode() method:

'packaging' => array(
    'FEDEX_ENVELOPE' => Mage::helper('usa')->__('FedEx Envelope'),
    'FEDEX_PAK'      => Mage::helper('usa')->__('FedEx Pak'),
    'FEDEX_BOX'      => Mage::helper('usa')->__('FedEx Box'),
    'FEDEX_TUBE'     => Mage::helper('usa')->__('FedEx Tube'),
    'FEDEX_10KG_BOX' => Mage::helper('usa')->__('FedEx 10kg Box'),
    'FEDEX_25KG_BOX' => Mage::helper('usa')->__('FedEx 25kg Box'),
    'YOUR_PACKAGING' => Mage::helper('usa')->__('Your Packaging'),
    'one_rate' => Mage::helper('usa')->__('one Rate')
),          

'containers' => array('YOUR_PACKAGING','one_rate'),         

After that you need to change getContainerTypes method:

return array('YOUR_PACKAGING' => Mage::helper('usa')->__('Your Packaging'),
                'one_rate' => Mage::helper('usa')->__('one Rate'));

I hope this will help you. Please let me know if you have queries.

  • ok thanks hardik i will check this functionality & whether or not fedex approves it. – Arjun Sep 26 '18 at 7:07
  • It should work fine as we have already implemented this. – Hardik Shah Sep 26 '18 at 7:11
  • Thanks hardik just 1 last advice i need to implement "the One Rate special service to be included in the rate or label request. " <q0:SpecialServicesRequested> <q0:SpecialServiceTypes>FEDEX_ONE_RATE</q0:SpecialServiceTypes> </q0:SpecialServicesRequested> Will the above solution be same. – Arjun Oct 8 '18 at 8:44
  • As I checked it seems to be like above. Please accept the answer if its helpful – Hardik Shah Oct 8 '18 at 10:48
  • I used your code but it doesn't work as i expected. I have updated my question would like to know if i m going in right direction. If there is any module that you can suggest it would be grateful – Arjun Oct 9 '18 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.