!!! IMPORANT...you HAVE to have a product listed for the Main Cat or Subcats to pick up!!!
Can you explain that in a different way, I don't understand.
Do you mean the product has to be enabled or it has to exist in another category?
Browsers: The code formatting and accompanying css in the original version available for download is somewhat "inelegant".
I have since cleaned it up a bit which (illogically) fixed an issue with the main search at the end of the bar requiring a significant negative top margin in IE6 and IE7 to line it up correctly
I did not have any problems with other browsers though.
Your page width may cause overflow issues.
Updated code:
PHP Code:
<!--BOF Product Finder-->
<div class="clearBoth"></div>
<div id="product_finder_wrapper">
<div id="product_finder">
<?php
echo "<form action=''>";
?>
<ul>
<?php
echo "<li>";
$model1[]=array('id'=>'','text'=>TEXT_PLEASE_SELECT);
if(isset($_REQUEST['cPath1'])){
$value=$_REQUEST['cPath1'];
}
echo '<span id="pf_title">'.strip_tags(TEXT_FIND_ALL_PRODUCTS).'</span>
<span class="pf_selectbox_name">'.TEXT_MAKE . '</span>' . zen_draw_pull_down_menu('cPath1',array_merge($model1,zen_get_category_tree()),$value, 'id="cPath" class="searchSelectClass"');
echo "</li>";
echo "<li>";
echo "<noscript>";
echo zen_my_image_submit(PF_NOSCRIPT_SUBMIT);
//echo zen_draw_input_field("submitButton","Go",'','submit');
if($_REQUEST['cPath1']!=""){
$value=$_REQUEST['cPath1'];
$dropdownArray=zen_get_category_tree($value);
}
echo "</noscript>";
echo "</li>";
echo "<li>";
$modulePath="".DIR_WS_CATALOG;
echo zen_draw_hidden_field('basemodulepath',$modulePath,'id="basemodulepath" ');
$model=array();
$model[]=array('id'=>'',
'text'=>TEXT_PLEASE_SELECT
);
if($_REQUEST['cPath1']!=""){
$model=array_merge($model,$dropdownArray);
}
if(isset($_REQUEST['select_model'])){
$value=$_REQUEST['select_model'];
}
echo '<span class="pf_selectbox_name">' . TEXT_MODEL .'</span>'
. zen_draw_pull_down_menu('select_model', $model, $value, 'id="select_model" class="searchSelectClass"');
echo "</li>";
echo "<li>";
echo "<noscript>";
if($_REQUEST['select_model']!=""){
$value=$_REQUEST['select_model'];
$dropdownArray=zen_get_category_tree($value);
}
echo zen_my_image_submit(PF_NOSCRIPT_SUBMIT);
//echo zen_draw_input_field("submitButton","Go",'','submit');
echo "</noscript>";
echo "</li>";
echo "<li>";
$year=array();
$year[]=array('id'=>'',
'text'=>TEXT_PLEASE_SELECT
);
if($_REQUEST['select_model']!=""){
$year=array_merge($year,$dropdownArray);
}
if(isset($_REQUEST['cPath'])){
$value=$_REQUEST['cPath'];
}
if($_REQUEST['select_model']!=""){
echo '<span class="pf_selectbox_name">' . TEXT_YEAR . '</span>' .
zen_draw_pull_down_menu('cPath',$year , $value, 'id="select_year" class="searchSelectClass"');
}
else {
echo '<span class="pf_selectbox_name">' . TEXT_YEAR .'</span>' .
zen_draw_pull_down_menu('cPath22',$year , $value, 'id="select_year" class="searchSelectClass"');
}
echo "</li>";
echo "<li>";
echo "<noscript>";
if($_REQUEST['cPath']!=""){
$value=$_REQUEST['cPath'];
}
echo zen_my_image_submit(PF_NOSCRIPT_SUBMIT);
echo "</noscript>";
echo "</li>";
?>
</ul>
</form>
<div id="navMainSearch">
<?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?>
</div>
<!--close navMainSearch div-->
</div>
<!--close product_finder div-->
</div>
<!--close product_finder_wrapper div-->
<div class="clearBoth"></div>
<!--EOF Product Finder-->
Updated style_product_finder.css
Note this is MY unadulterated css with white text, I include it so you can edit the correct selectors.
@charset "utf-8";
/* CSS Document */
/*styles for Product Finder mod*/
#product_finder_wrapper {
background-image:url(../images/background_bg.gif);
background-repeat:repeat;
margin:0 auto;
width:960px;
padding:10px 0 0 0;
border-top-width: 1px;
border-top-style: solid;
border-top-color: white;
}
#product_finder {
background-image: url(../images/search_bar.png);
background-repeat:no-repeat;
height:41px;
width:100%;
padding:8px 0 0 0;/*otherwise text is top-aligned*/
font-weight:bold;
color:#FFFFFF;
}
#product_finder ul {
}
#product_finder ul li {
list-style:none;
float:left;
margin-right:10px;/*space between the drop-down items*/
}
#pf_title {/*"Show Products for..."*/
font-weight:bold;
font-family:arial;
font-size:14px;
color:#FFFFFF;
margin-right:5px;
}
.pf_selectbox_name {/*text in front of drop-down select box*/
font-weight:bold;
font-family:arial;
font-size:13px;
color:#FFFFFF;
margin-right:2px;/*space beween the drop-down name and the drop-down box*/
}
#navMainSearch {
float: right;
}
regards
Steve
Bookmarks