On my oscommerce shop I had this "best seller scrolling" block.
Now that I added oscommerce to phpnuke I would like to merge that file with the existing block. I tried to merge them without any good result.
These are the two files:
Existing:
Code:
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
global $languages_id, $cPath, $current_category_id ;
if ($cPath) {
$best_sellers_query = mysql_query("select distinct p.products_id, pd.products_name, p.products_ordered from products p, products_description pd, products_to_categories p2c, categories c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (c.categories_id = '" . $current_category_id . "' OR c.parent_id = '" . $current_category_id . "') order by p.products_ordered DESC, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
} else {
$best_sellers_query = mysql_query("select p.products_id, pd.products_name, p.products_ordered from products p, products_description pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' order by p.products_ordered DESC, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
}
if (mysql_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) {
/* $info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_HEADING_BESTSELLERS
);
new infoBoxHeading($info_box_contents, false, false);*/
$rows = 0;
$info_box_contents = array();
while ($best_sellers = mysql_fetch_array($best_sellers_query)) {
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum