Latest News: (loading..)
insaini

Canada Post Automated Labels 2.0 AND Canada Post Shipping Module 4.0

231 posts in this topic

Running into a bit of an issue with my install.

 

Running the provided ship_canadapost.php file I get an error message on top of the screen.

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /../admin/includes/languages/english/ship_canadapost.php on line 75

I try to process the shippment anyway, but I get back two error messages under "Initialized" :

 

---

 

 

I found the problem.. something i missed ..

 

open the language file /admin/includes/languages/english/ship_canadapost.php

 

on line 38 you will see

 

define ('ENTRY_DECLARED_VALUE','Declared Value ('.DEFAULT_CURRENCY.'):');\

 

remove the ending \

 

thats it..

 

J

Share this post


Link to post
Share on other sites
I found the problem.. something i missed ..

 

open the language file /admin/includes/languages/english/ship_canadapost.php

 

on line 38 you will see

 

define ('ENTRY_DECLARED_VALUE','Declared Value ('.DEFAULT_CURRENCY.'):');\

 

remove the ending \

 

thats it..

 

J

 

Thanks J. Got that far, but I still get:

 

 

Failed check /../admin/includes/languages/english/ship_canadapost.php at line 17

This most likely means that Canada Post has changed their user interface. You need to

update your Canada Post Automatic Shipping Labels module

 

 

when I try to submit from the admin screen.

Share this post


Link to post
Share on other sites
hmm.. well that does say libcurl 7.10 .. which isnt libcurl 7.16 .. but give it a go and see how it works out..

 

Hey there,

 

I did a fresh install of the module and it's still not working on GoDaddy, but it turns out I'll need to add a few lines of code re: a proxy server to get it to work:

 

On our shared hosting, any CURL applications that make secure HTTP connections (HTTPS over port 443) need to pass through a proxy server. The address for this proxy server is proxy.shr.secureserver.net and connections must specify the use of port 3128. The code below already includes this information.

 

GoDaddy posted some sample code here:

 

http://help.godaddy.com/article/289

 

Similarly, someone in an older Canada Post mod used the proxy server to get things working on GoDaddy:

 

I couldn't get this thing to work because I forgot to check and make sure that the proxy call in cURL was in the code. Added the needed lines and got it working.

 

He posted the fix here...

 

http://www.oscommerce.com/community/contributions,391

 

which seems to add an extra few lines of code to the mod:

 

//Next 2 lines for GoDaddy.com hosting accounts.
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($ch, CURLOPT_PROXY, "http://proxy.shr.secureserver.net:3128");

 

Similarly, someone posted a similar fix for the Fed Ex module:

 

One of our clients was facing issue with the FedEx Module in osCommerce.

 

The site was running on Godaddy Hosting.

 

We disabled Fedex. Then in Fedex1.php, we changed the part that references godaddy to:

 

curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);

curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);

curl_setopt($ch, CURLOPT_PROXY, “http://proxy.shr.secureserver.net:3128″);

 

Then enable the module again, and did a rate request, and that’s it.

 

(from http://oscommerceindia.com/help/2008/01/17...odaddy-hosting/ )

 

All of this is a bit over my head - I'm hoping someone could give me a hint as to where I should insert these lines of code. The only "curl_setopt" reference I could find was in the ship_canadapost_ajax.php file (under Case 8, around line 481) but when I inserted these lines immediately after it, it didn't seem to do anything. I keep getting the same error, "Cannot reach Canada Post Server. You may refresh this page..."

 

Please help! I need to get our site online and this module is the last barrier before we can launch it. Thanks again insaini for all your hard work and suggestions...

 

Chris

Share this post


Link to post
Share on other sites
Hey there,

 

I did a fresh install of the module and it's still not working on GoDaddy, but it turns out I'll need to add a few lines of code re: a proxy server to get it to work:

GoDaddy posted some sample code here:

 

http://help.godaddy.com/article/289

 

Similarly, someone in an older Canada Post mod used the proxy server to get things working on GoDaddy:

He posted the fix here...

 

http://www.oscommerce.com/community/contributions,391

 

which seems to add an extra few lines of code to the mod:

 

//Next 2 lines for GoDaddy.com hosting accounts.
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($ch, CURLOPT_PROXY, "http://proxy.shr.secureserver.net:3128");

 

Similarly, someone posted a similar fix for the Fed Ex module:

(from http://oscommerceindia.com/help/2008/01/17...odaddy-hosting/ )

 

All of this is a bit over my head - I'm hoping someone could give me a hint as to where I should insert these lines of code. The only "curl_setopt" reference I could find was in the ship_canadapost_ajax.php file (under Case 8, around line 481) but when I inserted these lines immediately after it, it didn't seem to do anything. I keep getting the same error, "Cannot reach Canada Post Server. You may refresh this page..."

 

Please help! I need to get our site online and this module is the last barrier before we can launch it. Thanks again insaini for all your hard work and suggestions...

 

Chris

 

Chris, you can add those lines to the ship_canadapost.php function file.. located in /admin/includes/functions .. its the first function at the top of the file...

Share this post


Link to post
Share on other sites
Thanks J. Got that far, but I still get:

Failed check /../admin/includes/languages/english/ship_canadapost.php at line 17

This most likely means that Canada Post has changed their user interface. You need to

update your Canada Post Automatic Shipping Labels module

when I try to submit from the admin screen.

 

 

Hmm.. well thats just the general error .. at what step are you getting this error? I have just created a label yesterday and it went through fine..

 

also you could have a curl problem in that your curl version may not be the proper version, or you curl was not built with openssl (this is required for https access) .. you can be sure its the openssl problem if it wont get past step 2 (since it cant log you in via https) ..

 

J

Share this post


Link to post
Share on other sites
Hmm.. well thats just the general error .. at what step are you getting this error? I have just created a label yesterday and it went through fine..

 

also you could have a curl problem in that your curl version may not be the proper version, or you curl was not built with openssl (this is required for https access) .. you can be sure its the openssl problem if it wont get past step 2 (since it cant log you in via https) ..

 

J

 

Here is what server info shows for cURL/OpenSSL:

 

Curl

cURL support enabled

cURL Information libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

 

And it is definitely the second step that is causing the problem.

 

Hmm.... any ideas?

 

Thanks!

Share this post


Link to post
Share on other sites
Here is what server info shows for cURL/OpenSSL:

 

Curl

cURL support enabled

cURL Information libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

 

And it is definitely the second step that is causing the problem.

 

Hmm.... any ideas?

 

Thanks!

 

I believe curl also has to be built with libssh

 

cURL Information libcurl/7.18.0 OpenSSL/0.9.7a zlib/1.2.1.2 libssh2/0.18

Share this post


Link to post
Share on other sites
Here is what server info shows for cURL/OpenSSL:

 

Curl

cURL support enabled

cURL Information libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

 

And it is definitely the second step that is causing the problem.

 

Hmm.... any ideas?

 

Thanks!

 

Thanks Jesse. I will speak with the host, they've generally been responsive, let's see if they can fix it up. I'll post back with a follow up.

 

Cheers,

 

Ivan

Share this post


Link to post
Share on other sites
Chris, you can add those lines to the ship_canadapost.php function file.. located in /admin/includes/functions .. its the first function at the top of the file...

 

Argh... Still doesn't work. I have one last idea though... "darkknightenterprises" posted another fix here:

 

http://addons.oscommerce.com/info/391 ... called "A complete work around if you can not get your hosting provider to open port 30000!!!"

 

He suggests uploading a file, cpcall.php, to a friend's server which then "makes the call to the canadapost server from there and the cURL call from the canadapost.php file calls to it."

 

I uploaded the included test file to a friend's server and it successfully connected to Canada Post :) So far so good... Now I'm just not sure how to modify the curl call on my own osCommerce site so it calls to the cpcall.php file on my friend's site. Here are the contents of the cpcall.php file that is now sitting on my friend's hosting account (not at GoDaddy!):

 

<?php
function sendToHost($data)
{
	set_time_limit(5);
	$ch = curl_init("sellonline.canadapost.ca:30000");
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, "sellonline.canadapost.ca:30000");
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt($ch, CURLOPT_DNS_CACHE_TIMEOUT, 2678400);
	curl_setopt( $ch, CURLOPT_HEADER, 0 );
	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
	curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
	$buf = "";
	$buf = curl_exec($ch);
	curl_close( $ch );
	if($buf == "")
	{
		$buf = "<?xml version=\"1.0\" ?><eparcel><error><statusMessage>Cannot reach Canada Post Server. ".
			   "You may refresh this page (Press F5) to try again.</statusMessage></error></eparcel>"; 
	}
return $buf;
}

$data = $_REQUEST['XMLRequest'];
$response = sendToHost($strXML);
echo $response;
?>

 

I assume this is meant to take the place of the function called "function cp_setup" in the file admin>includes>functions>ship_canadapost.php. Any ideas on what I need to do to force the Canada Post module to use the function "sendToHost" that's sitting on my friend's server (in the cpcall.php file) instead of the one found in ship_canadapost.php? If I can figure that out, I think everything else will fall into place. I highlighted in red the part of darkknightenterprise's instructions that don't make sense to me:

 

IF you have someone that has a web server online or an account with a web hosting company that has port 30000 open, just upload the test.php to that server and open it in your browser.

 

If port 30000 is open, you will see an XML response from the Canadapost server. If you don't, then you know that port 30000 is NOT open. IF it is then all you have to do is upload the cpcall.php to a directory on that server then put the URL to the cpcall.php in place of "http://www.yourserver.com/cpcall.php" and your CPC username in place of "CPC_DEMO_XML" in the canadapost.php file that upload it to your osCommerce store in catalog/includes/modules/shipping/canadapost.php and everything should be working perfectly.

 

I know that it is working because this is how I had to do it to get it to work and I am using this technique now. Good luck getting everything working for your store and may you prosper well in your endevors.

 

Chris

Edited by chrisjclay

Share this post


Link to post
Share on other sites
Argh... Still doesn't work. I have one last idea though... "darkknightenterprises" posted another fix here:

 

http://addons.oscommerce.com/info/391 ... called "A complete work around if you can not get your hosting provider to open port 30000!!!"

 

He suggests uploading a file, cpcall.php, to a friend's server which then "makes the call to the canadapost server from there and the cURL call from the canadapost.php file calls to it."

 

I uploaded the included test file to a friend's server and it successfully connected to Canada Post :) So far so good... Now I'm just not sure how to modify the curl call on my own osCommerce site so it calls to the cpcall.php file on my friend's site. Here are the contents of the cpcall.php file that is now sitting on my friend's hosting account (not at GoDaddy!):

 

<?php
function sendToHost($data)
{
	set_time_limit(5);
	$ch = curl_init("sellonline.canadapost.ca:30000");
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, "sellonline.canadapost.ca:30000");
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt($ch, CURLOPT_DNS_CACHE_TIMEOUT, 2678400);
	curl_setopt( $ch, CURLOPT_HEADER, 0 );
	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
	curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
	$buf = "";
	$buf = curl_exec($ch);
	curl_close( $ch );
	if($buf == "")
	{
		$buf = "<?xml version=\"1.0\" ?><eparcel><error><statusMessage>Cannot reach Canada Post Server. ".
			   "You may refresh this page (Press F5) to try again.</statusMessage></error></eparcel>"; 
	}
return $buf;
}

$data = $_REQUEST['XMLRequest'];
$response = sendToHost($strXML);
echo $response;
?>

 

I assume this is meant to take the place of the function called "function cp_setup" in the file admin>includes>functions>ship_canadapost.php. Any ideas on what I need to do to force the Canada Post module to use the function "sendToHost" that's sitting on my friend's server (in the cpcall.php file) instead of the one found in ship_canadapost.php? If I can figure that out, I think everything else will fall into place. I highlighted in red the part of darkknightenterprise's instructions that don't make sense to me:

Chris

 

 

chris.. you would have to place the call to this file in step one of the ajax file.. ship_canadapost_ajax.php load that up.. look at the first step (initialization) .. it has to go before anything else.. However. I do see a problem because the above url is sellonline (which is fine for shipping quotes) but the urls required for label generation are different..

 

now what I think is.. if you had a problem using godaddy's proxy server .. you may not have set it up correctly.. the automated labels software does not use port 30000 (only the shipping module does) .. be sure to modify the version of the shipping module ive included in the package with the modifications you just posted above (you may need to use your friends server for the shipping module via that php file you posted above) .. however for automated labels.. the proxy settings should have been enough..

 

one last thing.. when and what errors are you getting? are you getting errors from the shipping module? or the automated labels software?

 

J

Share this post


Link to post
Share on other sites
chris.. you would have to place the call to this file in step one of the ajax file.. ship_canadapost_ajax.php load that up.. look at the first step (initialization) .. it has to go before anything else.. However. I do see a problem because the above url is sellonline (which is fine for shipping quotes) but the urls required for label generation are different..

 

To be honest I don't know how to place the call to my friend's external server. I see case1 in ship_canadapost_ajax.php but I'm not sure how to proceed from there :( I know some basic php but my skills are limited and this is over my head... I'm not sure which line of code I should be pasting the link to callcp.php. Right above case one I see several URLS - am I meant to replace one of them? i.e. Should I replace the url in the line that reads "define ('ORIGINAL REFERRER'...)" ? ... or the one in that reads "define (SSO, 'https://....')" ... or should I be looking at a different line of code?

 

however for automated labels.. the proxy settings should have been enough.. one last thing.. when and what errors are you getting? are you getting errors from the shipping module? or the automated labels software?

 

The error appears whenever I try making a test purchase. Each time I get to the "Delivery information" step during Checkout, I get this error:

 

Cannot reach Canada Post Server. You may refresh this page (Press F5 on your keyboard) to try again.

If you prefer to use canadapost as your shipping method, please contact the The Tale of the Whale via Email.

 

I've actually never tried generating a label before - I didn't think I'd be able to until I successfully placed a test order. I just tried now for the first time and received this error:

 

Progress Indicator

Step 1. Initialized.

Step 2. Error: Failed check in /home/content/t/a/l/taleofthewhale/html/store/catalog/admin/includes/languages/english/ship_canadapost.php at line 9. This most likely means that Canada Post has changed their user interface. You need to update your Canada Post Automatic Shipping Labels module.

 

At any rate, I'm not too worried about the labels - it would be a nice bonus if they worked, but by far the most important thing right now is getting shipping prices from Canada Post during the checkout process.

 

I thought I'd try switching to GatorHost to see if I have better luck, but they seem to have placed my order on hold because I used Paypal for my payment and am outside the US (I'm in Canada). Anyway, if you have any more suggestions I'd appreciate them and would try them... Otherwise I'll get my order straightened out at GatorHost and try setting up the site there.

 

