[ic] mv_profile and mv_search_map

Jamie Neil jamie at versado.net
Tue Jan 6 08:06:26 EST 2004


Hi all,

I'm trying to reduce the size of my search page by converting all the 
hidden form fields in a co-ordinated search into a search profile, but 
I'm having problems because I need use mv_search_map to preselect two 
drop down boxes.

This is what I have:
---
<form method="post" action="[area search]">
<INPUT TYPE="hidden" NAME=mv_session_id VALUE="[data session id]">
[set search_profile]
mv_search_file=products
mv_coordinate=1
mv_searchtype=db
mv_matchlimit=10
mv_return_fields="sku,manufacturer,prod_group,category,option_type,thumb,description,comment,rrp,tax_category,nontaxable,price"
mv_sort_field="prod_group"
mv_sort_field="category"
mv_sort_field="manufacturer"
mv_sort_field="price"
mv_sort_option="f"
mv_sort_option="f"
mv_sort_option="f"
mv_sort_option="n"
mv_value="banner_text="
mv_search_field="category"
mv_substring_match=0
mv_column_op=eq
mv_search_field="manufacturer"
mv_substring_match=0
mv_column_op=eq
mv_search_field=":*"
mv_substring_match=1
mv_column_op=rm
[/set]
<INPUT TYPE="hidden" NAME=mv_search_map VALUE="
   mv_searchspec=searchproduct
   mv_searchspec=searchbrand
   mv_searchspec=searchstring">
<INPUT TYPE="hidden" NAME=mv_profile VALUE=search_profile>
<select name="searchproduct">
<option value="">All Products</option>
[loop
   option=searchproduct
   search="
     fi=cat
     st=db
     ra=yes
     rf=name
     tf=name
     un=1
   "]<option>[loop-code]</option>
[/loop]</select>
<select name="searchbrand">
<option value="">All Brands</option>
[loop
   option=searchbrand
   search="
     fi=manufacturers
     st=db
     ra=yes
     rf=name
     tf=name
     un=1
   "]<option>[loop-code]</option>
[/loop]</select>
<input type="text" name="searchstring" size="15" maxlength="30">
<input type="image" name="go" src="go.gif" alt="go" >
</form>
---
This works fine when using only hidden fields (no profile), but with the 
above code I get the error:

Limit subroutine creation: bad limit creation code in coordinated 
search, probably search group without search specification. at 
/usr/lib/interchange/lib/Vend/Search.pm line 806.

I've tried to put the mv_search_map inside the profile, but I can't get 
it to work. It seems that either you can't use it in a search profile or 
I just haven't found the right way of phrasing it yet!

Can anyone help?

-- 
Jamie Neil | <jamie at versado.net> | 0870 7777 454
Versado I.T. Services Ltd. | http://versado.net/ | 0845 450 1254



More information about the interchange-users mailing list