Throughout this chapter we have built a shipment
module with two shipment methods. Each shipment method provided the available delivery options. The flat rate shipment method has only one fixed value under its delivery options, whereas the dynamic rate method gets its values from the getDeliveryOptions
method. We can easily embed a real shipping API as part of getDeliveryOptions
in order to provide truly dynamic shipping options.
Obviously, we lack the official interfaces here, as we did with payment methods. However, this is something we can always come back to and refactor in our application as we finalize the final
module.
Similar to the payment methods, the idea here was to create a minimal structure that showcases how one can develop a simple shipment module for further customization. Using the shipment_methodservice
tag, we effectively exposed the shipment methods for the future sales
module.
Moving forward, in the next chapter, we will build a sales
module, which will finally...