Community Add-Ons
Enhanced BestSeller box with admin
for osCommerce Online Merchant v2.2
Best Sellers- This contribution (V1.4) includes all the files and instructions that I used in my own installation to get things up and running in V2.2 MS2. I have incorporated other contibutions for this mod, and also don't take any responsibility if this doesnt work!
I you install this contrib your best seller box will:
-show thumb nails of the product.
-name of the product
-price of the product
-scroller for IE users else will display regular best_seller box
can be viewed at: www.theartoutlet.com
---
WHAT IS IT?
---
The purpose of this contribution is to replace the best seller Infobox that appears on the left or right column, to show selected products in the bestseller box, instead of actualy purchased products. The best sellers products can be chosen in the admin.
However, this mod could be improved by displaying the best sellers choosen for particular cPaths,like the original box does.
It's been written in such a way that the box will *not* show up if there are no bestsellers chosen.
Legend:
Download
Report
fixed the problem with multilanguage shops:
demo: www.artesanias.de
search in boxes/besteller2.php
in line 31-36:
$bestseller_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_price, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price from (" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p) left join " . TABLE_SPECIALS . " s on (p.products_id = s.products_id) left join " . TABLE_BESTSELLER . " b on (p.products_id = b.products_id) and p.products_id = pd.products_id where p.products_status = '1' and b.status = '1' order by rand($mtm) DESC limit " . MAX_DISPLAY_BESTSELLER_PRODUCTS);
}
else {
$info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_BESTSELLER_PRODUCTS_CATEGORY, $cat_name));
$bestseller_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_price, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price from (" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p) left join " . TABLE_SPECIALS . " s on (p.products_id = s.products_id) left join " . TABLE_BESTSELLER . " b on (p.products_id = b.products_id) and p.products_id = pd.products_id where p.products_status = '1' and b.status = '1' order by rand($mtm) DESC limit " . MAX_DISPLAY_BESTSELLER_PRODUCTS);
}
replace with:
$bestseller_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_price, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price from (" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p) left join " . TABLE_SPECIALS . " s on (p.products_id = s.products_id) left join " . TABLE_BESTSELLER . " b on (p.products_id = b.products_id) and p.products_id = pd.products_id where language_id = '" . (int)$languages_id . "' and p.products_status = '1' and b.status = '1' order by rand($mtm) DESC limit " . MAX_DISPLAY_BESTSELLER_PRODUCTS);
}
else {
$info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_BESTSELLER_PRODUCTS_CATEGORY, $cat_name));
$bestseller_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_price, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price from (" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p) left join " . TABLE_SPECIALS . " s on (p.products_id = s.products_id) left join " . TABLE_BESTSELLER . " b on (p.products_id = b.products_id) and p.products_id = pd.products_id where language_id = '" . (int)$languages_id . "' and p.products_status = '1' and b.status = '1' order by rand($mtm) DESC limit " . MAX_DISPLAY_BESTSELLER_PRODUCTS);
}
