I don't think there's a plugin available just for that, but you can easily accomplish it with a few minor edits.
First, edit you includes/modules/pages/product_info/main_template_vars.php and replace thiswithCode:$sql = "select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_quantity, p.products_weight, p.products_priced_by_attribute, p.product_is_free, p.products_qty_box_status, p.products_quantity_order_max, p.products_discount_type, p.products_discount_type_from, p.products_sort_order, p.products_price_sorter from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";Then, addCode:$sql = "select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_quantity, p.products_weight, p.products_priced_by_attribute, p.product_is_free, p.products_qty_box_status, p.products_quantity_order_max, p.products_discount_type, p.products_discount_type_from, p.products_sort_order, p.products_price_sorter, pd.products_viewed from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";somewhere between lines 99 and 133, for example right afterCode:$products_viewed = $product_info->fields['products_viewed'];Next, edit your includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php and add the following line where you want to display the counter:Code:$products_url = $product_info->fields['products_url'];The language is obviously hard-coded in this case, but you can easily change it into a definition if you want...Code:<?php echo 'This product was viewed ' . $products_viewed . ' times'; ?>


Reply With Quote
