Canada Post Shipping PRO (Web Services Version) For Magento

Canada Post Shipping

Web Services Version For Magento

By Deviant Shipping

In 2012 Canada post changed to a new eservices offering, deprecating the "sellonline" service. This module interfaces to that new Canada post shipping service allowing you to add a Canada Post Shipping Method to your Magento Commerce store front.

  • Storage of sellonline information
  • Easy setup process
  • Easy configuration / setup process
  • Ability to define containers, assign a cost and weight per container
  • Ability to ship products as individual items if they do not fit into specified containers
  • An intelligent packing algorithm to quickly pack items inside of containers.
  • Ability to limit shipping services.
  • Ability to specify free shipping service and price.
  • Configurable language English / French to show shipping details (front end only).


To use this module you need to first signup for the venture one program on the canada post website

Prepurchase Steps

  1. You can do so online by navigating to here:
  2. Once signed up you need to get your API keys, go to the menu bar choose Programs, then Developer and sign in.
  3. You API keys are listed at the top. Your customer number is listed under your profile (click My Profile" to see it.
  4. Now add 3 attributes to the default attribute set “package_width” “package_height” “package_depth” (required integer should be in centimeters! )
  5. Add all these attributes to the default attribute set (You may also apply them to existing attribute sets)
  6. Enter values for all products (except your configurable products) you can add to the cart , your weight may be in a different weight unit of measure but it must be convertible to kilograms
  7. Ensure that your PHP supports SOAP, your webhost provider should be able to answer this for you or you can use echo phpinfo(); to check

Installation of Module

  1. Follow this link to pay for and download the module (use a valid email address to receive updates for a year).
  2. Unpack the file
  3. Copy the "app" folder into your magento commerce installation folder.
  4. Log into the administrator section of your website.
  5. Choose System -> Cache Management
  6. (Version 1.5 or newer) Click "Flush Magento Cache", then Select "All" and choose "Refresh" action
  7. Choose System -> Configuration from the top menu
  8. Click on Shipping Methods (left side)
  9. Click on "Canada Post Pro Eshipping" Shipping method
  10. Enter in your API Keys, customer number (See step 3
  11. Enter in your boxes, they should be in the format of {Max container weight}kg,{length}x{width}x{height}x{box weight]kg${extra cost}. For example for a box that holds 5kg of items, weighs .2kg, size is 20x12x15 (in centimeters) and costs $2 to pack and purchase you would enter.
    You may enter as many boxes as you like just separate them by a comma (you can have new lines between each box as well.
  12. Set Production Mode to "yes" to receive accurate quotes.
  13. Click Save Config.
  14. Click on Shipping Settings (left side).
  15. Enter in store address. This will be used for the "from" address
  16. Click on General (left side)
  17. Choose locale you want the module to use.
  18. Check to ensure it is working.

Module configuration options

Option Values (* required) Description

Enabled Yes / No Enabled / Disable module
Sort Order (Numeric) Specify order of shipping methods
Title String Title of shipping method
Show Method if Not Available Yes / No as stated
Displayed Error Message (Text) as Stated

Canada Post Customer Number (text) Given from canada post
API Development Username
(text) Given from canada post
API Development Password (text)* Given from canada post
API Production Username

API Production Password (text) Leave blank to use the stores postal code from “Shipping Settings”
 Production Mode
 (yes / no)
 If yes then quotes are returned in production mode
 Max Items to Quote On  (number)  If specified then if the order exceeds the maximum number of items no quotes are returned.

Shipping Containers
(text) shipping containers  {max weight in box}kg{length}x{width}x{height}x{box weight}kg${cost} comma delimited each group like :
Shipping insurance for full replacement value
(yes / no)
Add shipping insurance for item price
Allowed Methods
Choose allowed shipping methods
Free Method
Choose free shipping method
Free Shipping with minimum order amount
(yes / no)
Choose yes / no to enable free shipping
Minimum order amount for free shipping (text) The minimum price of the order in order to enable free shipping
 Ship as bundled
(yes / no)
When shipping bundled items use bundle for dimensional information
Package Description (text) as stated
Ship to Applicable Countries (text) as stated
Ship to Specific Countries (tex) as stated
Weight Dimensions

Weight multiplier (number) Multiple item weight by this amount to achieve weight in KG’s
Size multiplier (number) Multiple item weight by this amount to achieve the dimension in CM
Linear Dimensions

Width Attribute (text)* The width attribute name
Default width (number) Leave blank to not use, if width is undefined for the product it will use this width
Length Attribute (text)* The length attribute name
Default Length (number) Leave blank to not use, if length is undefined for the product it will use this length
Height Attribute (text)* The height attribute name
Default Height (number) Leave blank to not use, if length is undefined for the product it will use this length
Other Configuration Details

Log Debug (yes / no) Debug request and response information into logging file unde var/logs/ds_canadapost.log
JSON in description (yes / no) Store box, request, response as JSON string inside method description field in the table sales_flat_quote_shipping_rate.method_description
Handling Fees
Note additional handling fees may be setup on the sell online website itself
Calculated Handling Fee
as stated
Handling Applied
as stated
Handling fee (number) as stated
 Handling Fee Fixed  (number)  A fixed handling fee applied on top of the other fees here
Minimum Shipping Cost (number) Minimum amount to charge for shipping
Days for handling Yes/No Number of days before item is sent to canada post to be shipped

Version History
  * 1.4.3 (04-03-2013) Turned WDSL cache off when creating the soap client
  * 1.4.2 (04-03-2013) Updated to version 2 of the web services API
  * 1.4.1 (04-02-2013) Updated dimensional data passing structure
  * 1.4   (01-31-2013) Added support for additional shipping methods
  * 1.3.1 (12-18-2012) Added Ability to ignore postal code with just a . (onestepcheckout does this)
  * 1.3   (12-18-2012) Added getAllowedMethods()
  * 1.2   (12-05-2012) Added contract id.
  * 1.1.2 (11-14-2012) Fixed issue when smaller items to ship run out before larger ones.
  * 1.1.1 (10-14-2012) Fixed issue with default height
  * 1.1 (10-01-2012) Added fixed handling fee, option to return no quotes for large qtys, and error capturing device
  * 0.5 (09-29-2012) Added additional logging.
  * 0.4 (09-28-2012) Update configuration table
  * 0.3 (09-28-2012) Retrieve price from "parent" item if available for insurance, 
                     made insurance check for an amount >0 before adding it.
  * 0.2 (09-28-2012) Feature complete
  * 0.1 (09-27-2012) Bug trip
  * alpha (09-26-2012) Initial tryouts