Magento 2 Canada Post Shipping

Table of Content

1.    Extension Installation Guide

2.    Shipping Origin Settings

3.    Configuration

4.    Adding Shipping Rates for Products

5.    Canada Post Shipping in Frontend

6.    Canada Post Shipping Details in Sales Order View Backend

7.    Canada Post Shipping for Backend Orders

8.    Shipment Generation process

9.    Canada Post Shipping Details in Shipment View in Backend

10.  Canada Post Manifest

1. Extension Installation

For Magento Marketplace Customers:

Find the extension’s Composer name and version in its composer.json file.

  • Login to your SSH and run:
    • composer require meetanshi/magento2-canada-post-shipping --ignore-platform-reqs
  • Enter your authentication keys. Your public key is your username; your private key is your password.
  • Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
  • To verify that the extension is installed properly, run the command:
    • php bin/magento module:status Meetanshi_Canadapost
  • By default, the extension is probably disabled. Enable the extension and clear static view files:
    • php bin/magento module:enable Meetanshi_Canadapost --clear-static-content
    • php bin/magento setup:upgrade
    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
    • php bin/magento cache:flush

For Meetanshi Customers:

  • Download the extension zip file and extract it to your Magento’s root directory.
  • Login to your SSH and run the below commands step by step:
    • php bin/magento setup:upgrade
    • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
    • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
    • php bin/magento cache:flush

2. Shipping Origin Settings

Before the extension configuration, go to Stores > Configuration > Sales > Shipping Settings and configure shipping origin settings under the “Origin” option. As the extension works only with the Canada origin, make sure that your country and related settings are from the Canada only.

3. Configuration

For configuring the extension, login to Magento 2, move to Sales > Shipping Methods > Canada Post Shipping > Meetanshi where you can find various settings to enable the extension.

  • Enabled: Enable or disable the extension from here.

  • Title: Input the title for Canada Post Shipping to show on the front end.

  • Show Estimated Delivery Time: Set “YES” to show estimated delivery time in frontend.

  • Delivery Time Offset: Add days to show the estimated delivery date.

  • Sandbox Mode: Set “YES” to enable sandbox mode.

  • Rate Type: Set the rate type.

  • Locale: Select the language preference.

  • API User ID: Enter the API User ID provided by Canada Post while API registration.

  • API Password: Enter the API Password provided by Canada Post while API registration.

  • Client Number: Enter the Client number provided by Canada Post while API registration.

  • Contract ID: Enter the unique identifier of your customer account that is called contract ID.

  • Method of Payment: Select the most appropriate payment method from the below options that will be charged for the shipping services.

    • Credit Card

    • Account

    • Supplier Account

  • Transmit Shipment: Set Yes if you want to transmit shipment information to Canada post.

  • Weight: Set the weight unit of your products in order to calculate shipping rates.

  • Max Package Weight: Set the package weight by entering the maximum weight here.

  • Default Length: Enter the default length of the package in centimetres to calculate rates.

  • Default Width: Enter the default width of the package in centimetres to calculate rates.

  • Default Height: Enter the default height of the package in centimetres to calculate rates.

  • Handling Fee: Input the handling fees to charge the order.

  • Allowed Methods: Select the allowed methods for Canada Post Shipping from the list.

  • Free Shipping with Minimum Order Amount: Enable for Free shipping with minimum order amount.

  • Minimum Order Amount for Free Shipping: Input the minimum amount of order for free shipping.

  • Free Method for Canada: Select the free method for Canada

  • Free Method for US: Select the free method for US.

  • Free Method for International: Select the free method available internationally.

  • Displayed Error Message: Input the error message to display for shipping unavailability.

  • Ship to applicable countries: Select the countries you want to enable Canada Post Shipping for.

  • Show Method if Not Applicable: Set YES to show the shipping method even if it’s not applicable.

  • Sort Order: Add sort order for the display of Shipping Method.

  • Show Method only for Admin: Enable shipping method for admin only.

  • Print Output Format: Select the most appropriate format for the shipping label from the below two options:

    •  4x6 Thermal

    • 8.5x11 Paper

  •  Debug Log: Set Yes to enable the debug log.

  • Notification Settings:

Please configure the various notification options upon shipment of a parcel, including the following:

  • Notification On Shipment: If you want to receive an email notification upon the shipment of a parcel, please set the option to "Yes".

  • Notification On Exception: If you want to receive an email notification any exception, please set the option to "Yes".

  • Notification On Delivery: If you want to receive an email notification upon the delivery of a parcel, please set the option to "Yes".

  • Preference Setting:

Please configure the various preference setting options that you want to display on Shipping label, including the following:

  • Show Packing Instructions: If you want to display packing instructions on the shipping label, set this option to "Yes".

  • Show Postage Rate: If you want to display postage rate on the shipping label, set this option to "Yes".

  • Show Insured Value: It refers to displaying the declared value of the shipment that is insured against loss or damage during transit. If you want to render the insured value on the shipping label, set this option to “Yes”.

  • References Settings:

Configure the various options that provide additional information that can help identify or track shipments.

  • Cost Centre: This value typically refers to an internal code or identifier used by a company to track shipping expenses related to different departments, projects, or cost centres within the organization.

    • Enter the cost centre value here to generate on your invoice and, the same will be used in the PosteCS secure email that we will use to send your invoice.

  • Customer Reference One:  This value is typically used to provide additional information that can help identify or track shipments.

    • The entered value here will be displayed on the shipping label, in Track and – for customers who subscribe to the automated parcel tracking service.

  • Customer Reference Two: It is an additional field that allows you to include supplementary reference information that can help track and identify shipments.

    • The entered value here will be displayed on the shipping label, in Track and – for customers who subscribe to the automated parcel tracking service.

  • Return Label Setting:

This refers to the configuration options related to generating and handling return shipping labels. Return labels are used for sending items back to the original sender, often for returns or exchanges.

  • Return Label: Enable this option to generate return labels.

  • Service Code: Based on your preferred shipping method, select the appropriate service code.

  • Name: Enter the name that should be included with a return label.

  • Company: Enter the company name that should be included with a return label.

  • Address One: Enter the address that should be included with a return label.

  • Address Two: Enter the address two that should be included with a return label.

  • Address City: Enter the city that should be included with a return label.

  • Address State: Enter the state that should be included with a return label.

  • Address Zip Code: Enter the zip code that should be included with a return label.

  • Notification Email: Enter the email address to which an on-delivery notification will be sent when the return shipment is delivered.

  • Manifest Address Setting:

You can configure various options related to the generation and management of shipping manifests. All the options are explained below:

  • Name: Enter the company name to be entered in the shipping manifest.

  • Phone Number: Enter the phone number to be entered in the shipping manifest.

  • Address One: Enter the address one to be entered in the shipping manifest.

  • Address Two: Enter the address two to be entered in the shipping manifest.

  • Address City: Enter the city of the address to be entered in the shipping manifest.

  • Address State: Enter the state to be entered in the shipping manifest.

  • Address Zip Code: Enter the zip code to be entered in the shipping manifest.

4. Adding Shipping Rates for Products

To set the individual package dimensions for each product, go to Catalog > Products and select the product for which you want to set the package dimensions. Edit it and you can find the “Canada Post Dimension” tab to set the package dimensions for the product. Enter height, length and width of the package of the product in centimetres.

5. Canada Post Shipping in Frontend

Once you have configured the extension successfully, when users add the products to cart, select the destination, all the available Canada post shipping methods get displayed with the shipping rates. The user can choose once of the shipping methods to continue to the checkout.

  • Canada Post Shipping on Cart Page

  • Canada Post Shipping on Checkout Page

  • Canada Post Shipping Details in Customer’s “My Account” Section
    Once the order is placed using the Canada Post shipping method, the user can see Canada Post shipping details under the “My Orders” tab of the customer’s My Account section.

6. Canada Post Shipping Details in Sales Order View Backend

Apart from the frontend, the admin can see Canada Post shipping details from the Sales > Orders > Order view section in the backend.

7. Canada Post Shipping for Backend Orders

The extension also facilitates to create an order from the backend using Canada post shipping method. Once the admin adds products, selects the address, the available Canada post shipping methods seen enabled to choose one from.

8. Shipment Generation process

While the shipment generation, it is necessary to select “Create Shipping label” checkbox to take an advantage of further feature of the module like shipping label generation.

Once you click on the "Submit Shipment" button, it will redirect you to create shipping labels for packages by adding an appropriate product to it. Also, you will need to add the required height, width and length of the package from there.

9. Canada Post Shipping Details in Shipment View in Backend

Once the shipment gets generated, the extension facilitates the option to create shipping label, print shipping label and show packages. The admin can view these options from the order view> generated shipment grid > View option.

  • Print Shipping Label:

You can print shipping label by clicking on the “Print Shipping Label” button in the shipment view option.

  • Show Packages

Once the shipment is generated and the package has been created, you can print the package slip from this option and it will look as shown in the screenshot:

10. Canada Post Manifest

Canada Post manifest can be viewed from Meetanshi Canada Post > Manifest option. You will see the Manifest grid that will allow you to perform various actions.

 

After the order is placed and the shipment is generated, the entry will arrive in the Manifest grid and from there, you can perform three actions:

  • Transmit Shipment

  • Transmit Shipments Offline

  • Print Manifests Artifact

 

  • Transmit Shipment:

For the selected record, the “Transmit Shipment” will only work if the option of “Transmit Shipment” is set to Yes from the configuration.

Once you click on Transmit Shipment, Manifest ID and the Artifact ID will be added to that record and the status will be changed to the” Completed”.

 

  • Transmit Shipment Offline

Once you perform this action, the record status will be set as “Offline”.

 

  • Print Manifest Artifact

Once you click on "Print Manifest Artifact" option, the PDF of the manifest artifact will be downloaded and will look as shown:

All the details you set in the “Manifest Address Setting” will be displayed here in artifact.