Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Canada Post Automated Labels 2.0 AND Canada Post Shipping Module 4.0


insaini

Recommended Posts

This is the official topic for the combined package of

 

Canada Post Automated Labels 2.0 and Canada Post Shipping Module 4.0

 

*Improvements*

-------------------

 

- AJAX Label Generation

- osCommerce Units in configuration (rather than with each individual product)

- Both contributions now are connected to each other via VentureOne information

 

 

This has been tested as much as I could. I will support this as well as I can however if I dont reply try sending me a PM or emailing me.

Lets get some of you using this asap so we can be sure all the kinks are out.

 

Download Here http://addons.oscommerce.com/info/5842

J

Edited by insaini
Link to comment
Share on other sites

  • Replies 230
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

Ive uploaded versions 2.1 of Automated Labels and 4.1 of the Shipping Module.

 

Automated Labels 2.1 Requires Shipping Module 4.1 as they are basically connected in the way they work.

 

The Shipping Module will output something like this

 

Canada Post [1 box(es) to be shipped] 'package_name' - 'weight'(kg) (Expedited US Business etc...)

 

The 'weight' component is the total weight of the package including the weight of your items AND your packaging material. This weight is then extracted by Automated Labels and is used as the total package weight value.. before you were required to input the total package weight which is no longer necessary but you do still have that option to do so. This makes shipping labels a lot easier.

 

Next when I have time I will also add packaging dimensions to the shipping module output and have automated labels extract those values as well as currently you have enter those values yourself..

 

As well I will also implement methodology for Multiple Automated Labels.. (for multiple boxes being returned by the Canada Post shipping module) .. currently the automated labels software can only handle 1 box shipments...

 

The full package is on the contribution page.. also fixed was a bug with domestic shipments.. everything seems to be working just fine..

Link to comment
Share on other sites

There was a missing '&' character in the payment sequence in the ship_canadapost_ajax.php file.. as well ive updated the label filename logic to the sequence associated with it..

 

Full package is uploaded.

 

J

Link to comment
Share on other sites

wow man THANK YOUUU so much .. this is exactly was i was looking for. creating these labels was a headache

 

Glad its worked out for you.. but I cant take all the credit.. Natrium created the original contribution without it I could never have produced this extension..

 

:thumbsup:

 

J

Link to comment
Share on other sites

Uploaded is Canada Post Automated Labels 2.2 and Canada Post Shipping Module 4.1

 

The only changes were to the Automated Labels .. there was a missing include and a button file.. There was also a custom input text field function which wasnt necessary and cut out.. also updated were the install instructions.. no extra added functionality in this release.

 

J

Link to comment
Share on other sites

I'm wondering if anyone has been able to get this working on a GoDaddy shared hosting account yet? According to the installation instructions,

 

libcurl-7.12 does not work and is what comes with GoDaddy Virtual Dedicated Servers. You will need to replace with a higher version (other versions not tested) in order for this contribution to work)

 

I've tried contacting GoDaddy to see how I can replace libcurl-7.12 with 7.18 but haven't heard back yet... Any help would be most appreciated!

 

Chris

 

P.S. Thanks for all your hard work :)

Link to comment
Share on other sites

Just to follow up, here's the word back from GoDaddy re: cURL support:

 

Thank you for contacting Online Support with regards to this issue. We do support CURL extensions on all of our Linux hosting plans. The current version of cURL supported is 7.16.2, and unfortunately we cannot upgrade this at this time. I sincerely apologize for any inconvenience this may have caused.
Link to comment
Share on other sites

Just to follow up, here's the word back from GoDaddy re: cURL support:

 

Chris, it may work on 7.16 .. I can't say for sure..the most important thing is that curl is built with openssl .. the way you can verify this is by going to admin -> tools -> server info ..

 

scroll to curl and see how its been built (it should include openssl at least v0.97)

 

you can also see if it works by commenting out step 3 to step 10 in ship_canadapost_ajax.php

 

case 1:
break;
case 2:
break; /*
case 3:
break;
..
case 10:
break; */
default:
break;

 

comment out case 3 to case 10 .. if when you click submit it displays "Logged In" for step 2 .. then you know it will work.

 

J

Link to comment
Share on other sites

scroll to curl and see how its been built (it should include openssl at least v0.97)

 

Looks like it may work after all then :) Here's what I found under "server info":

 

CURL support enabled

CURL Information libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.2.3

 

I'll experiment some more this evening.

 

Chris

Link to comment
Share on other sites

Looks like it may work after all then :) Here's what I found under "server info":

I'll experiment some more this evening.

 

Chris

 

hmm.. well that does say libcurl 7.10 .. which isnt libcurl 7.16 .. but give it a go and see how it works out..

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to install this mod on a newly install of osCommerce v2.2 RC2a.

 

Running the database install for this mod it's failing.

 

Line

ADD products_length DECIMAL(6,2) DEFAULT '12' NOT NULL after products_dim_type,

fails because I do not have column "products_dim_type".

 

Looking at the upgrade db sql file, we're dropping the column:

ALTER TABLE products DROP products_dim_type;

 

Is this column required?

Edited by rulix
Link to comment
Share on other sites

I'm trying to install this mod on a newly install of osCommerce v2.2 RC2a.

 

Running the database install for this mod it's failing.

 

Line

ADD products_length DECIMAL(6,2) DEFAULT '12' NOT NULL after products_dim_type,

fails because I do not have column "products_dim_type".

 

Looking at the upgrade db sql file, we're dropping the column:

ALTER TABLE products DROP products_dim_type;

 

Is this column required?

 

 

good catch,

 

it should be

 

ADD products_length DECIMAL(6,2) DEFAULT '12' NOT NULL after products_weight,

 

sorry about that.. change it to that and run the script again.. should be good..

 

J

Link to comment
Share on other sites

good catch,

 

it should be

 

ADD products_length DECIMAL(6,2) DEFAULT '12' NOT NULL after products_weight,

 

sorry about that.. change it to that and run the script again.. should be good..

 

J

 

No problem, thank you. :)

Edited by rulix
Link to comment
Share on other sites

Another thing I found, in the document;

 

Open admin/categories.php

 

Find:

$sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),

 

It's actually:

$sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),

 

 

You've also got the text:

In the same line after 'pd.product_description' ADD:

 

It should read:

In the same line after 'pd.products_description' ADD:

Edited by rulix
Link to comment
Share on other sites

Another thing I found, in the document;

 

Open admin/categories.php

 

Find:

$sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),

 

It's actually:

$sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),

You've also got the text:

In the same line after 'pd.product_description' ADD:

 

It should read:

In the same line after 'pd.products_description' ADD:

 

Thanks.. ill update the documentation on that..

 

Hows the module working out otherwise?

Link to comment
Share on other sites

Thanks.. ill update the documentation on that..

 

Hows the module working out otherwise?

 

 

I haven't made it far enough to test it yet. I'm dealing with the empty shopping cart issue at the moment. I'll let you know though.

 

Thanks. :)

Link to comment
Share on other sites

Need help guys.

New install on OSC 2.2 RC2a

 

Ran the new install SQL file with this result.

 

###########################################################################
# CANADA POST SHIPPING MODULE DB QUERIES
###########################################################################
# Canada Post Shipping Module with dimensions using osCommerce stored units
ALTER TABLE products ADD products_length DECIMAL( 6, 2 ) DEFAULT '12' NOT NULL AFTER products_dim_type,
ADD products_width DECIMAL( 6, 2 ) DEFAULT '12' NOT NULL AFTER products_length,
ADD products_height DECIMAL( 6, 2 ) DEFAULT '12' NOT NULL AFTER products_width,
ADD products_ready_to_ship ENUM( '0', '1' ) NOT NULL default '0' AFTER products_height;

MySQL said: Documentation
#1054 - Unknown column 'products_dim_type' in 'products'

 

If you do all the mods then activate Canada Post with in the Admin, here is the error code from the shopping cart.

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 = '51' and pd.products_id = p.products_id and pd.language_id = '1'

[TEP STOP]

 

Where do I go, only know enough to be dangerous.

 

Thanks,

Shane

Link to comment
Share on other sites

Need help guys.

New install on OSC 2.2 RC2a

 

Ran the new install SQL file with this result.

 

###########################################################################
# CANADA POST SHIPPING MODULE DB QUERIES
###########################################################################
# Canada Post Shipping Module with dimensions using osCommerce stored units
ALTER TABLE products ADD products_length DECIMAL( 6, 2 ) DEFAULT '12' NOT NULL AFTER products_dim_type,
ADD products_width DECIMAL( 6, 2 ) DEFAULT '12' NOT NULL AFTER products_length,
ADD products_height DECIMAL( 6, 2 ) DEFAULT '12' NOT NULL AFTER products_width,
ADD products_ready_to_ship ENUM( '0', '1' ) NOT NULL default '0' AFTER products_height;

MySQL said: Documentation
#1054 - Unknown column 'products_dim_type' in 'products'

 

If you do all the mods then activate Canada Post with in the Admin, here is the error code from the shopping cart.

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 = '51' and pd.products_id = p.products_id and pd.language_id = '1'

[TEP STOP]

 

Where do I go, only know enough to be dangerous.

 

Thanks,

Shane

 

 

Shane, only had to read post 14 above to note that a change was needed.. take a look

 

http://www.oscommerce.com/forums/index.php?s=&...t&p=1242251

 

once you make the change and run it on the database again you should be fine..

 

J

Link to comment
Share on other sites

Shane, only had to read post 14 above to note that a change was needed.. take a look

 

http://www.oscommerce.com/forums/index.php?s=&...t&p=1242251

 

once you make the change and run it on the database again you should be fine..

 

J

 

J,

 

Close but no cigar. The automated labels portion of the SQL code still errors.

If you remove it and run the last portion for CP shipping module it runs fine.

 

Now I have a new error that appears in the Manufacturers module.

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 ' countries_id manufacturers' at line 1

select count(*) as total from, countries_id manufacturers

[TEP STOP]

 

Here is the SQL error that pops up when trying to run Automated label script portion.

 

 ##########################################################################
# CANADA POST AUTOMATED LABELS DB QUERIES
##########################################################################
ALTER TABLE products ALTER TABLE manufacturers ADD countries_id INT NOT NULL;

MySQL said: Documentation
#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 'TABLE manufacturers ADD countries_id INT NOT NULL' at line 3

 

What am I missing?

Appreciate the help more than you can know.

Link to comment
Share on other sites

Hey, I'm trying to determine whether this is the right Contribution for me.

 

I'm in Canada, i have a very small store that just sells some one-off items, some tshirts and buttons, I'm not charging tax and I'm thinking that the easiest thing to do would be to assign different countries or regions a flat shipping rate per item.

I do want to offer full international shipping though. Is this something that can be done with this contribution?

 

thanks,

KKT

Link to comment
Share on other sites

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" :

 

---

 

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

Step 1. Initialized.

 

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

Step 2. Error: Failed check in /home2/epipccom/public_html/pueblito.ca/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.

 

---

so I remove the '\' character on line 75 and try to process the order, but I still get the following error message on the right hand side underneath "initialized".

 

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

 

 

If anyone can help I'd be very grateful.

 

Cheers

Link to comment
Share on other sites

J,

 

Close but no cigar. The automated labels portion of the SQL code still errors.

If you remove it and run the last portion for CP shipping module it runs fine.

 

Now I have a new error that appears in the Manufacturers module.

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 ' countries_id manufacturers' at line 1

select count(*) as total from, countries_id manufacturers

[TEP STOP]

 

Here is the SQL error that pops up when trying to run Automated label script portion.

 

 ##########################################################################
# CANADA POST AUTOMATED LABELS DB QUERIES
##########################################################################
ALTER TABLE products ALTER TABLE manufacturers ADD countries_id INT NOT NULL;

MySQL said: Documentation
#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 'TABLE manufacturers ADD countries_id INT NOT NULL' at line 3

 

What am I missing?

Appreciate the help more than you can know.

 

 

Where did you get that sql command?

 

ALTER TABLE products ALTER TABLE manufacturers ADD countries_id INT NOT NULL;

 

That is no where in the contribution..

 

the command is

 

ALTER TABLE products
ADD products_description_short VARCHAR( 64 ) NOT NULL,
ADD products_tariff VARCHAR( 32 ) NOT NULL;

ALTER TABLE manufacturers ADD countries_id INT NOT NULL;

ALTER TABLE orders ADD cp_tracking VARCHAR( 18 ) NULL;

 

I have no idea where you got that above command that you tried to run and got that error..

 

J

Link to comment
Share on other sites

Hey, I'm trying to determine whether this is the right Contribution for me.

 

I'm in Canada, i have a very small store that just sells some one-off items, some tshirts and buttons, I'm not charging tax and I'm thinking that the easiest thing to do would be to assign different countries or regions a flat shipping rate per item.

I do want to offer full international shipping though. Is this something that can be done with this contribution?

 

thanks,

KKT

 

You get whatever shipping methods canada post provides.. that is shipping within canada, usa, or international ..

 

once you set you sellonline and ventureone accounts.. you can also specify flat rate shipping.. handling charges.. etc..

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