Jump to content
insaini

Canada Post Automated Labels 2.0 AND Canada Post Shipping Module 4.0

Recommended Posts

I got a fix !

 

dont forget to manually go to the website and fill-in the update form beforee trying.

 

// replace the $query_string value in ship_canadapost_ajax.php circa line 129

$query_string = 'cpidSignIn:signIn.x=46&cpidSignIn:signIn.y=11&cpidSignIn_SUBMIT=1'.
						  '&cpidSignIn:j_username='.urlencode(MODULE_SHIPPING_CANADAPOST_USERID).
						  '&cpidSignIn:j_password='.urlencode(MODULE_SHIPPING_CANADAPOST_PASSWORD);

 

Also, the error handling in step 3 needs to be updated, but I'm not that good, so I simply commented the "check for error" part of it so it contionues to step 4.

 

here's the fix for Step 3 too :

 

circa line 172 :

	// progress update
//if (stristr($response, '<input type="hidden" name="formId" value="' . $form_prefix . '0">') === FALSE) {
//	do_cp_error($step, SC_GENERAL_ERROR);
//	} else {
cp_progress($step, APP_START);
//	}

Edited by syn0ptic

Share this post


Link to post
Share on other sites
I got a fix !

 

dont forget to manually go to the website and fill-in the update form beforee trying.

 

// replace the $query_string value in ship_canadapost_ajax.php circa line 129

$query_string = 'cpidSignIn:signIn.x=46&cpidSignIn:signIn.y=11&cpidSignIn_SUBMIT=1'.
						  '&cpidSignIn:j_username='.urlencode(MODULE_SHIPPING_CANADAPOST_USERID).
						  '&cpidSignIn:j_password='.urlencode(MODULE_SHIPPING_CANADAPOST_PASSWORD);

 

Also, the error handling in step 3 needs to be updated, but I'm not that good, so I simply commented the "check for error" part of it so it contionues to step 4.

 

here's the fix for Step 3 too :

 

circa line 172 :

	// progress update
//if (stristr($response, '<input type="hidden" name="formId" value="' . $form_prefix . '0">') === FALSE) {
//	do_cp_error($step, SC_GENERAL_ERROR);
//	} else {
cp_progress($step, APP_START);
//	}

 

I am having trouble, so I added the code changes which you outlined above. The part I am having trouble with is knowing which update form on the OBC (I assume OBC is correct) website? Are you talking about the profile? Right now my shipping module info matches the OBC profile.

 

Any assistance would be great.

 

Thanks,

Jonathon

Share this post


Link to post
Share on other sites

I have not used this module only the old Canada Post one.

 

What I am trying to work out is if it is possible to write a delivery estimator. If we enter a post code we want to be able to say the earilest time the item could arrive.

 

I know the older module has a turn around time which I thought was how soon you could ship. So does this module come back with an ETA?


Kym

Projects Director @ ozEworks.com

Share this post


Link to post
Share on other sites
I have not used this module only the old Canada Post one.

 

What I am trying to work out is if it is possible to write a delivery estimator. If we enter a post code we want to be able to say the earilest time the item could arrive.

 

I know the older module has a turn around time which I thought was how soon you could ship. So does this module come back with an ETA?

 

This module functions like the old Canada Post version in that it provides an EDD (estimated delivery date) for each of the CP shipping options. This module is integrated with the Automated Shipping Label module. The EDDs start when CP has the parcel in their hands so you could capture the EDDs and add your turn around times to produce total delivery estimates.

Share this post


Link to post
Share on other sites
PLEASE HELP!

 

I have installed this module. A customer can place an order and gets the proper choices for shipping. They make the payment and get an invoice, but the store owner dosen't. When you try to view the invoice in the "orders" section of the admin panel all that shows up is the following:

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' cp_tracking orders where orders_id = '24'' at line 1

 

select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from, cp_tracking orders where orders_id = '24'

 

Any ideas????

 

 

 

I am having the same problem. but I am getting this error

 

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' cp_tracking orders where orders_id = '3'' at line 1

 

select customers_name, customers_email_address, orders_status, date_purchased from, cp_tracking orders where orders_id = '3'

 

 

If anyone can please help. I would be very greatful.

 

 

Thanks

 

 

Julien

Edited by julienjp

Share this post


Link to post
Share on other sites
I am having the same problem. but I am getting this error

 

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' cp_tracking orders where orders_id = '3'' at line 1

 

select customers_name, customers_email_address, orders_status, date_purchased from, cp_tracking orders where orders_id = '3'

 

 

If anyone can please help. I would be very greatful.

 

 

Thanks

 

 

Julien

 

You didn't indicate which file this query was located in but from what I can see the MySQL syntax is incorrect in the string "from, cp_tracking orders where" and should read "from orders where". The string ", cp_tracking" might be required between "date_purchased" and "from" - check the code to determine this requirement.

Share this post


Link to post
Share on other sites

I just installed (upgraded) the latest build over an older canada post module.

 

I followed all of the instructions but now I'm getting an error when updating products. See below..

 

 

page > /modules/catalog/admin/categories.php?cPath=42_44&pID=57&action=update_product

0 -

 

update products set products_quantity = '100', products_description_short = 'programable memory', products_tariff = '', products_model = '', products_price = '10.0000', products_date_available = null, products_weight = '0.01', products_weight_type = 'kgs', products_dim_type = 'cm', products_length = '1', products_height = '1', products_width = '1', products_ready_to_ship = '', products_status = '1', products_tax_class_id = '0', manufacturers_id = '', products_image = 'wiifree_big.jpg', products_last_modified = now() where products_id = '57'

 

[TEP STOP]

 

 

which changes should I double check? Thanks.

Share this post


Link to post
Share on other sites

I have installed this module and need a little help. I haven't found an answer in this thread yet.

 

The module is working correctly and estimating shipping fees, but when I add items to my catalog, I only have the option to enter a weight. I do not have the option to enter an item's dimensions.

 

How do I fix this? I need to be able to add the dimensions in order to estimate shipping properly.

Share this post


Link to post
Share on other sites
The module is working correctly and estimating shipping fees, but when I add items to my catalog, I only have the option to enter a weight. I do not have the option to enter an item's dimensions.

You must mod admin/categories.php according to the installation instructions to get those fields.

Share this post


Link to post
Share on other sites

Now I'm very embarrassed. After I read your reply, I had a close look at things and realized I had installed a totally different canada post module! I have now installed the module I wanted (the one we're talking about of course!) and it is working beautifully!

 

One thing to note, when I ran the commands in SQL on my database, I experienced an error that someone had right at the very beginning of this thread and had to change a line of code that had been included in the "installation" file. The docs weren't updated, in case anyone didn't realize.

 

Sorry about the hassle, thank you for the help! *blushing*

Share this post


Link to post
Share on other sites
I got a fix !

 

dont forget to manually go to the website and fill-in the update form beforee trying.

 

// replace the $query_string value in ship_canadapost_ajax.php circa line 129

$query_string = 'cpidSignIn:signIn.x=46&cpidSignIn:signIn.y=11&cpidSignIn_SUBMIT=1'.
						  '&cpidSignIn:j_username='.urlencode(MODULE_SHIPPING_CANADAPOST_USERID).
						  '&cpidSignIn:j_password='.urlencode(MODULE_SHIPPING_CANADAPOST_PASSWORD);

 

Also, the error handling in step 3 needs to be updated, but I'm not that good, so I simply commented the "check for error" part of it so it contionues to step 4.

 

here's the fix for Step 3 too :

 

circa line 172 :

	// progress update
//if (stristr($response, '<input type="hidden" name="formId" value="' . $form_prefix . '0">') === FALSE) {
//	do_cp_error($step, SC_GENERAL_ERROR);
//	} else {
cp_progress($step, APP_START);
//	}

 

Thank you so much!!! You have no idea how long I have searched to try to fix this problem. it should really be part on the module.

 

I was confused because there's about 3-4 pages that talk about cURL and it has nothing to do with that.

 

Now Step 2 works as well as all steps!

Share this post


Link to post
Share on other sites

Hello, I've installed the Shipping Module recently. We had been using a basic version that didn't include dimensions and wanted the improved accuracy of estimates based on dimensions. We are set up with Sell Online, Venture One, and EST. I didn't install the labels mod.

 

I ran the appropriate sql queries from the mod, set the defaults in configuration, and modified the relevant files. The installation instructions provided with the mod were clear and accurate (except for one line in the sql query). Everything seemed to be fine.

 

My problem now is that the CP server is only returning accurate quotes for single items. For example, if I do a test order for 1 200g item 10x10x10 it shows up with the right weight, box, and rate. If I try to check out two of those items I get a quote for 1.66kg. If I order several difference items- 200g, 100g, and 150g for example- I get a rate for 1.66k.

 

If I check the ready to ship option, I get accurate rates per box (useless in a live situation, since customers don't want items shipped individually of course- too expensive). This seems to indicate to me that I'm sending the correct information to the server (but I could be wrong as I know little about these things). Once again, if I check out with an item 900g 25x15x15 I get a quote for 1.66k, but if I set it to ready to ship, I get an accurate quote.

 

I have box weights set to 0.001, no tare weight, and we have gotten fairly accurate quotes in the past using the basic CP shipping mod, based on weight. I could return to it, but since we do have some oversized and bulky items, I'd prefer the accuracy of dimensional shipping quotes. And if I can get this working, we'll try going for the convenience of automated labels as well.

 

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hello, I've installed the Shipping Module recently. We had been using a basic version that didn't include dimensions and wanted the improved accuracy of estimates based on dimensions. We are set up with Sell Online, Venture One, and EST. I didn't install the labels mod.

 

I ran the appropriate sql queries from the mod, set the defaults in configuration, and modified the relevant files. The installation instructions provided with the mod were clear and accurate (except for one line in the sql query). Everything seemed to be fine.

 

My problem now is that the CP server is only returning accurate quotes for single items. For example, if I do a test order for 1 200g item 10x10x10 it shows up with the right weight, box, and rate. If I try to check out two of those items I get a quote for 1.66kg. If I order several difference items- 200g, 100g, and 150g for example- I get a rate for 1.66k.

 

If I check the ready to ship option, I get accurate rates per box (useless in a live situation, since customers don't want items shipped individually of course- too expensive). This seems to indicate to me that I'm sending the correct information to the server (but I could be wrong as I know little about these things). Once again, if I check out with an item 900g 25x15x15 I get a quote for 1.66k, but if I set it to ready to ship, I get an accurate quote.

 

I have box weights set to 0.001, no tare weight, and we have gotten fairly accurate quotes in the past using the basic CP shipping mod, based on weight. I could return to it, but since we do have some oversized and bulky items, I'd prefer the accuracy of dimensional shipping quotes. And if I can get this working, we'll try going for the convenience of automated labels as well.

 

Any help would be greatly appreciated.

 

I don't know if this is related but I've been using this mod for almost a year and my needs have been very simple. I've been shipping small items in envelopes and I've noticed that sometimes the mod would not detect that a larger size of envelope was required. It wasn't a big deal as the shipping cost was very similar. Recently, I've added some larger size items to my store and now I'm finding that the calculation for what size box/envelope to use it totally out to lunch. I have an item that is 0.30 kg, 40.00 cm x 25.00 cm x 20.00 cm and the mod is telling me that it can fit the product into an envelope that has a capacity of 1.000 kg and dimensions of 35.0 cm x 25.0 cm x 8.0 cm? If I tell the cart to double the order to a quantity of 2 neither the total weight or the shipping container changes. Here is what happens when I change the qty's...

 

item = 0.30 kg, 40.00 cm x 25.00 cm x 20.00 cm

 

qty 1 = envelope, total weight = 1.16 kg WRONG S/B using my 41.0 cm x 31.0 cm x 21.0 cm box

qty 2 = envelope, total weight = 1.16 kg WRONG S/B using 2 of my 41.0 cm x 31.0 cm x 21.0 cm boxs

qty 3 = envelope, total weight = 1.16 kg WRONG S/B using 3 of my 41.0 cm x 31.0 cm x 21.0 cm boxs

qty 4 = envelope, total weight = 1.16 kg WRONG S/B using 4 of my 41.0 cm x 31.0 cm x 21.0 cm boxs

qty 5 = box (30.0 cm x 24.0 cm 20.0 cm), total weight = 2.4 kg STILL WRONG and now it's using my small box

 

I'm finding this extemrly frustrating as this is just one of the many products I'm having problems with. I'm at the point where I'm considering other cart systems that allow me to intercept an order and calculate the shipping manually. I use PayPal for payments and I'm wondering if there is a way to HOLD an osCommerce order until I have a chance to manually calculate the shipping and add it to the order? Anyone??

 

Thanks,

Steve

Western Gecko

My Store

Share this post


Link to post
Share on other sites

Where are you getting "35.0 cm x 25.0 cm x 8.0 cm"? In the frontend part or in the backend part? Because they are completely different things. The backend actually is actually hard-coded and doesn't run any boxing algorithms AFAIK. The frontend should be working, but take a look at the boxing algorithm used. Usually you need to adjust it based on your own shipping procedures.

Share this post


Link to post
Share on other sites

Where are you getting "35.0 cm x 25.0 cm x 8.0 cm"? In the frontend part or in the backend part? Because they are completely different things. The backend actually is actually hard-coded and doesn't run any boxing algorithms AFAIK. The frontend should be working, but take a look at the boxing algorithm used. Usually you need to adjust it based on your own shipping procedures.

 

35.0 cm x 25.0 cm x 8.0 cm

These are the (LxWxH) dimensions of a box I have entered into the Canada Post "Add / Modify / Delete Boxes" screen under my Canada Post "Sell Online" account.

 

http://sellonline.canadapost.ca/servlet/MerchantBoxServlet

 

I'm not sure if you call this the frontend or the backend part?

 

When I look inside the mod I'm not seeing where the item sizes are being added up. I see it looping through the items and building the quote for CP. I then see the return result looping for each package and constructing the list of packages on the check out page.

CP must be doing the shipping calculation? I have never seen more than one box in my shipping calculation even when I tell the mod to ship two products with "Ship Item in it's original box." selected? It always seems to pick the smallest box I have in the "Add / Modify / Delete Boxes" screen.

Share this post


Link to post
Share on other sites

Frontend part is where the customers get a shipping quote from your shop. Backend is where you do the shipments in Admin and receive labels. They are quite different things.

Share this post


Link to post
Share on other sites

Natrium,

 

I would be very grateful if you could look at my post of Oct 20, about five posts above this one. Any thoughts or advice would be very much appreciated.

Share this post


Link to post
Share on other sites

Hi, have there been any changes in the Canada Post fields in the past few days? After using without problem for many months I am getting the dreaded message below:

 

Step 3. Error: Failed check in C:\websites\multipowertools.com\oscommerce-2.2rc2\catalog\admin\ship_canadapost.php at line 813. This most likely means that Canada Post has changed their user interface. You need to update your Canada Post Automatic Shipping Labels module.

Share this post


Link to post
Share on other sites

Yep, they changed their login process again. I have updated my original mod with the changes. Also replaced the old Purolator methods with the new FedEx methods, since Canada Post moved away from Purolator. You can backport these changes to this mod, I guess...

Edited by natrium42

Share this post


Link to post
Share on other sites

Thank you so much. All good now. I could not the see the new FedEx methods in your code. Are you meaning the shipping method arrays located just under the user config section of the base ship_canadapost.php page?

Share this post


Link to post
Share on other sites

Thank you so much. All good now. I could not the see the new FedEx methods in your code. Are you meaning the shipping method arrays located just under the user config section of the base ship_canadapost.php page?

Yes, those are the ones that changed. Canada Post doesn't partner with Purolator anymore.

Share this post


Link to post
Share on other sites

Hey everyone,

 

I'm new to OSCommerce and want to install the Canada Post Module. However, just wondering if anyone regularly updates this module? I don't want our business to halt because nobody has been able to update the code to meet future Canada Post criteria. I'm not a programmer and have limited knowledge of PHP. Should I look elsewhere for an e-commerce solutions? Any feedback would be appreciated!

Share this post


Link to post
Share on other sites

I'm new to OSCommerce and want to install the Canada Post Module. However, just wondering if anyone regularly updates this module? I don't want our business to halt because nobody has been able to update the code to meet future Canada Post criteria. I'm not a programmer and have limited knowledge of PHP. Should I look elsewhere for an e-commerce solutions? Any feedback would be appreciated!

I don't recommend using this module, since it's not being updated and since it's an unnecessary Frankenstein-mix of the following two modules:

CanadaPost Shipping Module for showing your customers all available options and rates

Canada Post Automated Labels for generating shipping labels in your backend

It's better to use those directly as they are more recent and each is updated at its own pace.

 

If you want to also ship Canada Post Light Packets Air, you can do so via the PayPal Automated Labels module, as this is not available directly though Canada Post website.

 

If your shipping rates with Canada Post aren't great, you could use eShipper Integration Module in your backend for better rates when generating labels (this applies to Regular, Expedited, Xpresspost and Priority). Try eShipper quotes first to see if their rates are better.

 

If starting from scratch, I would probably go with the free Magento eCommerce solution. osCommerce is too dated...

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

×