A Drive Delivery Module
Now that we know most of what we need to create standard and payment modules, we must discover how to add a delivery option to PrestaShop programmatically. Here, we will learn how to create a drive delivery module that displays a list of relay points where we can pick up our order, even though anyone can add a carrier with the Back Office (BO) controller responsible for transport management. It will be a great occasion to demonstrate how to create a carrier, handle the delivery price computation, and save and display the chosen relay delivery point for an order.
In creating this module, we will go through the following steps:
- Defining our module design
- Defining a PrestaShop
Carrier
module - Creating our module structure
- Creating a
WHRelayCart
entity to save our chosen relay points - Creating a Carrier programmatically
- Displaying the relay pickup points list during the checkout
- Handling a relay pickup point choice via an Ajax Front...