客户体会很主要,在zencart模板上对查找框稍作修正,使其可以依据分类来查找,亚马逊风格。完成起来也很简单,只要在tpl_header.php中参加以下代码,然后再以css稍作润饰即可。
<div class="top-search forward">
<?php echo zen_draw_form('quick_find_header', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');?>
<?php
echo zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
echo zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();
?>
<span class="search-products-text">Search:</span>
<?php echo zen_draw_pull_down_menu('categories_id', zen_get_categories(array(array('id' => '', 'text' => 'All Categories')), '0' ,'', '1'), $sData['categories_id'],'class="search-selectbox"');?>
<input class="search-input" type="text" value="" name="keyword">
<input class="go-button" type="image" title="Search" alt="Search" src="images/go.jpg">
<a class="search-advanced" href="<?php echo zen_href_link('advanced_search');?>">Advanced search</a>
</form>
</div>
而实现之后的效果类似这样:
(责任编辑:好模板) |