Looks like Monday June 15.
To clarify this update continues on the previous Canada Post SellOnline system.
Funding has not been established to code for their newer API tools at this time.
Printable View
Looks like Monday June 15.
To clarify this update continues on the previous Canada Post SellOnline system.
Funding has not been established to code for their newer API tools at this time.
What kind of funding is needed to create the new mod, since the old system is going to be retired.
thebeadyeye - This module took over a week to rework and test on no less than 3 hosts, 2 - 1.56c test sites and 4 - 1.56c live production sites. It was derived from a working 1.55f version (1 year of successful production use). And... took nearly a week to compile for two separate production releases - the public Zen Cart forum and the unreleased Twitch Base6 core.
I have submitted the public version 1.6.5 for review today! If anyone would like to donate to the cause to discuss funding the new API please email me directly or click the donate button on my homepage :bigups:
Of course there's always one line of code I missed...
includes/modules/shipping/canadapost.php
line 18 - replace this:
var $moduleVersion = '1.6.1';
with this:
var $moduleVersion = '1.6.5 - 20a.20d';
I've submitted a corrected version to the forum!
Thank you for updating this module.
I'm testing upgrade on my development install (WAMP) and found issue with the Lettermail Shipping.
On my production site lettermail rates only show if package is under max lettermail weight and it fits into one of the lettermail envelopes setup in my sellonline profile (height is set at 1.8cm).
In my development environment lettermail rates are showing if package is under max lettermail weight but over height to fit into lettermail envelope.
I made change in includes/modules/shipping/canadapost.php to fix
change this
to thisCode:154 $canadapostQuote = $this->_canadapostGetQuote();
155
156 // Twitch bugfix - add lettermail switch control
157 // orginal code if ($this->lettermail_available && ($shipping_weight <= $this->lettermail_max_weight))
158 if (MODULE_SHIPPING_CANADAPOST_LETTERMAIL_STATUS == 'True' && ($shipping_weight <= $this->lettermail_max_weight))
Code:154 $canadapostQuote = $this->_canadapostGetQuote();
155
156 // Twitch bugfix - add lettermail switch control
157 // orginal code if ($this->lettermail_available && ($shipping_weight <= $this->lettermail_max_weight))
158 if (MODULE_SHIPPING_CANADAPOST_LETTERMAIL_STATUS == 'True' && lettermail_available)
Thank you for updating this module. If you
I'm testing this on a 1.5.6c upgrade and found a couple of issues
In admin copying a product with dim types kgs/cm and dimensions length 24, width 12, height 1.5
the copied product has dim types lbs/in and dimensions length 0, width 24, height 12
I made change to admin/includes/modules/copy_product_confirm.php insert statement line 72
toCode:INSERT INTO " . TABLE_PRODUCTS . " (products_type, products_quantity, products_model, products_image,
products_price, products_virtual, products_date_added, products_date_available,
products_weight,
products_weight_type, products_dim_type, products_length, products_width, products_height,
products_ready_to_ship,
products_status, products_tax_class_id,
manufacturers_id, products_quantity_order_min, products_quantity_order_units,
products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed,
product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max,
products_sort_order, products_price_sorter, master_categories_id)
VALUES ('" . zen_db_input($product->fields['products_type']) . "',
'" . $products_quantity . "',
'" . zen_db_input($product->fields['products_model']) . "',
'" . zen_db_input($product->fields['products_image']) . "',
'" . $products_price . "',
'" . zen_db_input($product->fields['products_virtual']) . "',
now(),
" . (zen_not_null(zen_db_input($product->fields['products_date_available'])) ? "'" . zen_db_input($product->fields['products_date_available']) . "'" : 'null') . ",
'" . $products_weight . "', '0',
'" . zen_db_input($product->fields['products_weight_type']) . "',
'" . zen_db_input($product->fields['products_dim_type']) . "',
'" . zen_db_input($product->fields['products_length']) . "',
'" . zen_db_input($product->fields['products_width']) . "',
'" . zen_db_input($product->fields['products_height']) . "',
'" . zen_db_input($product->fields['products_ready_to_ship']) . "',
'" . (int)$product->fields['products_tax_class_id'] . "',
'" . (int)$product->fields['manufacturers_id'] . "',
'" . zen_db_input(($product->fields['products_quantity_order_min'] == 0 ? 1 : $product->fields['products_quantity_order_min'])) . "',
'" . zen_db_input(($product->fields['products_quantity_order_units'] == 0 ? 1 : $product->fields['products_quantity_order_units'])) . "',
'" . zen_db_input($product->fields['products_priced_by_attribute']) . "',
'" . (int)$product->fields['product_is_free'] . "',
'" . (int)$product->fields['product_is_call'] . "',
'" . (int)$product->fields['products_quantity_mixed'] . "',
'" . zen_db_input($product->fields['product_is_always_free_shipping']) . "',
'" . zen_db_input($product->fields['products_qty_box_status']) . "',
'" . zen_db_input($product->fields['products_quantity_order_max']) . "',
'" . zen_db_input($product->fields['products_sort_order']) . "',
'" . zen_db_input($product->fields['products_price_sorter']) . "',
'" . zen_db_input($categories_id) . "')");
Code:$db->Execute("INSERT INTO " . TABLE_PRODUCTS . " (products_type, products_quantity, products_model, products_image,
products_price, products_virtual, products_date_added, products_date_available,
products_weight,
products_weight_type, products_dim_type, products_length, products_width, products_height,
products_ready_to_ship,
products_status, products_tax_class_id,
manufacturers_id, products_quantity_order_min, products_quantity_order_units,
products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed,
product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max,
products_sort_order, products_price_sorter, master_categories_id)
VALUES ('" . zen_db_input($product->fields['products_type']) . "',
'" . $products_quantity . "',
'" . zen_db_input($product->fields['products_model']) . "',
'" . zen_db_input($product->fields['products_image']) . "',
'" . $products_price . "',
'" . zen_db_input($product->fields['products_virtual']) . "',
now(),
" . (zen_not_null(zen_db_input($product->fields['products_date_available'])) ? "'" . zen_db_input($product->fields['products_date_available']) . "'" : 'null') . ",
'" . $products_weight . "',
'" . zen_db_input($product->fields['products_weight_type']) . "',
'" . zen_db_input($product->fields['products_dim_type']) . "',
'" . zen_db_input($product->fields['products_length']) . "',
'" . zen_db_input($product->fields['products_width']) . "',
'" . zen_db_input($product->fields['products_height']) . "',
'" . zen_db_input($product->fields['products_ready_to_ship']) . "', '0',
'" . (int)$product->fields['products_tax_class_id'] . "',
'" . (int)$product->fields['manufacturers_id'] . "',
'" . zen_db_input(($product->fields['products_quantity_order_min'] == 0 ? 1 : $product->fields['products_quantity_order_min'])) . "',
'" . zen_db_input(($product->fields['products_quantity_order_units'] == 0 ? 1 : $product->fields['products_quantity_order_units'])) . "',
'" . zen_db_input($product->fields['products_priced_by_attribute']) . "',
'" . (int)$product->fields['product_is_free'] . "',
'" . (int)$product->fields['product_is_call'] . "',
'" . (int)$product->fields['products_quantity_mixed'] . "',
'" . zen_db_input($product->fields['product_is_always_free_shipping']) . "',
'" . zen_db_input($product->fields['products_qty_box_status']) . "',
'" . zen_db_input($product->fields['products_quantity_order_max']) . "',
'" . zen_db_input($product->fields['products_sort_order']) . "',
'" . zen_db_input($product->fields['products_price_sorter']) . "',
'" . zen_db_input($categories_id) . "')");
Lettermail shipping option was showing when weight less than max lettermail weight but not "letter" packaging setup in sellonline profile
I made change in includes/modules/shipping/canadapost.php
toCode:
$canadapostQuote = $this->_canadapostGetQuote();
// 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))
Code:$canadapostQuote = $this->_canadapostGetQuote();
// 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' && $this->lettermail_available)
dchquilling As you can see there are some issues with the lettermail returning rates related to store setting box sizes in Admin > Configuration > Shipping/Packaging relative to their own products relative to what Canada Post wants to see to return a rate relative to the data provided.
That Twitch Bugfix line helped ensure the lettermail would return a rate with the conditions mentioned in the install also relative to the 'matrix' these types of modules can create with so many potential options/settings and sizes.
You mentioned mixed weight/size metric vs imperial within a product - which is not recommended in the module (but happens I understand) - and provided a fix that works for you. Great! However, because the various settings in various carts cause multiple potential alternative output paths with different data at any endpoint... these changes may not work for everyone if say the box sizes or weights change or the metric/imperial line is crossed or mixed.
So, when time/funding permits I'll have a look at the change and test all of the potential positive solutions and publish a fix/updated module unless someone beats me to it!
If you could provide the settings in Shipping/Packaging, those in all of the lbs/kgs language files, an example of two products one metric one imperial and those set in your Canada Post module I can start testing where you are.
Thanks!
Sorry - I didn't explain properly - All the products in my store are kgs/cm - no lbs/in
In the insert statement the product_status value '0' was being set after products_weight but should have been set after products_ready_to_ship according to the column order in statement
As a result the values for next 6 columns were off by 1 (width column was set to length value, height column was set to width value)
Advanced Developers only:
To completely remove Canada Post module you will need to dump all of the product fields made by the shipping module install - after uninstalling it. This SQL Update will also permanently remove the data within so... ONLY use this for upgrades and testing - Best not to lose manually entered data.
Backup the database now. Twice. And test your backups.
ALTER TABLE `products` DROP `products_weight_type`;
ALTER TABLE `products` DROP `products_dim_type`;
ALTER TABLE `products` DROP `products_length`;
ALTER TABLE `products` DROP `products_width`;
ALTER TABLE `products` DROP `products_height`;
ALTER TABLE `products` DROP `products_ready_to_ship`;
Future Twitch versions Base6 will have these fields included in the core to ensure there is no change or need for changes when installing/uninstalling shipping modules.