Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where is the Canadapost module lurking?


Recommended Posts

Posted

I'm sure it exists as I heard Kelvin Zhang talking about it in the developpers forum.

 

Can anyone point me in the right direction?

 

thanks,

bART :shock:

  • Replies 67
  • Created
  • Last Reply

Top Posters In This Topic

Posted

If there is a mod for this then it will be in the contributions part of this site.

 

Go there and search...

 

CC.

  • 2 weeks later...
Posted

I had this some time back for my store but have since deleted it figuring I'd find a newer version.....doh

 

Anyone seen this thing around?

Looked in the contributions and didn't find it :(

Troy

Posted

I downloaded the module and followed the instructions but now I'm getting the following error :

 

 

Error: XML parsing error.

 

any idea what I'm doing wrong

Posted
Is it ok to use with v2.2?

Yes, it runs perfect on my 2.2 most current osC.

I did a little bit display change. The running sample can be found at http://www.u-feel.com

 

I really don't know about the "XML parse error" message. I can't find this string in the source file, so it looks like configuration error which cause CanadaPost's server reponsing an error message.

Kenneth Wang

VA3RRW/BD4RR

Posted

how did you set it up after doing the first 6 steps bd4rr ?

I added all the needed files and modified the file checkpu_payment.php.

Posted
how did you set it up after doing the first 6 steps bd4rr ?

I added all the needed files and modified the file checkpu_payment.php.

 

step 5: Modify the file of [osc_installed_path]checkpu_payment.php;  

around line 54: change the original one with the following one:

$address = tep_db_query("select entry_postcode as postcode, entry_country_id as country_id, entry_state as state, entry_city as city, entry_zone_id as zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "' and address_book_id = '" . $sendto . "'");

step 6: Active this shipping method in your admin configuration.

 

I did the same thing. One thing is there's no checkpu_payment.php, only checkout_payment.php.

 

Have you checked your store's location settings such as postal code in the admin->configuration section?

Kenneth Wang

VA3RRW/BD4RR

Posted
Hey thx I got it to display the prices on different shipping option but now it does not give the option of choosing which shipping method the customer wants it just defaults to the last one.

 

Here's a quick fix:

 

in catalog/modules/shipping/cadanapost.php, from line 127 to 135:

           if (tep_count_shipping_modules() > 1) {  

             $display_string .= tep_draw_radio_field('shipping_selected', 'canadapost_' . (string)$i) .                                                          

                                tep_draw_hidden_field('shipping_canadapost_cost_' . (string)$i, $shipping_canadapost_products[$i][rate]) .

                                tep_draw_hidden_field('shipping_canadapost_method_' . (string)$i, $shipping_canadapost_products[$i][name]) . '</td>' . "n";  

           } else {              

             $display_string .= tep_draw_hidden_field('shipping_selected', 'canadapost_' . (string)$i) .                                                      

                                tep_draw_hidden_field('shipping_canadapost_cost_' . (string)$i, $shipping_canadapost_products[$i][rate]) .

                                tep_draw_hidden_field('shipping_canadapost_method_' . (string)$i, $shipping_canadapost_products[$i][name]) . '</td>' . "n";  

    }

 

Change it to (Keep 3 lines (128-130) and delete others):

 

             $display_string .= tep_draw_radio_field('shipping_selected', 'canadapost_' . (string)$i) .                                                          

                                tep_draw_hidden_field('shipping_canadapost_cost_' . (string)$i, $shipping_canadapost_products[$i][rate]) .

                                tep_draw_hidden_field('shipping_canadapost_method_' . (string)$i, $shipping_canadapost_products[$i][name]) . '</td>' . "n";  

Kenneth Wang

VA3RRW/BD4RR

Posted

Thank You for the help I really appreciate it. I did the change you told me to do but it doesn't seem to have changed . Here's the link to the file if you wanna take a look at it, I placed a copy of it in my root directory. www.tuxcomputers.com/canadapost.php Oh and by the way are you into amateur radio ? My call sign is VE2 OPZ (I lived in quebec).

Posted

Hello again.. I got it to work but only under certain circumstances.

If you are logged out when you click on a item to purchase it prompts

you to enter in your password, then you proceed to the checkout page

where it gives you the option of selecting which shipping method you want.

If you are already logged into your user name before clicking on checkout it

won't give you the option of selecting the shipping method.

 

Thank you

Shawn Mathew

Posted

did anyone figure out that parsing xml error yet?

I'm still getting it

Maybe the CPC_DEMO account doesn't work?

 

Do you have to have an account with canada post for this to work or is the account a free thing?

Troy

Posted
did anyone figure out that parsing xml error yet?

I'm still getting it

Maybe the CPC_DEMO account doesn't work?

 

I am using the test account too, and it works well.

Can you post your URL so I can have a look?

 

Problem solved!!  

Thx again for all the help bd4rr.  

 

Hi VE2OPZ,

 

Sorry for the late reply, since I am busy these days, haven't got time to check back.

 

Yes I am in amateur radio. One of the core team members is also ham (Tom, W2VY), but looks he is not active anymore.

 

So everything is okay now? Including login before order products?

Kenneth Wang

VA3RRW/BD4RR

Posted
when I try to check out, it says "Error: XML parsing error."

 

It looks like the XML information sent to CanadaPost's server is wrong.

Please double check your store's Postal Code in admin->configuration->shipping/packaging, and check the configure value of CanadaPost module. Mine looks like this:

 

Enable CanadaPost Shipping

1

 

Enter CanadaPost Server IP

206.191.4.228

 

Enter CanadaPost Server Port

30000

 

Enter Selected Language(optional)

en

 

Enter Your CanadaPost Customer ID

CPC_DEMO_XML

 

Enter Turn Around Time(optional)

8

 

That all I can think about for now. Good luck.

Kenneth Wang

VA3RRW/BD4RR

Posted

looks exactly the same :(

 

(I did that part above where you remove a few lines from canadapost.php and that did not work either)

Troy

Posted
looks exactly the same :(

 

(I did that part above where you remove a few lines from canadapost.php and that did not work either)

 

Have you checked your store's Postal Code?

Kenneth Wang

VA3RRW/BD4RR

Posted
I will try to do another install of it - maybe I did something wrong...

 

Hi osfDeath,

 

any luck?

Kenneth Wang

VA3RRW/BD4RR

Posted

I have the module working on my site and it is damn cool. I can't wait for Kelvin to come out with the next installment but I have only little bug/problem.

 

There are a few items in my catalog that if are added to the shopping cart cause the module to give me an XML parsing error. It only happens to very few items and I don't know what could be causing that. I tried to remove one of the products that was causing this problem and then readding it thinking it may be the entry in the database causing this but the same error occured. Anyone have any ideas? Thanks.

Posted
Hi osfDeath,  

 

any luck?

 

Not yet - but i've always been trying to use the same items for testing ...

 

I'll try adding a few products and see what happens

Troy

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...