Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bestsellers missing


Gshot

Recommended Posts

Posted

I have purchased a template and it doesnt have a best sellers box on the page. What code do i need to use in order to make one display?

 

Thanks in advance

Posted
It should go in your colum_left.php or colum_right.php

Nic

 

 

Hi

 

Thanks but I mean what is the actual code I need to display the bestsellers box. I know where to put it.

Posted
Hi

 

Thanks but I mean what is the actual code I need to display the bestsellers box. I know where to put it.

 

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

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

 

 

Is this code correct as it just shows up as text on the page? (You can see the raw code in the browser and no bestsellers box)

Posted
Is this code correct as it just shows up as text on the page? (You can see the raw code in the browser and no bestsellers box)

 

It needs to be enclosed with opening <?php and closing ?> PHP tags

 

...sorry, you asked for the code...i assumed you would've known it would've had to have been enclosed within these tags ... here:

 

<?php
 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');
 }
?>

Archived

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

×
×
  • Create New...