Quote:
Originally Posted by Junkie
In several posts back I asked:
"Is there a way to control the number tof products that show as popular products?"
You replied: "Find the popular products query in the code and add a limit to the query. There is no display order for products like there is for categories, but an order by clause could be added to the view category query."
What file and where exactly do I limit the number of products that display? I have tried quite few edits with no luck.
|
hi
look into the file at line 230(hope thats the right, i have modified my)
search for
PHP Code:
$cartplog_product_infos = $db->query_read("SELECT productid, catid, thumb, title, price
FROM " . TABLE_PREFIX . "cartplog_products
WHERE sales = " . intval($cartplog_max_salescnt) . "
");
$cartplog['popular_products'] = '';
while ($cartplog_product_info = $db->fetch_array($cartplog_product_infos))
{
$cartplog['product_productid'] = intval($cartplog_product_info['productid']);
$cartplog['product_catid'] = intval($cartplog_product_info['catid']);
$cartplog['product_thumb'] = strval($cartplog_product_info['thumb']);
$cartplog['product_title'] = htmlspecialchars_uni($cartplog_product_info['title']);
$cartplog['product_price'] = round(floatval($cartplog_product_info['price']), 2);
eval('$cartplog[\'popular_products\'] .= "' . fetch_template('cartplog_product_item') . '";');
$cartplog['popular_products'] .= '</tr><tr>';
}
here now limit the query
PHP Code:
WHERE sales = " . intval($cartplog_max_salescnt) . "
i hope thats it