Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Help in placing advanced search in menu.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-30-2007, 01:22 PM
 
longhorn180 longhorn180 is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Richmond, Virginia
Posts: 187
 

Default Help in placing advanced search in menu.

I had the x-cart guys write a custom search (advanced search) for me some months back and I love how well it works. In fact I love it so much I want to make it available (at least in part) on all pages.

So I created a new template and added the code from customer/main/search_result.tpl (minus the 'more search options' feature) to display the textfields. There are 5 fields in all: Title (which is the standard product field), Author, ISBN, Publisher & Series (all of which are extra fields).

Problem is, it won't display the extra fields or their textfields, just the product field and the search button. Is there a way to make the extra fields show up so I can call this template to be shown as a menu item on any page?

Here is the code of the template I made. It's basically the search_result.tpl minus the 'more search options':

Code:
{include file="main/include_js.tpl" src="reset.js"} <script type="text/javascript"> <!-- var searchform_def = new Array(); searchform_def[0] = new Array('posted_data[category_main]', true); searchform_def[1] = new Array('posted_data[search_in_subcategories]', true); searchform_def[2] = new Array('posted_data[by_title]', true); searchform_def[3] = new Array('posted_data[by_shortdescr]', true); searchform_def[4] = new Array('posted_data[by_fulldescr]', true); searchform_def[5] = new Array('posted_data[by_keywords]', true); searchform_def[6] = new Array('posted_data[price_min]', '{$zero}'); searchform_def[7] = new Array('posted_data[avail_min]', '0'); searchform_def[8] = new Array('posted_data[weight_min]', '{$zero}'); --> </script> {capture name=menu} <form name="searchform" action="search.php" method="post"> <input type="hidden" name="mode" value="search" /> Enter your serch terms below. For ISBN field do not use dashes or spaces. <table width="100%" cellpadding="1" cellspacing="5" bgcolor="#F6F6E6"> <tr> <td height="10" width="20%" class="FormButton2" nowrap="nowrap" align="right">{$lng.lbl_title}:</td> <td width="10" height="10"></td> <td height="10" width="80%"> <input type="text" name="posted_data[substring]" size="30" style="width:70%"/> </td> </tr> {if $exf ne ''} {foreach from=$exf item=field} {assign var="ex_key" value=$field.fieldid} <tr> <td height="10" width="20%" class="FormButton2" nowrap="nowrap">{$field.field}:</td> <td width="5" height="10"></td> <td height="10" width="80%"> <input type="text" name="posted_data[extra_fields][{$ex_key}]" size="30" style="width:70%"/> </td> </tr> {/foreach} {/if} <tr> <td height="10" width="20%" class="FormButton" nowrap="nowrap">&nbsp;</td> <td width="10" height="10"></td> <td height="10" width="80%"> <input type="submit" value="{$lng.lbl_search|strip_tags:false|escape}" /> </td> </tr> <input type="hidden" id="posted_data_by_title" name="posted_data[by_title]" value='Y' /> </table></form> {/capture} { include file="menu_cat.tpl" menu_title="Search" menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}
__________________
4.1.9 (Linux) Live Store
www.thecrackedbook.com
Find used books and out of print books.
Reply With Quote
  #2  
Old 05-18-2007, 08:34 AM
 
longhorn180 longhorn180 is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Richmond, Virginia
Posts: 187
 

Default Re: Help in placing advanced search in menu.

Subtle thread bump
Still haven't figured out how to move the advanced search.
__________________
4.1.9 (Linux) Live Store
www.thecrackedbook.com
Find used books and out of print books.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:46 PM.

   

 
X-Cart forums © 2001-2020