moo22 Posted March 26, 2007 Posted March 26, 2007 What code do you need to reinsert the search facility on the front page of OSCommerce as seen on http://www.freeyourfantasies.co.uk or rather no longer seen on the front page. It was removed some time ago and needs to be added once again Many thanks
jonquil Posted March 26, 2007 Posted March 26, 2007 Next time you post a link to an adult site, please make that fact very clear. Add the following line to includes/header.php: require(DIR_WS_BOXES . 'search.php'); Stock osC header.php for reference: <?php /* $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_manufacturers_box(); } else { include(DIR_WS_BOXES . 'manufacturers.php'); } require(DIR_WS_BOXES . 'whats_new.php'); [b] require(DIR_WS_BOXES . 'search.php'); [/b] require(DIR_WS_BOXES . 'information.php'); ?> jon It's all just ones and zeros....
moo22 Posted March 26, 2007 Author Posted March 26, 2007 Thanks for the prompt reply, I will try to get it working again. Apologies for not mentioning that the site was of an adult nature, it did not cross my mind at the time. It was NOT my intention to cause any offence just to be clear.... Next time you post a link to an adult site, please make that fact very clear. Add the following line to includes/header.php: require(DIR_WS_BOXES . 'search.php'); Stock osC header.php for reference: <?php /* $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_manufacturers_box(); } else { include(DIR_WS_BOXES . 'manufacturers.php'); } require(DIR_WS_BOXES . 'whats_new.php'); [b] require(DIR_WS_BOXES . 'search.php'); [/b] require(DIR_WS_BOXES . 'information.php'); ?> jon
moo22 Posted March 26, 2007 Author Posted March 26, 2007 Mmmm, I'm having problems getting this to work. In the previous version of the header.php file was this code which was inserted where the search box was <? // SEARCH ?> <table cellspacing=0 cellpadding=0 style="padding-left: 7px"> <?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?> <tr><td class=ch2>Quick search:</td></tr> <tr><td height=5></td></tr> <tr><td> <?=tep_draw_input_field('keywords', '', 'size="20" maxlength="50" style="width=110" onclick="this.value=\'\'" value=choose_product class=se') . ' ' . tep_hide_session_id()?></td></tr> </form> </table> <? // END SEARCH ?> If you add or leave out the require(DIR_WS_BOXES . 'search.php'); the following error appears after you perform a search Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/freeyour/www/includes/header.php:225) in /home/freeyour/www/includes/boxes/categories.php on line 13 Thanks for the prompt reply, I will try to get it working again. Apologies for not mentioning that the site was of an adult nature, it did not cross my mind at the time. It was NOT my intention to cause any offence just to be clear....
Recommended Posts
Archived
This topic is now archived and is closed to further replies.