Defining a PrestaShop Carrier module
We will see what a Carrier
module is in the same way that we previously defined what a payment
module was. What’s the difference between a Carrier
module and a Carrier?
In fact, Carrier
is the ObjectModel
representing a shipping option for your shop. We can have 0
to N available Carriers
. A Carrier
will be available depending on the cart weight or price and on the delivery address location. Customer Group
restrictions can also exist. A Carrier module is a module responsible for managing the availability or price of a corresponding linked Carrier
; it adds capacity to it. It’s available as the upper layer of a Carrier
. Be aware that a Carrier module can manage multiple Carriers
.
Concretely, a Carrier
module is a module extending the CarrierModule
class. If you review the /classes/module/CarrierModule.php
file, you will see that it is a child class of Module
, defining two abstract functions:
getOrderShippingCost($params...