Gshot Posted October 10, 2008 Posted October 10, 2008 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
FIMBLE Posted October 10, 2008 Posted October 10, 2008 It should go in your colum_left.php or colum_right.php Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
Gshot Posted October 11, 2008 Author Posted October 11, 2008 It should go in your colum_left.php or colum_right.phpNic Hi Thanks but I mean what is the actual code I need to display the bestsellers box. I know where to put it.
sLaV- Posted October 12, 2008 Posted October 12, 2008 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'); }
Gshot Posted October 13, 2008 Author Posted October 13, 2008 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)
sLaV- Posted October 13, 2008 Posted October 13, 2008 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'); } ?>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.