Difference between revisions of "X-Cart:Canada Post"

From X-Cart 4 Classic
Jump to: navigation, search
(Created page with 'To set up shipping cost calculation through Canada Post real-time shipping calculator, follow these steps: 1. If you haven't yet done so, provide your own company address in the…')
 
m (Setting up Canada Post real-time shipping calculator)
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
To set up shipping cost calculation through Canada Post real-time shipping calculator, follow these steps:
+
==Setting up Canada Post real-time shipping calculator==
  
1. If you haven't yet done so, provide your own company address in the '<u>General settings->Company options</u>' section. Make sure you provide this address correctly - it will be submitted to the real-time shipping calculator as the origin address for all shipments from your store and thus will affect the shipping rates.
+
'''To set up shipping cost calculation through Canada Post real-time shipping calculator:'''
 +
 
 +
1. If you haven't yet done so, provide your company address in the '<u>General settings->Company options</u>' section. Make sure you provide this address correctly - it will be submitted to the real-time shipping calculator as the origin address for all shipments from your store and thus will affect the shipping rates.
  
 
2. Obtain an account with Canada Post (Sign up at [http://www.canadapost.ca/ http://www.canadapost.ca/]).
 
2. Obtain an account with Canada Post (Sign up at [http://www.canadapost.ca/ http://www.canadapost.ca/]).
  
3. Enable your store to use the real-time shipping calculator provided by Canada Post:
+
3. In your store's Admin area, go to the '<u>General settings->Shipping options</u>' page and enable Canada Post:
 +
:* Select the check box '''Enable real-time shipping calculation'''.
 +
:* Make sure the check box '''Use InterShipper calculation service''' is not selected.
 +
:* In the '''CanadaPost API Key''' subsection, provide the following information:
 +
:: ''X-Cart v4.6 and later:''
 +
::* '''The below API Key is for:''' Select ''Development'' or ''Production'' based on whether you will be using Canada Post in Development or Production mode. Depending on your selection, you will be supposed to enter the respective type of API key in the fields below.
 +
::* '''CanadaPost username''' and '''CanadaPost password''': Enter the API key you obtained from [https://www.canadapost.ca/cpotools/apps/drc/home?execution=e1s1 Canada Post]. To learn about API keys, [http://www.canadapost.ca/cpo/mc/personal/support/helpcentre/commercial_services/developer_program/api_keys.jsf click here].
 +
:: ''Earlier X-Cart versions:''
 +
::* '''CanadaPost merchant ID:''' Enter the merchant ID you obtained from Canada Post.
 +
 
 +
4. Adjust Canada Post options:
 +
 
 +
:a. Go to the '<u>Shipping methods</u>' page of your store's Admin area (<u>Shipping and Taxes menu->Shipping methods</u>).<br />[[File:Shipping_methods.png]]
 +
 
 +
:b. ''X-Cart versions 4.6.1 and later'': In the 'Real-time calculated shipping methods' section, click the button '''Add/remove real-time shipping methods''':<br />[[File:Add_remove_ship_methods.png|border]]<br />The '<u>Add/remove real-time shipping methods</u>' page opens:<br />[[File:Add_remove_ship_meth_page.png|border]]<br />On this page, click the <u>[+] Canada Post</u> link to expand the list of available Canada Post shipping methods:<br />[[File:Canada_Post_methods1.png]]<br />Enable the methods you are going to use (Select the respective check boxes and click '''Apply changes''').<br />After this you will be redirected back to the '<u>Shipping methods</u>' page where you will see the <u>[+] Canada Post</u> item added to the 'Real-time calculated shipping methods' section:<br />[[File:Canada_Post_opts_link.png|border]]
 +
 
 +
:''X-Cart versions 4.6.0 and earlier'': In the 'Real-time calculated shipping methods' section, click the <u>[+] Canada Post</u> link:<br />[[File:Shipping_meth.png|border]]<br />The list of available Canada Post methods will be expanded:<br />[[File:Canada_Post_methods.png|border]]<br />Disable the methods you are not going to use (Unselect the respective check boxes in the 'Active' column). Click the <u>[-] Canada Post</u> link; the list of Canada Post methods will be collapsed.
 +
 
 +
:c. Click the <u>Options >></u> link opposite the <u>[+] Canada Post</u> item. The 'Canada Post options' page opens.
 +
 
 +
:d. Adjust the settings on the 'Canada Post options' page.
 +
:e. Click the '''Apply''' button.
 +
 
 +
That is all. Now you can test whether your store can receive real-time shipping rates correctly. For details, see [[X-Cart:Testing Your Store's Ability to Receive Real-time Shipping Rates]] page.
 +
 
 +
 
 +
'''Notes on Canada Post options for X-Cart 4.6.1 and later:'''
 +
:: [[File:CanadaPost_opts461.png|border]]
 +
:* '''Your Canada Post commercial customer number''': Your Canada Post commercial customer number. This value is required.
 +
:* '''Your contract number (This must be provided for commercial (contracted) rates, if exists. Leave empty for non-contract rates)''': Your contract number.
 +
:* '''[https://www.canadapost.ca/cpo/mc/business/productsservices/developers/services/rating/getrates/default.jsf Quote type]''': Choose "commercial" to get contracted rates (as contracted between you and Canada Post). Choose "counter" to get rates you'd get over the counter (without a customer or contract number).
 +
 
 +
'''Notes on Canada Post options for X-Cart 4.6:'''
 +
:: [[File:CanadaPost_opts.png|border]]
 +
:* '''The customer number of the owner of the mail (mailed on behalf of customer). (up to 10 digits)(required)''': Your Canada Post commercial customer number. This value is required. '''Important''': The customer number must be entered without the leading zeros. For example, if the Customer Number in your Canada Post account says "0001234567", you must enter just "1234567".
 +
:* '''Omit the element for non-contract rates or provide the contract number for commercial (contracted) rates. (up to 10 digits)(optional)''': Your contract number. This must be provided for commercial (contracted) rates, if exists. Leave empty for non-contract rates.
 +
:* '''Either commercial or counter. (quote-type)''': Choose "commercial" to get contracted rates (as contracted between you and Canada Post). Choose "counter" to get rates you'd get over the counter (without a customer or contract number).
 +
 
 +
== Shipping in multiple packages ==
 +
X-Cart now provides a packaging algorithm that allows splitting an entire purchase into multiple packages that fit certain limitations (maximum package weight and dimensions). This algorithm allows to get real-time shipping rates even when the cart contains a large quantity of products with the total weight and dimensions exceeding the values allowed for a single package.
 +
 
 +
With the [[X-Cart:Setting_Up_Dimensional_Shipping|Dimensional Shipping]] feature, you can specify dimensions for each product you have got at your store (See the <u>Product details</u>  page) and use those dimensions for calculating shipping rates using the on-line shipping rate calculation service.
 +
 
 +
For more information, please refer to [[X-Cart:Setting_Up_Dimensional_Shipping|Setting Up Dimensional Shipping]].
 +
 
 +
{{Note|When using the '''Ship in a separate box''' option for products, make sure that the '''Split the shipment into multiple packages if its weight/dimensions exceed the limitations''' option is enabled.}}
 +
 
 +
==Troubleshooting==
 +
 
 +
<u>Problem:</u>
 +
 
 +
When testing real-time shipping rates calculation, I am getting the following error from Canada Post:
 +
 
 +
<pre>X-Cart HTTPS: libcurl error(7): couldn't connect to host</pre>
 +
 
 +
<u>Solution:</u>
 +
 
 +
To get the Canada Post rates, X-Cart sends requests from your server to sellonline.canadapost.ca (Canada Post's server) via port 30000. If outgoing connections via port 30000 are not allowed on your server, it will cause the error in question.
  
:a. In your store's Admin area, go to the '<u>General settings->Shipping options</u>' section.
+
To fix this issue contact your hosting support or the server admins, and ask them to allow outgoing connections via port 30000.
:b. On the '<u>General settings->Shipping options</u>' page, select the check box '<u>Enable real-time shipping calculation</u>'. Unselect the check box '<u>Use Intershipper calculation service</u>'.
 
:c. Use the '<u>Canada Post account details</u>' subsection of '<u>General settings->Shipping options</u>' page to provide the required information.
 
  
4. Adjust Canada Post options:
+
<u>Script to test connection to Canada Post's server via port 30000</u>
 +
 
 +
# Download the [[File:Test_connection_to_canadapost.php.txt]], save the downloaded file as 'test_connection_to_canadapost.php'.
 +
# Upload test_connection_to_canadapost.php to your web server's document root.
 +
# Use the following URL to test:
  
:a. Go to the '<u>Shipping methods</u>' section of your store's Admin area (<u>Settings menu->Shipping methods</u>).
+
:http://yourwebsite.com/test_connection_to_canadapost.php
:b. Find Canada Post in the list of real-time shipping methods and click the Options >> link opposite it. A dialog box with Canada Post options opens.
 
  
<div align="center">[[Image:canadapost_opts.gif|559px]]
+
== See also: ==
</div>
 
  
:c. Adjust the options according to your preferences.
+
* [[X-Cart:Setting_Up_Dimensional_Shipping|Setting up Dimensional Shipping]]
:d. Click the '''Apply''' button.
 
  
That is all. Now you can test whether your store can receive real-time shipping rates correctly. For details, see the chapter 'Testing your store's ability to receive real-time shipping rates' further in this manual.
+
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]
 +
[[Category:X-Cart user manual]]

Latest revision as of 07:03, 30 September 2013

Setting up Canada Post real-time shipping calculator

To set up shipping cost calculation through Canada Post real-time shipping calculator:

1. If you haven't yet done so, provide your company address in the 'General settings->Company options' section. Make sure you provide this address correctly - it will be submitted to the real-time shipping calculator as the origin address for all shipments from your store and thus will affect the shipping rates.

2. Obtain an account with Canada Post (Sign up at http://www.canadapost.ca/).

3. In your store's Admin area, go to the 'General settings->Shipping options' page and enable Canada Post:

  • Select the check box Enable real-time shipping calculation.
  • Make sure the check box Use InterShipper calculation service is not selected.
  • In the CanadaPost API Key subsection, provide the following information:
X-Cart v4.6 and later:
  • The below API Key is for: Select Development or Production based on whether you will be using Canada Post in Development or Production mode. Depending on your selection, you will be supposed to enter the respective type of API key in the fields below.
  • CanadaPost username and CanadaPost password: Enter the API key you obtained from Canada Post. To learn about API keys, click here.
Earlier X-Cart versions:
  • CanadaPost merchant ID: Enter the merchant ID you obtained from Canada Post.

4. Adjust Canada Post options:

a. Go to the 'Shipping methods' page of your store's Admin area (Shipping and Taxes menu->Shipping methods).
Shipping methods.png
b. X-Cart versions 4.6.1 and later: In the 'Real-time calculated shipping methods' section, click the button Add/remove real-time shipping methods:
Add remove ship methods.png
The 'Add/remove real-time shipping methods' page opens:
Add remove ship meth page.png
On this page, click the [+] Canada Post link to expand the list of available Canada Post shipping methods:
Canada Post methods1.png
Enable the methods you are going to use (Select the respective check boxes and click Apply changes).
After this you will be redirected back to the 'Shipping methods' page where you will see the [+] Canada Post item added to the 'Real-time calculated shipping methods' section:
Canada Post opts link.png
X-Cart versions 4.6.0 and earlier: In the 'Real-time calculated shipping methods' section, click the [+] Canada Post link:
Shipping meth.png
The list of available Canada Post methods will be expanded:
Canada Post methods.png
Disable the methods you are not going to use (Unselect the respective check boxes in the 'Active' column). Click the [-] Canada Post link; the list of Canada Post methods will be collapsed.
c. Click the Options >> link opposite the [+] Canada Post item. The 'Canada Post options' page opens.
d. Adjust the settings on the 'Canada Post options' page.
e. Click the Apply button.

That is all. Now you can test whether your store can receive real-time shipping rates correctly. For details, see X-Cart:Testing Your Store's Ability to Receive Real-time Shipping Rates page.


Notes on Canada Post options for X-Cart 4.6.1 and later:

CanadaPost opts461.png
  • Your Canada Post commercial customer number: Your Canada Post commercial customer number. This value is required.
  • Your contract number (This must be provided for commercial (contracted) rates, if exists. Leave empty for non-contract rates): Your contract number.
  • Quote type: Choose "commercial" to get contracted rates (as contracted between you and Canada Post). Choose "counter" to get rates you'd get over the counter (without a customer or contract number).

Notes on Canada Post options for X-Cart 4.6:

CanadaPost opts.png
  • The customer number of the owner of the mail (mailed on behalf of customer). (up to 10 digits)(required): Your Canada Post commercial customer number. This value is required. Important: The customer number must be entered without the leading zeros. For example, if the Customer Number in your Canada Post account says "0001234567", you must enter just "1234567".
  • Omit the element for non-contract rates or provide the contract number for commercial (contracted) rates. (up to 10 digits)(optional): Your contract number. This must be provided for commercial (contracted) rates, if exists. Leave empty for non-contract rates.
  • Either commercial or counter. (quote-type): Choose "commercial" to get contracted rates (as contracted between you and Canada Post). Choose "counter" to get rates you'd get over the counter (without a customer or contract number).

Shipping in multiple packages

X-Cart now provides a packaging algorithm that allows splitting an entire purchase into multiple packages that fit certain limitations (maximum package weight and dimensions). This algorithm allows to get real-time shipping rates even when the cart contains a large quantity of products with the total weight and dimensions exceeding the values allowed for a single package.

With the Dimensional Shipping feature, you can specify dimensions for each product you have got at your store (See the Product details page) and use those dimensions for calculating shipping rates using the on-line shipping rate calculation service.

For more information, please refer to Setting Up Dimensional Shipping.

Note: When using the Ship in a separate box option for products, make sure that the Split the shipment into multiple packages if its weight/dimensions exceed the limitations option is enabled.

Troubleshooting

Problem:

When testing real-time shipping rates calculation, I am getting the following error from Canada Post:

X-Cart HTTPS: libcurl error(7): couldn't connect to host

Solution:

To get the Canada Post rates, X-Cart sends requests from your server to sellonline.canadapost.ca (Canada Post's server) via port 30000. If outgoing connections via port 30000 are not allowed on your server, it will cause the error in question.

To fix this issue contact your hosting support or the server admins, and ask them to allow outgoing connections via port 30000.

Script to test connection to Canada Post's server via port 30000

  1. Download the File:Test connection to canadapost.php.txt, save the downloaded file as 'test_connection_to_canadapost.php'.
  2. Upload test_connection_to_canadapost.php to your web server's document root.
  3. Use the following URL to test:
http://yourwebsite.com/test_connection_to_canadapost.php

See also: