Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

change manufacturers list to a best sellers list?


2 replies to this topic

#1 budo

  • Community Member
  • 12 posts
  • Real Name:Martin

Posted 08 September 2009, 16:27

I have a manufacturers list on my shop homepage but i dont have any different makes so need to change that to a best sellers list. Any idea how i would go about doing this?

#2 ecartz

  • Community Member
  • 1,919 posts
  • Real Name:Matt
  • Gender:Male

Posted 11 September 2009, 04:23

In includes/column_left.php, the distribution has
  if ((USE_CACHE == 'true') && empty($SID)) {
	echo tep_cache_manufacturers_box();
  } else {
	include(DIR_WS_BOXES . 'manufacturers.php');
  }
Replace it with
include(DIR_WS_BOXES . 'best_sellers.php');
Note that you may also want to change the code in includes/column_right.php not to display the best sellers box by changing
  if (isset($HTTP_GET_VARS['products_id'])) {
	if (tep_session_is_registered('customer_id')) {
	  $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
	  $check = tep_db_fetch_array($check_query);
	  if ($check['count'] > 0) {
		include(DIR_WS_BOXES . 'best_sellers.php');
	  } else {
		include(DIR_WS_BOXES . 'product_notifications.php');
	  }
	} else {
	  include(DIR_WS_BOXES . 'product_notifications.php');
	}
  } else {
	include(DIR_WS_BOXES . 'best_sellers.php');
  }
to
  if (isset($HTTP_GET_VARS['products_id'])) {
	if (tep_session_is_registered('customer_id')) {
	  $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
	  $check = tep_db_fetch_array($check_query);
	  if ($check['count'] <= 0) {
		include(DIR_WS_BOXES . 'product_notifications.php');
	  }
	} else {
	  include(DIR_WS_BOXES . 'product_notifications.php');
	}
  }

Always backup before making changes.

#3 budo

  • Community Member
  • 12 posts
  • Real Name:Martin

Posted 11 September 2009, 10:49

many thanks