Difference between revisions of "X-Cart:Canada Post"
(→Troubleshooting) |
m (→Setting up Canada Post real-time shipping calculator) |
||
(19 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | ==Setting up Canada Post real-time shipping calculator | + | ==Setting up Canada Post real-time shipping calculator== |
− | To set up shipping cost calculation through 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 | + | 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. | + | 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. | 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== | ==Troubleshooting== | ||
Line 40: | Line 68: | ||
To fix this issue contact your hosting support or the server admins, and ask them to allow outgoing connections via port 30000. | To fix this issue contact your hosting support or the server admins, and ask them to allow outgoing connections via port 30000. | ||
+ | <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: | ||
+ | |||
+ | :http://yourwebsite.com/test_connection_to_canadapost.php | ||
+ | |||
+ | == See also: == | ||
+ | |||
+ | * [[X-Cart:Setting_Up_Dimensional_Shipping|Setting up Dimensional Shipping]] | ||
+ | |||
+ | [[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]] | ||
− | |||
[[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
Contents
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).
- 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:
The 'Add/remove real-time shipping methods' page opens:
On this page, click the [+] Canada Post link to expand the list of available Canada Post shipping methods:
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:
- X-Cart versions 4.6.0 and earlier: In the 'Real-time calculated shipping methods' section, click the [+] Canada Post link:
The list of available Canada Post methods will be expanded:
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:
-
- 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:
-
- 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.
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
- 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: