Hello - I am 'trying' to add dimensional support to the canada post module for attributes
The reason attribute dimensions are needed is so I can provide accurate (and much lower) priced shipping quotes as we are currently losing customers due to scary shipping costs from courier rates and a blanket dimension for all attributes results in higher shipping quotes
from modules/shipping/canadapost.php
Code:
// Existing:
$products_array = $_SESSION['cart']->get_products();
for ($i=0; $i<count($products_array); $i++)
// New:
$attribute_length_query = "select products_attributes_length
from " . TABLE_PRODUCTS_ATTRIBUTES . "
where products_id = '" . (int)$products_array[$i]['id'] . "'
and options_id = '" . (int)$products_array[$i]['options_id'] . "'
and options_values_id = '" . (int)$products_array[$i]['options_values_id'] . "'";
$attribute_length = $db->Execute($attribute_length_query);
I created columns in the products_attributes table, one above named products_attributes_length (length as per length/width/height) that will be set using the attributes_controller.php set however the script is failing at the Execute statement and the shipping estimator doesn't show in the bottom of my shopping cart
Hopefully someone can throw me a bone, note I have limited PHP just trying to do what I can to make this work for the store
p.s. if a mod can please delete thread 185580 that would be appreciated this one is more relevant
thanks in advance
Bookmarks