add(NAVBAR_TITLE, tep_href_link(FILENAME_TOPSELLERS_PRODUCTS));
$current_page = FILENAME_TOPSELLERS_PRODUCTS;
require(DIR_WS_INCLUDES . 'template_top.php');
?>
0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name";
$best_sellers_split = new splitPageResults($best_sellers_query_raw, MAX_DISPLAY_PRODUCTS_BESTSELLER);
if ($best_sellers_split->number_of_rows > 0) {
echo tep_gridlist_build();
}
if (($best_sellers_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>
display_count(TEXT_DISPLAY_NUMBER_OF_TOPSELLERS); ?>
display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))).''.TEXT_RESULT_PAGE.''; ?>
number_of_rows > 0) {
?>
sql_query);
$best_sellers_content = '
';
$i=0;
while ($best_sellers = tep_db_fetch_array($best_sellers_query)) {
$i++;
$product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$best_sellers['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product = tep_db_fetch_array($product_query);
if ($new_price = tep_get_products_special_price($best_sellers['products_id'])) {
$products_price = $currencies->display_price($best_sellers['products_price'], tep_get_tax_rate($best_sellers['products_tax_class_id']));
$products_price_new = $currencies->display_price($new_price, tep_get_tax_rate($best_sellers['products_tax_class_id']));
} else {
$products_price = $currencies->display_price($best_sellers['products_price'], tep_get_tax_rate($best_sellers['products_tax_class_id']));
$products_price_new = '';
}
if (strlen(strip_tags($product['products_description'])) > 0 && PRODUCT_LIST_DESCRIPTION_GRID > 0) {
if (strlen(strip_tags($product['products_description'])) > PRODUCT_LIST_DESCRIPTION_GRID) {
$p_desc_grid = ''.mb_substr(strip_tags($product['products_description']), 0, PRODUCT_LIST_DESCRIPTION_GRID, 'UTF-8').'...'.'
';
}
else {
$p_desc_grid = ''.strip_tags($product['products_description']).'
';
}
} else {
$p_desc_grid ='';
}
if (strlen(strip_tags($product['products_description'])) > 0 && PRODUCT_LIST_DESCRIPTION_LIST > 0) {
if (strlen(strip_tags($product['products_description'])) > PRODUCT_LIST_DESCRIPTION_LIST) {
$p_desc_list = ''.mb_substr(strip_tags($product['products_description']), 0, PRODUCT_LIST_DESCRIPTION_LIST, 'UTF-8').'...'.'
';
}
else {
$p_desc_list = ''.strip_tags($product['products_description']).'
';
}
} else {
$p_desc_list ='';
}
$best_sellers_content .= tep_product_block_build(
$productId = $best_sellers['products_id'],
$productImage = $best_sellers['products_image'],
$productName = $best_sellers['products_name'],
$productAdded = $best_sellers['products_date_added'],
$productManufacturerId = $best_sellers['manufacturers_id'],
$productManufacturerName = $best_sellers['manufacturers_name'],
$productPrice = $products_price,
$productPriceNew = $products_price_new,
$productWeight = '',
$productQuantity = '',
$productModel = '',
$productDescription = $p_desc_list.$p_desc_grid,
$productButtons = true,
$pageComming = FILENAME_TOPSELLERS_PRODUCTS,
$elCount = $i
);
}
$best_sellers_content .= '
';
echo $best_sellers_content;
?>
number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>
display_count(TEXT_DISPLAY_NUMBER_OF_TOPSELLERS); ?>
display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))) . ''.TEXT_RESULT_PAGE.''; ?>