nickb Posted December 7, 2005 Posted December 7, 2005 I would like to show the bestsellers box on every page on my website like the search box, how do I do this? I notice that on some pages it doesn't appear.
Guest Posted December 8, 2005 Posted December 8, 2005 The best seller box is wrapped in an IF statement, making it appear only on certain pages. I think that if you unwrap it, it would work. In: mainwebsite_html/includes/column_right.php(or left depanding of your site layout) you would find the text to extrude from the statement and try putting it outside the IF statement. Like at the end... for testing purposes. include(DIR_WS_BOXES . $bsellers);
nickb Posted December 8, 2005 Author Posted December 8, 2005 I've tried that but still don't work. Here is my code. <?php /* $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ if (isset($HTTP_GET_VARS['products_id'])) //include(DIR_WS_BOXES . 'manufacturer_info.php'); if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php'); require(DIR_WS_BOXES . 'whats_new.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'); } //include(DIR_WS_BOXES . 'my_new_box.php'); //require(DIR_WS_BOXES . 'information.php'); if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { //include(DIR_WS_BOXES . 'languages.php'); //include(DIR_WS_BOXES . 'currencies.php'); } ?>
Guest Posted December 9, 2005 Posted December 9, 2005 So if I understand well you tried something like this and it does not work. ****** start ***** <?php /* $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2003 osCommerce Released under the GNU General Public License */ if (isset($HTTP_GET_VARS['products_id'])) //include(DIR_WS_BOXES . 'manufacturer_info.php'); if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php'); require(DIR_WS_BOXES . 'whats_new.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'); } //include(DIR_WS_BOXES . 'my_new_box.php'); //require(DIR_WS_BOXES . 'information.php'); if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { //include(DIR_WS_BOXES . 'languages.php'); //include(DIR_WS_BOXES . 'currencies.php'); } include(DIR_WS_BOXES . 'best_sellers.php'); ?> *** end *** Is that right?
nickb Posted December 9, 2005 Author Posted December 9, 2005 It still don't appear on every page. If I go to a product info page or a product listing page it only appears if a itam from those pages are on the bestsellers list? I would like it to appear on every page with the bestsellers all in the box.
Guest Posted December 12, 2005 Posted December 12, 2005 Woow ! The only easy solution I see would be to install the best seller managment contrib. Lets specify which product are best seller and I think you can put it on every page...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.