Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Canada Post Module Postal Code Illegal


medalta

Recommended Posts

Hi,

 

I just installed Kenneth Wang's Canada Post Shipping module. When I go through the check out it tells me that the origin postal code is illegal and to contact the store owner.

 

In the admin module in Configuration> Shipping/Packaging I have

 

Canada as the country of origin

T1A 3K9 as the postal code

 

What is the proper format for the postal code? :blink: :blink: :blink:

Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

I just installed Kenneth Wang's Canada Post Shipping module. When I go through the check out it tells me that the origin postal code is illegal and to contact the store owner.

 

In the admin module in Configuration> Shipping/Packaging I have

 

Canada as the country of origin

T1A 3K9 as the postal code

 

What is the proper format for the postal code? :blink: :blink: :blink:

Hello,

 

f I can ask how did you install? I am new at this and could not find exactly where to install the module.

 

Thanks

John Falcone

Link to comment
Share on other sites

Pleasae remember you are asking a guy that installed it but hasn't got it working yet.

 

Here's what I did

 

I placed the 16k canadapost.php in install directory\includes\modules\shipping

 

Then the smaller 557 byte canadapost.php in

install directory\includes\languages\english\modules\shipping

 

after that you have to go in to your admin module and install it in

Configuration - Modules - Shipping

 

The go to

Configuration - Shipping/Packaging and insure your country of origin and postal code are set up properly.

 

The problem is nobody explained what the proper configuration for the postal code is so I have to assume it is something wierd and thus the error I receive about it being illegal :(

Link to comment
Share on other sites

  • 3 weeks later...

I'm having the same problem. Wondering if it's a problem with the test account that the module installs with CPC_DEMO_XML

 

I've tried postal codes with and without spaces, even tried ones in larger centres (e.g. Calgary) but always the same error message. The Canada Post implementation guide doesn't seem to offer any clues.

 

Stumped :blink:

Link to comment
Share on other sites

I am currently using another shopping cart system and have a Canada Post account. I am trying to setup oscommerce cart with Canada Post. Just to let you all know that even with my active CP account I still get the Illegal Postal Code error.

 

Hmmmm!

Link to comment
Share on other sites

Problem Solved :lol: :lol:

 

Find this line in: includes/modules/shipping/canadapost.php

 

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

 

and replace it with

 

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

 

of course replace T3J4A1 with your default postal code and remember to include the ' '

 

Cheers,

Bob

Link to comment
Share on other sites

I just want everyone to know that Bob Hurst is a God !

 

:D

 

My Canada Post Mod is working !

 

B)

 

If I was a young single attractive female I would happily bare him a child.

 

;)

 

Course . . . I am an old, married, grey haired man with two grown daughters and a lovely wife, . . .

 

so . . .

 

thanks a lot Bob

 

will have to suffice

 

 

:rolleyes:

 

Larry

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 months later...

I had the same problem with the origin postal code.

 

Thanks to RCAF for the initial reply, I tried that and it worked.

 

An additional thanks to binare, for the corrected code that gives the original functionality. That worked for me too. Just as a note, the full code that needs to be replaced is on line 67

 

Replace:

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

 

With:

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

 

This worked perfectly for me.

 

 

Thanks again.

Link to comment
Share on other sites

  • 4 weeks later...

Hi, I also just installed this module as above and here is my errors when I select the shipping module from the admin page. Any ideas?

 

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/sites/site39/web/catalog/includes/modules/shipping/canadapost.php on line 191

 

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/sites/site39/web/catalog/includes/modules/shipping/canadapost.php on line 191

Link to comment
Share on other sites

  • 4 months later...
I'm having the same problem.  Wondering if it's a problem with the test account that the module installs with CPC_DEMO_XML

 

I've tried postal codes with and without spaces, even tried ones in larger centres (e.g. Calgary) but always the same error message.  The Canada Post implementation guide doesn't seem to offer any clues.

 

Stumped  :blink:

 

I was using the Demo ID (which was something like CPC_DEMO). I contacted Canada Post and set up an ID for the company.

I think that fixed things (I was also doing something else wrong but all is now fixed)

Link to comment
Share on other sites

  • 1 month later...
Hi,

 

I just installed Kenneth Wang's Canada Post Shipping module. When I go through the check out it tells me that the origin postal code is illegal and to contact the store owner.

 

In the admin module in Configuration> Shipping/Packaging I have

 

Canada as the country of origin

T1A 3K9 as the postal code

 

What is the proper format for the postal code? :blink:  :blink:  :blink:

Do not use a space in the postal code.

Link to comment
Share on other sites

  • 2 weeks later...

hey guys, if i have a product weight 0.01 kg why is the Canada post rate return as such

 

Canada Post (1 x 3.02kgs) why is it saying 3.02kgs?

Priority Courier, 2005-05-11 $12.56

Xpresspost, 2005-05-11 $5.91

Regular, 2005-05-13 $6.15

Link to comment
Share on other sites

hey guys, if i have a product weight 0.01 kg why is the Canada post rate return as such

 

Canada Post (1 x 3.02kgs)   why is it saying 3.02kgs?

Priority Courier, 2005-05-11 $12.56 

Xpresspost, 2005-05-11 $5.91 

Regular, 2005-05-13 $6.15

 

You need to change you CP Shipping module setup to the Canada Post production server, which is 216.191.36.73, the testing server returns a default weight.

 

Hope that helps.

 

Bob

Link to comment
Share on other sites

  • 4 weeks later...

I have installed Canada POst on a client's OS Installation. I followed the instructions given to fix the postal code problem but still get the same error.

 

Here is what I have:

 

$country_name = tep_get_countries(STORE_COUNTRY, true);
? ? ?$this->_canadapostOrigin('SHIPPING_ORIGIN_ZIP', $country_name['countries_iso_code_2']);
? ? ?$this->_canadapostDest($order->delivery['city'], $order->delivery['state'], $order->delivery['country']['iso_code_2'], $order->delivery['postcode']);

 

I replaced the 'SHIPPING_ORIGIN_ZIP' with the customer's postal code but still the same error: " Origin Postal Code Illegal

 

Anyone have a fix for this???

 

Does anyone know of a different Shipping module for canada with the exception of the Canada Post Demensions Module?

Edited by joey099
Link to comment
Share on other sites

Dumb question here, but I over thought my problem ... What weight do I use for the cp mod from K.Wang. Product listing is in lbs, by default I guess ... does this covert that lb into kg (or is my gram weight a lbs weight) ... or do I need to enter the equivalent lb weight for my gram weight items?

 

Is there a default or something in the code I can change that allows for me to enter in gram weight and still work with this contribution.

 

Thanks a tonne.

Link to comment
Share on other sites

I have installed Canada POst on a client's OS Installation. I followed the instructions given to fix the postal code problem but still get the same error.

 

Here is what I have:

 

$country_name = tep_get_countries(STORE_COUNTRY, true);
? ? ?$this->_canadapostOrigin('SHIPPING_ORIGIN_ZIP', $country_name['countries_iso_code_2']);
? ? ?$this->_canadapostDest($order->delivery['city'], $order->delivery['state'], $order->delivery['country']['iso_code_2'], $order->delivery['postcode']);

 

I replaced the 'SHIPPING_ORIGIN_ZIP' with the customer's postal code but still the same error: " Origin Postal Code Illegal

 

Anyone have a fix for this???

 

Does anyone know of a different Shipping module for canada with the exception of the Canada Post Demensions Module?

 

joey099,

Make sure you have changed working module, not in tmp directory. It's happened to me too

Link to comment
Share on other sites

  • 2 weeks later...
I just want everyone to know that Bob Hurst is a God !

 

I second that, after some trial and error I come over here and find this post, bam, 10 min later I have a working Canadapost shipping mod :-" Bob hurst gets demi-god status for the day, heck i'll even go for two.

 

Now that i'm working with it and changing all of my descriptions from the zone rate calculator calculating LBS to the canadapost KGS.

 

As I already have listed over 300+ items in my paint category alone I think it would be better for me to find a way to make the module weight in LBS. Is there a way to change the weight from KGS to LBS within the module without me hand converting?

 

My other question is the default weight that I seem to be set in is KGS. That is fine, I guess I can convert my whole store if I had to, but I get a wierd display. I enter the weight as 1 KG to a item, and the canadapost shipping mod automatically calculates it to be 4 KGS. I guess I could figure out the fraction ratio, but i'd rater type in the weight and have it spit the same number back out to the end user. Any ideas on this one?

Edited by loki
Link to comment
Share on other sites

  • 2 weeks later...

I've done as Bob said and updated my Canadapost.php, but I alwasy get this:

 

Shipping Method

 

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

Canada Post

XML parsing error.

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

 

 

 

Here is my setup:

 

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_M**_KA**A

 

Enter Turn Around Time(optional)

8

 

Tax Class

--none--

 

Shipping Zone

--none--

 

Sort Order

0

Link to comment
Share on other sites

Well, I am lost. I've done everything I can find on the forums here, and I was moved to the production server now.. and I still get the XML Parsing Error.. it has to be something dumb that I have or have not done... :(

 

I even removed the space in my postal code!

Link to comment
Share on other sites

  • 1 month later...

regarding shipping weights...........

 

 

I entered all my weights in as lbs (imperial). For instance, one product is 3 lbs.

 

Yet canada post is interpreting that product to be 6.75 lbs-roughly the conversion rate as if I had entered my weight in as 3 kgs and it was changing it to lbs.

 

How do I get it to recognize that all my weights are already entered as lbs?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...