Hi Folks,
I have used this module in the past with success. I tried to create a new Sell Online profile for a client and got this response from Sell Online:
Thank you for your interest in the Canada Post web services.
The Sell Online program will be decommissioned in the near future, and as such we are no longer creating new accounts.
The Web Developer program has been developed to replace and enhance the offerings of Sell Online.
Not only will your customers be able to choose the speed and cost of delivery, but our APIs will simplify the entire purchase process for both you and your online shoppers. With web services, you can:
- Automate the printing of shipping labels
- Let customers track purchases directly from your website
- Allow shoppers to print return labels from your site
- Give shoppers the option to have purchases delivered to the Post Office of their choice- near home, the office or the cottage
To get started with web services immediately visit:
Join the Canada Post Developer Program now
If you have questions about how our web services can help you sell more online, call us at 1-866-511-0546 or email us at sellonline AT canadapost DOT ca.
Trinity
Many thanks for a high-fiver!
Bug found and fixed...
includes/modules/shipping/canadapost.php
replace line 165
if ($this->lettermail_available && ($shipping_weight <= $this->lettermail_max_weight))
with this:
// Twitch bugfix - add lettermail switch control
// orginal code if ($this->lettermail_available && ($shipping_weight <= $this->lettermail_max_weight))
if (MODULE_SHIPPING_CANADAPOST_LETTERMAIL_STATUS == 'True' && ($shipping_weight <= $this->lettermail_max_weight))
Enable Lettermail Rates switch will now function properly.
Remember this uses the Max weight for Lettermail and the table rate settings correctly and needs 0's as placeholders or you will get non-numeric errors in your log folder.
Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
Twitch Base8 - Obsidian - This, is what's new.
Product Name Error
'AA internal problem occurred. Please contact the Sell Online Customer service Desk at mailto:/[email protected]'
Product names can not be passed to Canada Post with markup ' or , special characters.
Quick fix - Method to drop apostrophe's.
replace line 162
$this->_addItem($products_array[$i]['quantity'], $products_array[$i]['final_price'], $products_array[$i]['weight'], $products_array[$i]['length'], $products_array[$i]['width'], $products_array[$i]['height'], $this->_xmlentities($products_array[$i]['model'] . "/" . $products_array[$i]['name']), $products_array[$i]['ready_to_ship'], $products_array[$i]['dim_type'], $products_array[$i]['weight_type']);
with this:
$twi_cleanPname = $products_array[$i]['name']; // Twitch fix Canada Post error 'AA internal problem occurred...'
$twi_cleanPname = preg_replace('/�*39;|\'/', '', $twi_cleanPname); // clean out apostrophe's
$this->_addItem($products_array[$i]['quantity'], $products_array[$i]['final_price'], $products_array[$i]['weight'], $products_array[$i]['length'], $products_array[$i]['width'], $products_array[$i]['height'], $this->_xmlentities($products_array[$i]['model'] . "/" . $twi_cleanPname /* $products_array[$i]['name'] */), $products_array[$i]['ready_to_ship'], $products_array[$i]['dim_type'], $products_array[$i]['weight_type']);
The Canada Post server will now interpret the data correctly and pass the rate quotes properly again :)
Redoc Note:
One could amend the _xmlentities or create a new function to clean other characters out in future versions.
Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
Twitch Base8 - Obsidian - This, is what's new.
LOL I just came here to report the same bug @Twitch reported above. In my case, the name had the symbol for inches (") in it, and that broke Canada Post. Same temporary work around - just remove.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
I have a number of products with & and % in them, is there a workaround for those?
Tried playing with the code fix provided by Twitch but didn't work.
Any help is appeciated.
Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
Twitch Base8 - Obsidian - This, is what's new.
His change didn't include %. You could just add that if you wish.
$twi_cleanPname = preg_replace('/%�*39;|\'/', '', $twi_cleanPname);
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Bookmarks