Delivery module for Canada Post
The module is compatible with Thelia 2.1 and greater. You can use this module if you shipped your parcel from Canada.
You should have an account on Canada Post and register to the Developper Program to get your API keys.
For now, the module is not fully complete and only the Rating web service is integrated. It allows you to display a list of possible Canada Post service that a customer can select if the destination is available. The shipping costs is automatically retrieve from the Canada Post API.
- Copy the module into
<thelia_root>/local/modules/directory and be sure that the name of the module is CanadaPost.
- Activate it in your thelia administration panel
Add it in your main thelia composer.json file
composer require thelia/canada-post-module:~1.0
You need to configure the module. There is a dedicated page for the configuration that you can display from the main modules page in the back office.
You should register on the Canada Post website to get your credentials to access the Canada Post API : https://sso.epost.ca/sso/pfe/ui/registration
Once you have received yous parameters, you can fill up the configuration form. A form is available to test your configuration.
You should also configure the shipping zones that the module could handled. The link to this page is also on the modules page.
Finally, you have to get the list of the services available from Canada Post and select which one is available on your website. The page is accessible from the configuration page of the module. On the configuration page of the services, you have to first get the list of services from Canada Post. A button at the top right of the page will import this list. Once the list is imported, you can customize the title of the service and select if it will be available for the customer with the visible attribute.
This loop is used to get a list of all available services and rates for a specific destination.
|The country code. eg: fr, ca required
|the postal code of the destination. It's required for Canada and USA
|The weight in kg of the order. required
|The name of the service
|The code of the service
|Total cost of the shipment
|Taxes charged for this shipment
|The number of days from drop-off or pickup to 1st delivery attempt.
|The estimated date of delivery, starting from the expected mailing-date.
This loop is used to get a list of all available services. It doesn't directly talk to the Canada Post web service but use the list imported in the back office.
|The id of the service
|Visible service : on, off or \. default: *on**
|The code of the service
|The title of the service
|The order : id, id-reverse, visible, visible-reverse, code, code-reverse, title, title-reverse, chapo, chapo-reverse
|The service id
|The service visibility
|The service code
|The service name
|The service summary
This loop is used to get the detail of the service used for an order.
|The id of the address. This can be used when the order is not placed (cart)
|The id of the order address. When the order is placed
|The id of the Canada Post service
|The address id of the customer (cart)
|The order address id of the customer (order)
|The Canada Post service id