Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

search.php


depon

Recommended Posts

Posted

I have been trying to get by this, trying to remove the infoBox class from search.php

 

<?php

 $info_box_contents = array();
 $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),
                              'text' => tep_draw_input_field('keywords', '', 'id="txtSearch" onkeyup="searchSuggest();" size="90" value="  Search for a photo." class="input" onFocus="clearDefault(this)" ') . '<div id="search_suggest"></div> ' . ' ' . tep_draw_hidden_field('search_in_description', '1') . tep_draw_hidden_field('inc_subcat', '1') . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>');

 new infoBox($info_box_contents);
?>

 

any ideas?

Posted

I have been trying to get by this, trying to remove the infoBox class from search.php

 

<?php

$info_box_contents = array();
$info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),
'text' => tep_draw_input_field('keywords', '', 'id="txtSearch" onkeyup="searchSuggest();" size="90" value="  Search for a photo." class="input" onFocus="clearDefault(this)" ') . '<div id="search_suggest"></div> ' . ' ' . tep_draw_hidden_field('search_in_description', '1') . tep_draw_hidden_field('inc_subcat', '1') . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '
');

new infoBox($info_box_contents);
?>

 

any ideas?

 

have you checked includes/boxes/shopping_cart.php

 

I believe it may be in there.

Posted

thank you for responding, I don't want to completely remove the infoBox class since it get's used by others (categories etc) but what Im trying to do here is simply remove the code that is calling for this infobox only from search.php,

 

I tried this:

 

<?php

echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),
echo tep_draw_input_field('keywords', '', 'id="txtSearch" onkeyup="searchSuggest();" size="90" value="  Search for a photo." class="input" onFocus="clearDefault(this)" ') . '<div id="search_suggest"></div> ' . ' ' . tep_draw_hidden_field('search_in_description', '1') . tep_draw_hidden_field('inc_subcat', '1') . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>');

?>

 

with no luck, getting parse errors

 

thank you

Posted

Parse error: syntax error, unexpected T_ECHO in /var/www/vhosts/panos-mavromytis.com/subdomains/shop/httpdocs/includes/boxes/search.php on line 99

any help from anyone to clean this? btw, I have installed the quick search ajax with the search.php, and simply trying to style it, I dont wnat the infoBox

Posted

thank you for responding, I don't want to completely remove the infoBox class since it get's used by others (categories etc) but what Im trying to do here is simply remove the code that is calling for this infobox only from search.php,

 

I tried this:

 

<?php

echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),
echo tep_draw_input_field('keywords', '', 'id="txtSearch" onkeyup="searchSuggest();" size="90" value="  Search for a photo." class="input" onFocus="clearDefault(this)" ') . '<div id="search_suggest"></div> ' . ' ' . tep_draw_hidden_field('search_in_description', '1') . tep_draw_hidden_field('inc_subcat', '1') . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '
');

?>

 

with no luck, getting parse errors

 

thank you

 

I must have mis-read that, my appologies.

 

You can't just remove that and expect it to work...its now trying to call functions that aren't available. First, put the file back to original. Change "$info_box_contents" to something like "$info_box_contents2".

 

 

then in includes/classes/boxes.php find this:

 

class infoBox extends tableBox {
function infoBox($contents) {
	$info_box_contents = array();
	$info_box_contents[] = array('text' => $this->infoBoxContents($contents));
	$this->table_cellpadding = '1';
	$this->table_parameters = 'class="infoBox"';
}

function infoBoxContents($contents) {
	$this->table_cellpadding = '3';
	$this->table_parameters = 'class="infoBoxContents"';
	$info_box_contents = array();
	$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
	for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
	'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
	'params' => 'class="boxText"',
	'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
	}
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
	return $this->tableBox($info_box_contents);
}

 

 

Copy and paste right below it, changing it so your array values match up. I've never tested this, and I don't have ajax search installed so I'm not sure how that changes your code. Back up scripts before making any changes.

 

 

Oh yea, also make sure you edit the class="infoBoxContents" or you will still get the infoboxcontents as the class.

Posted

Thanks again for prompt responce,

 

I did this, another sort of workaround:

 

<?php
echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')
?>
<?php
echo tep_draw_input_field('keywords', '', 'id="txtSearch" onkeyup="searchSuggest();" size="50" value="  Search for a photo." class="input" onFocus="clearDefault(this)" ' . '<div id="search_suggest"></div> ' . ' ');
echo tep_draw_hidden_field('search_in_description', '1');
echo tep_draw_hidden_field('inc_subcat', '1');
echo tep_hide_session_id();
echo tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH );
?>

 

getting there.

Archived

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

×
×
  • Create New...