Regards,

Chris

Share this post


Link to post
Share on other sites
To be honest I don't know how to place the call to my friend's external server. I see case1 in ship_canadapost_ajax.php but I'm not sure how to proceed from there :( I know some basic php but my skills are limited and this is over my head... I'm not sure which line of code I should be pasting the link to callcp.php. Right above case one I see several URLS - am I meant to replace one of them? i.e. Should I replace the url in the line that reads "define ('ORIGINAL REFERRER'...)" ? ... or the one in that reads "define (SSO, 'https://....')" ... or should I be looking at a different line of code?

The error appears whenever I try making a test purchase. Each time I get to the "Delivery information" step during Checkout, I get this error:

I've actually never tried generating a label before - I didn't think I'd be able to until I successfully placed a test order. I just tried now for the first time and received this error:

At any rate, I'm not too worried about the labels - it would be a nice bonus if they worked, but by far the most important thing right now is getting shipping prices from Canada Post during the checkout process.

 

I thought I'd try switching to GatorHost to see if I have better luck, but they seem to have placed my order on hold because I used Paypal for my payment and am outside the US (I'm in Canada). Anyway, if you have any more suggestions I'd appreciate them and would try them... Otherwise I'll get my order straightened out at GatorHost and try setting up the site there.

 

Regards,

Chris

 

 

Ahh ok so the changes you need to make are to the shipping module.. not the shipping labels files.. ship_canadapost* files are all for automated labels... the shipping module (only 1 file) is located at catalog/includes/modules/shipping/canadapost.php this is file you need to modify.. and you can modify it like the others have to connect to a friends server .. im sure you can find the modifications in one of the other canadapost shipping threads..

 

J

Share this post


Link to post
Share on other sites

I ended up transferring the site from GoDaddy to HostGator... I just installed the Canada Post Shipping Module 4.1 and it works :) Woohoo! I should have done this much sooner. Thanks again insaini for all your suggestions :)

Share this post


Link to post
Share on other sites

Hey, I just had my programmer install this module for me.

 

He finished and said there's a few details I had to fill in myself, mainly this section (

Configure Canada Post Shipping Module 4.1) in the install.htm directions:

 

4. Go to your Canada Post module (admin package -> Modules -> Shipping -> Canada Post) and set your Venture One Login, Pass, Credit Card Alias for Label creation payments, and your Credit Card CVV (DO NOT STORE CREDIT CARD INFORMATION ON YOUR WEBSITE, LET CANADAPOST MAINTAIN IT FOR YOU!)

 

I'm familiar with the VentureOne program b/c I have a card for another small business I operate. However, I don't understand what this credit card information is referring to. I have to have credit card info stored somewhere? I don't recall needing a credit card to set up my VentureOne account.

 

