Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Top sellers dont display on all pages?


Guest

Recommended Posts

Hi,

 

I want to display top sellers on all my pages including the catagory pages however i cant get it to dispay on the catagory pages of in the item description but it does show on all the other pages.

 

Please can you help me to resolve this problem.

 

Thanks

Link to comment
Share on other sites

In includes/column_right.php there is the following code

  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');

  }

You can try to cut the best_seller.php lines, and paste it somewhere outside the if statements.

Link to comment
Share on other sites

  require(DIR_WS_BOXES . 'best_sellers.php');

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (tep_session_is_registered('customer_id')) {
     $check_query = tep_db_query("SELECT * FROM " . TABLE_CUSTOMERS_INFO . " WHERE customers_info_id = '" . (int)$customer_id . "' AND global_product_notifications = '0--**'");
     if (mysql_num_rows($check_query) == 1) {
 include(DIR_WS_BOXES . 'product_notifications.php');
     }else{
     //include(DIR_WS_BOXES . 'product_notifications.php');
  }
   } else {
     include(DIR_WS_BOXES . 'product_notifications.php');
   }
 }

 

 

^^ what i used.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...