bigjoed,
For breadcrumbs - add this to the top of: includes/modules/pages/best_sellers/header_php.php
Hope this helps,Code:$breadcrumb->add(TABLE_HEADING_BEST_SELLERS);
bigjoed,
For breadcrumbs - add this to the top of: includes/modules/pages/best_sellers/header_php.php
Hope this helps,Code:$breadcrumb->add(TABLE_HEADING_BEST_SELLERS);
I want to place the link to this bestsellers mod in the "our products" sidebox along with the "new products", "featured products" and "all product" links.
Can anyone advise how i do this please.
I have installed it and workes great, except .. well check it out
http://rcnut.com/best_sellers
on the top of the items list it shows
instead ofTABLE_HEADING_IMAGE TABLE_HEADING_MODEL Item Name TABLE_HEADING_MANUFACTURER TABLE_HEADING_PRICE Stock.
Any ideas ? :/Product Image Model- Item Name Manufacturer Price Stock.
The definitions for those are missing, you can edit your language file to fix it.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Thanks, I added those to best_sellers.php and that fixed it
but I still having a small problem, chek the page, the defenitions and descriptions below dont line up, I have an extra one "Model" that does not show, and that trows the rest off
Open includes/modules/pages/best_sellers/header_php.php, replace the content by:PHP Code:
<?php
/**
* Best Sellers Alpha 1
*/
if (BEST_SELLERS_SHOW_OUT_OF_STOCK == 'true') {
$listing_sql = "select distinct p.products_quantity, p.products_id, p.products_image, p.products_model, pd.products_name, p.products_ordered
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_status = '1'
and p.products_ordered > 0
and p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
order by p.products_ordered desc, pd.products_name";
} else {
$listing_sql = "select distinct p.products_quantity, p.products_id, p.products_image, p.products_model, pd.products_name, p.products_ordered
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_status = '1'
and p.products_ordered > 0
and p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_quantity > 0
order by p.products_ordered desc, pd.products_name";
}
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);
/* ,
'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
*/
asort($define_list);
reset($define_list);
$column_list = array();
foreach ($define_list as $key => $value)
{
if ($value > 0) $column_list[] = $key;
}
?>
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
whoohoo :)
Thank you, that fixed it. looks GREAT
Thank you for the wonderful mod!
I was wondering if there would be any way to limit the results to a certain number of products. For example, my best sellers page lists a total of 1288 products, 15 per page. Instead of having so many products listed on that page, could I make it so that the results only give the top 50 best sellers?
You can edit includes/modules/pages/best_sellers/header_php.php and put LIMIT into the sql query.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Thank you for your reply. I did figure that much, but my problem is that I do not know this programming language. Rather than come here immediately for answers, I tried to solve this on my own by entering LIMIT into the dev tool kit for ideas on how it is used. I saw several examples in other Zen files, although when I tried editing the header.php file on my own, I received errors every time. I even Googled SQL limit query and saw similar examples, but of course they don't work when I try them. If anyone knows how to set a limit of 50 results for the following, your help would be greatly appreciated.
Code:if (BEST_SELLERS_SHOW_OUT_OF_STOCK == 'true') { $listing_sql = "select distinct p.products_quantity, p.products_id, p.products_image, p.products_model, pd.products_name, p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' order by p.products_ordered desc, pd.products_name"; } else { $listing_sql = "select distinct p.products_quantity, p.products_id, p.products_image, p.products_model, pd.products_name, p.products_ordered from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and p.products_quantity > 0 and p.master_categories_id != 123 and p.products_id != 1992 order by p.products_ordered desc, pd.products_name"; } $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE); /* , 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); */ asort($define_list); reset($define_list); $column_list = array(); foreach ($define_list as $key => $value) { if ($value > 0) $column_list[] = $key; } ?>
Bookmarks