the language_id is not used in the query, selecting the first products_id. In my db the name is ommited there so the name is left empty. Fix is as follows (simply added the languageid to the query):
// Get Product Info
//BOF Added languageid (otherwise products_name is empty)
//$product_query = tep_db_query("select p.products_model, p.products_price, pd.products_name, p.products_tax_class_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_id = '" . (int)$add_product_products_id . "'");
$product_query = tep_db_query("select p.products_model, p.products_price, pd.products_name, p.products_tax_class_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id where p.products_id = '" . (int)$add_product_products_id . "' and pd.language_id = '" . $languages_id . "'");
//EOF Added languageid
$product = tep_db_fetch_array($product_query);
$country_id = oe_get_country_id($order->delivery["country"]);
$zone_id = oe_get_zone_id($country_id, $order->delivery['state']);
$products_tax = tep_get_tax_rate($product['products_tax_class_id'], $country_id, $zone_id);
(this is not a full package, no files attached)
More...




LinkBack URL
About LinkBacks









Bookmarks