Jump to content
Sign in to follow this  
CatHerder

Canada Post Shipping Module - A How To Guide

Recommended Posts

I thought I'd post this step-by-step "guide" of sorts to save somebody else the hassle or apprehension of doing it himself or herself for the first time since I've had to install it three times today and consider myself an intermediate contribution installer for this one. ;)

 

What to do before installing the Canada Post Shipping Module With Dimensions contribution

 

First, you're going to need to call Canada Post to get an account. (which is/are free)

1-866-511-0546 options: 2 - 2 (at least it was 2, 2 the last two times I called them) they are available from Monday to Friday, 8AM to 8PM EST. You cannot get an account name/password online (so don't waste your time searching the CanadaPost.ca website).

 

You'll then talk to one of the tech people from IBM Canada in Ottawa, they're very helpful and friendly even if most of them have never heard of osCommerce for some reason but don't let that scare you. All you need to request is an account (or accounts if you're doing multiple sites) to access their Canada Post e-commerce shipping servers. (You do not need a VentureOne account; you do not need a Canada Post Distribution Agreement Number; you do not need a Canada Post Customer Number at this point.)

 

You will be set up with a unique username/password based on your business or the business you are making the site for.

 

Numbers to write down / have handy

Test Server IP : 206.191.4.228

Production Server IP : 216.191.36.73

Use common sense and don't do your testing on the production server, it makes them very sad. You will also notice that the production server is considerably faster compared to the test server when you finally go live (bonus).

 

Download the Canada Post Shipping Module With Dimensions from the contributions section.

 

Unpack it; upload it to your server (inside includes/modules/shipping)

Log into your admin section, Modules/Shipping - select Canada Post from the list

Change: Enter Your Canada Post Customer ID from CPC_CANADA_POST

to CPC_WHATEVER_YOUR_USER_NAME_IS (use all CAPS)

Save your settings (don't enable this module yet; make sure it's still a red light in the list)

 

Now, log onto the Canada Post developers website: http://206.191.4.228/NewUser.html

Your username and password provided by Canada Post will be the same until you change your password by logging into this site.

 

Now configure your shipping options/features you want to offer from your store on the Canada Post developers site. This will take you about 30-45 minutes to complete it all (if you are not the business owner, you might not know all of this information so get your contact either on the phone when you need it or on an IM during the process -- most clients won't be able to configure much of this themselves as they will become quickly confused by the terminology).

 

IMPORTANT ITEMS:

 

General Settings:

- Input the Postal Code where packages will ship FROM - if this is wrong your rates will not be correct

- Change Sell Online Status to: Test

 

Password Change: Change your password

 

Everything else is initially not as important as those two fields to get you up and started with testing -- but you must eventually set them all up properly, as once you've finished your testing phase you will have to call Canada Post again (1-866-511-0546) to activate your account to "Production" status.

 

Handling Fee: You can set this on the Canada Post server, or you can handle it within OSCommerce - your choice (be careful you don't double-charge a handling fee)

 

Add/Modify/Delete Boxes: You can set up to 5 different default box sizes and Canada Post will combine your items into whatever (smallest) box your multiple items will fit into when it calculates your shipping charges based on size and weight. (It's pretty common to have only 5 primary box sizes in a warehouse, and Canada Post actually only calculates rates based on 5 box sizes regardless of your actual package dimensions -- so don't sweat it if you have 20 different shipping container sizes.) The tech guy I talked to at IBM said the server knew 5 default sizes anyway so I'm not positive you need to edit this or not (better safe than sorry imho).

 

Note: "Commercial" rates on the Canada Post server assume you have a Venture One card, if you don't you should call Canada Post (or stop by your post office) and apply for one -- it's free and it saves you 10% of most shipping methods (it adds up).

 

Now, once you have it installed, configured, and are ready to test, it is strongly recommended that you use the following link and test each "real world" case example for all your orders to ensure things are set up properly BEFORE using the live server.

Test cases recommended by Canada Post to try BEFORE switching to production server.

 

You should be good to go if your tests appear to be giving you the correct pricing (you can confirm this manually by going to the Canada Post website: http://www.canadapost.ca/business/prodserv/sp/default-e.asp ). Once you're confident that the rates it's returning to your site are correct call Canada Post to get your status changed to "Production" -- you'll now need to go into your admin in OSCommerce (Modules/Shipping/Canada Post) and change the IP to the production server, and go back to the Canada Post site and change your status to Live/EnProduction.

 

Hopefully somebody finds this useful and it helps take the worry off setting up this module for the first time. :)

 

 

Note: You may also want to add the Canada Post Package Tracking contribution to your site as a handy feature for your customers and yourself (it will make your site appear even more professional).

Share this post


Link to post
Share on other sites

Rats, I didn't realise I couldn't edit the above post after I submitted it.

 

Regarding the TIME allowed for your oscommerce site to connect and get shipping information from Canada Post: There is a 30 second default time limit for server to server connections, it is not editable nor changeable. This should be ample time for anyone running a Canadian (or USA) based website (unless you're hosting with a hokey webhost or you do not have a decent connection to your own server). If you keep timing out to the live (production) server, I'd think about looking for a new webhost for your OSCommerce website.

Edited by CatHerder

Share this post


Link to post
Share on other sites

This contribution is also broken in one place (line 77) if you are using MS2.1

 

(You will get this error on checkout: Origin postal code is illegal )

 

Change this:

 

this->_canadapostOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);

 

To this:

 

this->_canadapostOrigin(STORE_ORIGIN_ZIP, $country_name['countries_iso_code_2']);

 

 

If you are using MS2.2 you need to leave it as (it works fine as is with SHIPPING_ORIGIN_ZIP in the latest version of this contribution).

 

 

I just ran across this on the 3rd site I was updating (this site is not using MS2.2). Thought it was worth noting.

Share this post


Link to post
Share on other sites

:thumbsup: Great Post! One stupid question, however. How do I set up a different server IP for testing and production? :huh:


Basshook

Share this post


Link to post
Share on other sites

Desperate.....

 

 

Hi, My name is Martin Raymond and I?have a XML Parsing error in the catalog page when I checkout from my site

 

*** SAYS: ****

 

XML Parsing error

 

*** End *****

 

 

Post Canada says that they received the price of the item from my site but nothing else, meaning that, no qty, dimensions where sent to the server, and that is why my error appears. Now, in the admin side I setted up the IP, the user ID, and all other relevant info, as well as dimensions and weight for my product.

 

Tried with the check mark Ready-to-ship on and off. Does not work. Tried the contribution e-mail for info. No answer. I was told that I skipped a step in the install. Doubleled check again, everything is there.

 

What did I do wrong then... Can anybody help me!!!!

 

Would like to go live soon...

 

Thanks, Ray :( :(


Martin Raymond

Xtreme Medias, Owner

Share this post


Link to post
Share on other sites

Some new information:

 

Canada Post recently changed their policy, you now are required to either have a Venture One account or a commercial account before you can get set up with their shipping service.

 

You also must now ensure that your web server has port 30000 open. If you are not sure how to do this, contact your webhost and have them take care of it. Most webhosting companies disable all ports by default and then open the ones most commonly used (21, 80, etc), so the majority of webhosts out there will most likely have to configure their servers to allow port 30000 if you want to use the Canada Post Shipping Module(s).

 

I just ran into these two new issues with a new client's site and thought I should mention it.

Share this post


Link to post
Share on other sites
Some new information:

 

Canada Post recently changed their policy, you now are required to either have a Venture One account or a commercial account before you can get set up with their shipping service.

 

You also must now ensure that your web server has port 30000 open. If you are not sure how to do this, contact your webhost and have them take care of it. Most webhosting companies disable all ports by default and then open the ones most commonly used (21, 80, etc), so the majority of webhosts out there will most likely have to configure their servers to allow port 30000 if you want to use the Canada Post Shipping Module(s).

 

I just ran into these two new issues with a new client's site and thought I should mention it.

 

Thanks for the update much appreciated, but my question is that two posts in front of you asked for your help and you provided nothing is there a reason for this? Did we do something wrong? Based on your post it seems that you have a lot of experience with Canada Post am I wrong in assuming this? If so I apologise, but we still need answers to our posts.


Basshook

Share this post


Link to post
Share on other sites
Thanks for the update much appreciated, but my question is that two posts in front of you asked for your help and you provided nothing is there a reason for this? Did we do something wrong? Based on your post it seems that you have a lot of experience with Canada Post am I wrong in assuming this? If so I apologise, but we still need answers to our posts.

 

Uh, I'm not the author of the Canada Post Contribution. :)

 

I thought I sent you a private message a month ago regarding your post, maybe I forgot to hit send before I closed tabs or something. I'm not willing to offer support on the forums for this module as I simply don't have the time to devote to it, and again... it's not my module and there's probably a support thread on these forums for it!

 

But I'm happy to answer if/when I can. You have a setting in your administration section on your oscommerce website.

 

Modules -> Shipping

Select Canada Post (if you don't see the Canada Post module here as an option, you didn't install it correctly, many people forget to upload the module itself to the correct folders)

 

On the right side of the screen you'll see

Canada Post Parcel Service

Enable CanadaPost Shipping

True

Enter CanadaPost Server IP

206.191.4.228

Enter CanadaPost Server Port

30000

Enter Selected Language-optional

en

Enter Your CanadaPost Customer ID

CPC_THE_ACCOUNT_YOU_SET_UP

Enter Turn Around Time(optional)

24

Tax Class

WHATEVER_YOUR_TAX_CLASS_IS

Shipping Zone

--none--

 

 

The red IP address is the test server address... once you are finished testing with the test server, change that to the production server IP. I assumed this step would be pretty obvious to anyone that followed the instructions included with the Canada Post Shipping Module Contribution or the Canada Post Shipping Module with Dimensions Contribution.

 

It is very important to ensure that port 30000 is open on your webserver. Most shared hosting environments will have this port closed by default. Your ISP/WebHost will simply open up ports when somebody requests it (that's the way linux/apache is installed & managed these days). Most errors people have with this module can be attributed to Port 30000 being blocked by your server or by missing a step in the installation instructions. Be sure you send your webhost a support ticket asking to have port 30000 open if you run into issues.

 

Regards.

Share this post


Link to post
Share on other sites

Thanks for this post!

I have one question, where in oscommerce can you input the dimensions of your products?

I do not see anywhere to do this, and I assume without dimension the Canada Post mod will not be able to calculate the shipping costs.

 

any help would be appreciated,

thank you

Share this post


Link to post
Share on other sites
I have one question, where in oscommerce can you input the dimensions of your products?

 

Which version of OSCommerce are you using? You should see product dimensions near the bottom of each product you add (in your admin section in the products table). You have to add dimensions for each item in your catalog as well as its weight. The CPC Shipping module will take care of figuring out which is more weight or volumetric weight and return the higher value automatically (it adds up all your products).

 

Maybe OSCommerce doesn't have product dimensions by default? I forget, I haven't installed a vanilla OSCommerce in a while so I apologize if I'm incorrect on this assumtion! I usually install my own modded up variety when I do a new site -- it saves me a lot of trouble. :)

 

If you don't see dimensions for each unique product in your catalog admin section, you'll have to apply a mod (I think Product Dimensions is the one you're looking for in that instance).

 

Then, on the Canada Post website in your account admin there you can set up whatever your regular shipping container size is, or if you use different box sizes you can set up multiple container sizes there -- it will then determine which sized box you'll be shipping when an order is submitted (it also knows if/when you need to use more than one box, and it also knows if you have an item that is larger than your set up shipping containers and will ship that item seperately (and check which is greater, volumetric weight or actual weight and charge the higher of the two).

Share this post


Link to post
Share on other sites

What is the support forum for this module?

 

I can't find it but i will try to ask the question here...

 

I'm not sure if it's just me or not..

If i change the shipping address it does not chang the shipping cost..

I notice that it only looks at the Blling address not the shipping address..

Share this post


Link to post
Share on other sites

What is the support forum for this module?

 

I can't find it but i will try to ask the question here...

 

I'm not sure if it's just me or not..

If i change the shipping address it does not chang the shipping cost..

I notice that it only looks at the Blling address not the shipping address..

Share this post


Link to post
Share on other sites
Uh, I'm not the author of the Canada Post Contribution. :)
Since you are the author of the Canada Post Contribution module, I thougt you could give me some help.
I'm not willing to offer support on the forums for this module as I simply don't have the time to devote to it, and again... it's not my module and there's probably a support thread on these forums for it!
It's good to know that you are willing to support your module. ;)I'm getting an 'XLM Parsing error' when I go to checkout. I'm using the 3.7 Module with dimensions.
But I'm happy to answer if/when I can. You have a setting in your administration section on your oscommerce website.
If the 'if and when' is right now, that would be good. AFAIK, all my settings are correct and I have my Canada Post customer number in there correctly, but still get a simple 'XLM Parsing Error'. Port 30000 is open, and I've tested this by changing ports to something else, and I get an 'unable to connect to canada post' error instead.

 

OH, BTW, I have osCommerce 2.2-MS2

Edited by inet2000

Share this post


Link to post
Share on other sites

BTW, Catherder and I are friends, so I'm yanking his chain here. I'm not actually insane. :)

 

However, I really genuinely am having problems with the CP with Dimensions module ver 3.7. When I go to check out, I get an XML parsing error.

 

Canada Post

XML parsing error.

If you prefer to use canadapost as your shipping method, please contact the BuyWispGear.com via Email.

 

I contacted Canada Post, and they say from their end, the cart doesn't look to be sending all the required data, but as far as I can tell, the module is correctly configured, port 30000 is open, and the Canada Post account (Venture One) is setup. I would appreciate any feedback, any ideas, any suggestions, any brainstorming, any discussion...

Edited by inet2000

Share this post


Link to post
Share on other sites
When I go to check out, I get an XML parsing error.
I have a solution for this xml parsing error - at least for the version of the error I was getting. It was simply that my cart was not collecting State/Province information when the customer was signing up, and it wasn't transmitting that to Canada Post as a result. Which means that the module was probably setup perfectly in 20 minutes, and I've fought for 5 days over a missing province. Argh.

Share this post


Link to post
Share on other sites

Update to some details on this thread as I just called Canada Post to setup my account.

 

They are switching over to DNS for the server IP. In addition the test and production servers are now combined.

 

PRODUCTION/TEST SERVER: sellonline.canadapost.ca

port: 30000

 

 

 

My question is how to convert my imperial/standard measures to metric for Canada Post? (I primarily ship with USPS but do have the odd requirement to ship within Canada with Canada Post)

Edited by FRAMBO

I would like a book on medieval English music dating between 1356 and 1390

Share this post


Link to post
Share on other sites
Now, log onto the Canada Post developers website: http://206.191.4.228/NewUser.html

Your username and password provided by Canada Post will be the same until you change your password by logging into this site.

 

This link is now replaced with this one: http://sellonline.canadapost.ca/servlet/LogonServlet


I would like a book on medieval English music dating between 1356 and 1390

Share this post


Link to post
Share on other sites

I have more than 5 boxes entered... will that cause problems?

 

I've been having problems with this thing. It used to work fine, now it's not. When I adjust the handling/box sizes/anything, the shipping costs don't change. I don't know what's going on.

 

Well now that I've changed to the proper sellonline.canadapost.ca it seems to be working again.

Edited by yatahaze

Share this post


Link to post
Share on other sites

Ok, I am still having one problem. If an order is over 2.5kg and is being sent to france, australia and a some other international countries, I get the following error:

 

Rating Service generic error.

The Canada Post server is down at the moment please try again later. Sorry for the inconvenience.

 

I have xpresspost international and international small packets setup as services, so i dont get it.

Share this post


Link to post
Share on other sites

I just noticed when this offers small packets surface it gives the estimated delivery date as 2 to 4 weeks. Almost always the customer receives packages from us in 1-2 weeks. I think this is scaring off lots of our US customers. Is there any way to change this?

Share this post


Link to post
Share on other sites

Great post.

I haven't done the Canada Post phone call/account setup thing yet, but I have installed the CP shipping mod.

I'm still using the Demo account (CPC_DEMO_XML).

 

Everything seems to work. I get 4 shipping options and prices.

The prices, however, look high ($8.37 is the lowest price returned).

My products are small books. Most are only 20 pages (like 30grams). Most are 10"x6"; some smaller; some letter sized.

 

So, small orders should fit in a simple letter envelope ($.93) or oversized envelope ($1.10).

 

Does the Canada Post module include LetterMail pricing?

 

Thanks

Share this post


Link to post
Share on other sites

does anyone know why in admin/shipping after you have everything set up, there is no option to put a 0 or 1 in sort order for the Canada Post shipping module? By default if there is only one shipping module, which i have now, should a 0 or 1 appear? Just wondering if anyone else is seeing this as i have everthing set up as stated in this forum and on the contribution itself.

 

Thanks

Share this post


Link to post
Share on other sites
Great post.

I haven't done the Canada Post phone call/account setup thing yet, but I have installed the CP shipping mod.

I'm still using the Demo account (CPC_DEMO_XML).

 

Everything seems to work. I get 4 shipping options and prices.

The prices, however, look high ($8.37 is the lowest price returned).

My products are small books. Most are only 20 pages (like 30grams). Most are 10"x6"; some smaller; some letter sized.

 

So, small orders should fit in a simple letter envelope ($.93) or oversized envelope ($1.10).

 

Does the Canada Post module include LetterMail pricing?

 

Thanks

 

Hi there. did you have to enter/change any information in any of the php files to get this working? I have a VentureOne account, all the files in the right places, all my info entered with Canada Post, and i even made sure the country and postal code were entered in Administration/modules/shipping. Am i missing somehting because i am getting error

 

"This is currently the only shipping method available to use on this order.

 

Canada Post Canada Post

XML parsing error.

If you prefer to use canadapost as your shipping method, please contact the store owner."

 

If you ended up getting this working can u advise.

 

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×