Posted 18 July 2004, 15:17
Ok folks, I'm getting some strange results. I have tracked down where we need to add or modify the info we need for the "Vendor Shipping". In catalog/includes/classes/shopping_cart.php, all the products info is collected and sorted such to be passed to the shipping modules, then the "class" shipping.php collects and sorts the shipping modules to be used for the quotes. So, these 2 files will need to be modified. Or I can try to create a new "class" to handle the functions we need. The code would be much cleaner if I can modify rather than create. That in mind, my plan is to create a "vendor" list rather than just a "product" list. Then pass the needed info on. The problem I am having is that the tables don't seem to be linking properly with the code I am used to using, the following code structure works in several other mods I have done:
// products price <-----mlti_vendor v.products_ship_method,
$product_query = tep_db_query("select v.vendors_id, v.vendors_name, v.vendors_zipcode, v.handling_charge, p.products_id, p.products_price, p.products_tax_class_id, p.products_weight from products p, vendors v where v.vendors_id=p.vendors_id and p.products_id = '" . (int)$products_id . "'");
However, this is returning this message:
1054 - Unknown column 'v.handling_charge' in 'field list'
select v.vendors_id, v.vendors_name, v.vendors_zipcode, v.handling_charge, p.products_id, p.products_price, p.products_tax_class_id, p.products_weight from products p, vendors v where v.vendors_id=p.vendors_id and p.products_id = '46'
I know that "handling_charge" exists in the "Vendors" table along with the ID, zipcode, name and many others. So, if it can find these other fields, which apparrently it can since the error starts after processing the others, why is it having trouble with "handling_charge" and nothing else? I don't get it. Any ideas anyone?