Can someone please explain? Thanks.

Share this post


Link to post
Share on other sites
Hey, I just had my programmer install this module for me.

 

He finished and said there's a few details I had to fill in myself, mainly this section (

Configure Canada Post Shipping Module 4.1) in the install.htm directions:

 

4. Go to your Canada Post module (admin package -> Modules -> Shipping -> Canada Post) and set your Venture One Login, Pass, Credit Card Alias for Label creation payments, and your Credit Card CVV (DO NOT STORE CREDIT CARD INFORMATION ON YOUR WEBSITE, LET CANADAPOST MAINTAIN IT FOR YOU!)

 

I'm familiar with the VentureOne program b/c I have a card for another small business I operate. However, I don't understand what this credit card information is referring to. I have to have credit card info stored somewhere? I don't recall needing a credit card to set up my VentureOne account.

 

Can someone please explain? Thanks.

 

The Credit Card is for when you use automated labels.. if you dont plan on using the automated labels functionality via the admin panel.. then you dont have to worry about it.. if however you intend on using automated labels.. then you need to log into the canadapost shipping application via www.canadapost.com once you login.. store your credit card info at www.canadapost.com once you have it stored there.. automated labels can use it with a reference.. which is the first and last 4 digits with 8 asterisks (*) in the middle .. ie 4324********2343 ... then all you need to pass to canadapost is this reference and the CVV which takes care of the payment for automated labels processing..

 

again you only need to store this information if you intend on using automated labels...

 

J

Share this post


Link to post
Share on other sites

Okay, that makes sense--thank you.

 

One other question:

Once I enter in the weight of my items (including packaging I assume?) and my postal code, then is this module going to automatically determine accurate shipping rates for anywhere in the world? Or, do I have to do anything extra in my admin panels to make sure that can happen?

 

Thanks again.

Share this post


Link to post
Share on other sites

And, am I required to buy certain labels from the post office to use the Automated Label aspect, or can I just buy blank labels and this contribution is going to print out the bar code and all other necessary info on those blank labels?

 

Thanks,

KKT

Share this post


Link to post
Share on other sites
And, am I required to buy certain labels from the post office to use the Automated Label aspect, or can I just buy blank labels and this contribution is going to print out the bar code and all other necessary info on those blank labels?

 

Thanks,

KKT

 

The shipping module stores the total shipment weight with every order recorded and this is the value used when in the automated labels software.. if however the shipment weight isnt in the stored shipping details recorded for the order.. automated labels will display a message asking the user to input the correct shipment weight. However yes the shipping module will determine (as long as the dimensions and weights for each of your products has been added and is correct) the exact shipping costs to anyone in the world.. you can also specify a handling charge via your sellOnline account which is automatically added to the shipping charge to the customer as well as fuel charges, etc..

 

As for the labels.. I use FEDEX labels that I purchased off of ebay.. canadapost doesnt have labels.. although you can use any label sheet or even just blank paper and tape the label onto the box... however the label itself is the exact same as the label received from logging into the canada post shipping application.. barcodes and all that .. nothing to worry about..

 

J

Share this post


Link to post
Share on other sites

What about in the case of multiple purchases?

 

2 things I'm selling is Tshirts and Buttons.

I put into the admin the weight and measurements for a single tshirt and I do the same for the buttons--in the case that they are ordered individually.

 

But, say someone orders 2 Tshirts and 3 packs of buttons (all at once).

 

At that point, i would package them all together and how is the software going to prepare that price?

I can't seriously put in weight and measurements for every possible combination of what an order could be.

 

Thanks for your great support.

 

-KKT

Share this post


Link to post
Share on other sites
What about in the case of multiple purchases?

 

2 things I'm selling is Tshirts and Buttons.

I put into the admin the weight and measurements for a single tshirt and I do the same for the buttons--in the case that they are ordered individually.

 

But, say someone orders 2 Tshirts and 3 packs of buttons (all at once).

 

At that point, i would package them all together and how is the software going to prepare that price?

I can't seriously put in weight and measurements for every possible combination of what an order could be.

 

Thanks for your great support.

 

-KKT

 

That is not a problem.. as long as you have the dimensions and weights entered for each individual item in your catalog .. and you have already defined your boxes in your sellOnline account.. canadapost figures out everything for you..

Share this post


Link to post
Share on other sites
That is not a problem.. as long as you have the dimensions and weights entered for each individual item in your catalog .. and you have already defined your boxes in your sellOnline account.. canadapost figures out everything for you..

 

 

By sellOnline account do you mean the admin panel?

I put in the weight and measurements of two of my items in my admin (Categories/Products) and the individual shipping for each is around $6.20 which is normal, but when I put both items in my shopping cart and go to checkout, the shipping is $12.40 so it's just adding both separate amounts together. That's what I was concerned about b/c if i get an order for a shirt and one of my other items, I'm going to ship them together and it's not going to cost $12.40 to ship, it may even still fall under the $6.20. Make sense?

 

I thought maybe I was supposed to go do something at my canadapost.ca/obc account but that seems separate--just for printing out a label on a some random package not associated with my store.

 

Thanks,

KKT

Share this post


Link to post
Share on other sites
By sellOnline account do you mean the admin panel?

I put in the weight and measurements of two of my items in my admin (Categories/Products) and the individual shipping for each is around $6.20 which is normal, but when I put both items in my shopping cart and go to checkout, the shipping is $12.40 so it's just adding both separate amounts together. That's what I was concerned about b/c if i get an order for a shirt and one of my other items, I'm going to ship them together and it's not going to cost $12.40 to ship, it may even still fall under the $6.20. Make sense?

 

I thought maybe I was supposed to go do something at my canadapost.ca/obc account but that seems separate--just for printing out a label on a some random package not associated with my store.

 

Thanks,

KKT

 

your sellonline account .. you login with your CPC ID .. I believe this is the address http://sellonline.canadapost.ca/servlet/LogonServlet

 

login, setup your boxes and shipping options and handling costs.. as per your shipping charge.. its based on item weight and item dimensions.. and canadapost does the calculations.. if for instance item 1 is say 5cm x 5cm x 5cm and item 2 is 10cm x 10cm x 10cm .. if you have a box that is 15cm x 15cm x 15cm .. canadapost will calculate that you can put upto 3 pieces of item 1 and 1 piece of item 2 .. it then adds the weight of these .. if however your selected items takes more space than one box.. i believe it calculates for multiple boxes.. now the charges youve received above seems as though its calculating for 2 separate shipments.. possibly because you havent added your boxes and setup the options in your sellonline account.

 

J

Share this post


Link to post
Share on other sites

Okay, installing this contrib on a OSC that already has products in it. followed the instructions and double checked (good instructions I might add) but I am getting some errors.

 

Firstly let me point out that I have not configured the CP account details yet, but I don't think that is causing the problem. I have also installed the Ultra Pics contrib and I believe that is where the problems are coming from.

 

So now lets look at the errors:

1) Front End - > shopping_cart.php (Immediately after clicking add to cart). Under the product list box I get the following error:

Sub-Total: 1054 - Unknown column 'p.products_length' in 'field list'

select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_tax_class_id from products p, products_description pd where p.products_id = '110' and pd.products_id = p.products_id and pd.language_id = '0'

[TEP STOP]

 

2)Back End -> Adding Product > Preview Product > Insert. (All part of the admin/categories.php page) When inserting a new product the additional fields appear in the for the CP tariffs, length, weight. But after previewing it and pressing Insert it produces this error:

1054 - Unknown column 'products_length' in 'field list'

insert into products (products_quantity, products_description_short, products_tariff, products_model, products_price, products_date_available, products_weight, products_length, products_height, products_width, products_ready_to_ship, products_status, products_tax_class_id, manufacturers_id, products_image, products_image_med, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_date_added) values ('100', 'CanPost MOD', 'NONE', '', '3', null, '2.5', '6', '1', '5', '1', '1', '1', '0', '120_bv_M.jpg', '120_bv_M.jpg', '121_bv_M.jpg', '121_bv_M.jpg', '121_fv_M.jpg', '121_fv_M.jpg', now())

[TEP STOP]

 

3)Back End - > Editing a product (Again admin/categories.php). You receive this error:

 1054 - Unknown column 'p.products_length' in 'field list'

select pd.products_name, pd.products_description, p.products_description_short, p.products_tariff , pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, p.products_price, p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from products p, products_description pd where p.products_id = '154' and p.products_id = pd.products_id and pd.language_id = '1'

[TEP STOP]

 

Now I have two guesses at what the problem could be. All of these segments of code, which were amended from the UltraPic contrib already, are not as they should be. What I did is I compared the code from the instructions with the modified code of UltraPic From what I gathered is that UltraPic interjected a bunch of things between p.products_image and p.products_price. So I interject the weight, length, width, height and ready to ship between the p.products_price and p.products_date_added - effectively keeping things the same (or so I assumed).

 

the other guess is that the p.products_length was not set up in the database correctly. Though I have very limited experience with this, so I am not even sure how to check/debug this.

 

I hope that provides sufficient info for someone to help me out.

 

thanks

 

Rob

Share this post


Link to post
Share on other sites
the other guess is that the p.products_length was not set up in the database correctly. Though I have very limited experience with this, so I am not even sure how to check/debug this.

 

The fine tooth comb of agony has revealed this:

There is no length, width, height or ready to ship column in the DB Products Table.... .... ....

 

Okay so I went back and did the sql command again... ta-da! Okay so that seemed to fix the errors in all 3 places... BUT now in the front end, My subtotal does not tally up on the first shopping_cart.php page (Or Cart Contents from top right nav). Very odd. No displayed errors. And when you walk through the rest of the checkout process to the checkout_confirmation.php page, it correctly displays the subtotal and other totals.

 

Any ideas?

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