3

I'm trying to create my own shipping module where you can customize your shipping option (link to question) and I'm wondering what these functions in Mage_Shipping_Model_Carrier_Abstract do in order to figure out a way to implement customizable shipping options.

  1. What do requestToShipment / returnOfShipment do?
  2. What are containers / container types?
    -> 2.1. What does getCustomizableContainerTypes do / what are customizable containers?
  3. What does the flag fixed mean?
3

It requires kind of studying the code to give a proper answer here. Magento itself gives you access to a couple of shipping methods, but these shipping methods (to my knowledge) don't make use of webservices. The call you refer to are actually meant for exactly that: To make it possible to exchange status updates between the Magento carrier module and the remote shipping API if any. In short: If you don't have your own custom

1) requestToShipment is meant to forward the shipment information to a remote shipment provider and return the result. The result could contain Print Shipping Labels or processing errors generated by the remote API. Likewise the returnOfShipment call is made when an RMA is received in Magento and the remote shipment API needs to handle this accordingly. Both calls hook into the RMA forms provided by Magento. If you don't need those forms or you don't have a remote shipping API to work with, the methods can be left alone.

2) With "containers", Magento really refers to the kind of packaging that is used to send out the products - so translate this directly into the real world: A product is shipped, wrapped in some kind of container (envelop, parcel, wooden box, bubble plastic). One carrier might define different types of containers available for a specific product, so that the customer gets to choose whether the product is wrapped in something, or not. For a good example, check out the Usa/Model/Shipping/Carrier/Usps.php file. The getCustomizableContainerTypes() call is able to define containers that are not predefined by the carrier type itself (so hard-coded) but dynamically (so configured by the customer).

3) The term fixed refers to whether the shipping method has a fixed shipping rate or not. It is used in the internal logic of Magento when Magento needs to generate a list of shipping methods that should have fixed rates only. Nothing more.

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.