Hmm, still no go. The function doesn't seem to return any value. Here is the function as it stands:
Code:
/*
* Looks up a products tax class text description based on tax_class_id and return as $products_location.
* Added to enable product location functionality.
* TABLES: tax_class
*/
function zen_get_products_location($tax_class_id) {
global $db;
$the_products_location_query = "select tax_class_id from " . TABLE_TAX_CLASS . " where tax_class_id = '" . (int)$tax_class_id . "'" . " order by tax_class_id";
$the_products_location = $db->Execute($the_products_location_query);
return $the_products_location->fields['tax_class_title'];
}
And here is the relevant section of my main_template_vars.php:
Code:
//Added to enable lot location display:
$products_location = zen_get_products_location('products_tax_class_id');
Does that look about right to you? *confused*
Bookmarks