You would have to determine what to do with the results, but something like this will grab all of the categories_descriptions for the product for the tpl_product_info_display.php ...
Code:
<?php
$all_categories = "SELECT categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " WHERE products_id = '" . (int)$_GET['products_id'] . "'";
$all_categories = $db->Execute($all_categories);
$all_categories_description = "";
while (!$all_categories->EOF) {
// categories_description
$sql = "SELECT categories_description
FROM " . TABLE_CATEGORIES_DESCRIPTION . "
WHERE categories_id= :categoriesID
AND language_id = :languagesID";
$sql = $db->bindVars($sql, ':categoriesID', $all_categories->fields['categories_id'], 'integer');
$sql = $db->bindVars($sql, ':languagesID', $_SESSION['languages_id'], 'integer');
$categories_description_lookup = $db->Execute($sql);
if ($categories_description_lookup->RecordCount() > 0) {
$all_categories_description .= $categories_description_lookup->fields['categories_description'];
$all_categories_description .= '<br class="clearBoth" />';
}
$all_categories->MoveNext();
}
echo $all_categories_description;
?>
Bookmarks