[ic] ActionMap Search

Jamie Neil interchange-users@icdevgroup.org
Fri Jun 27 14:41:01 2003


> -----Original Message-----
> From: interchange-users-admin@icdevgroup.org
> [mailto:interchange-users-admin@icdevgroup.org]On Behalf Of Ton Verhagen
> Sent: 27 June 2003 17:59
> To: interchange-users@icdevgroup.org
> Subject: Re: [ic] ActionMap Search
>
> No, you are assigning a new value to the cgi variables.
>
> Try this to stack em up:
>
> $CGI->{mv_search_field} = 'category';
> $CGI->{mv_search_field} .= '\0inactive';

OK - that makes sense. I am assuming that the \0 is the delimiter for
stacked variables.

So now I have:

ActionMap  cat  <<EOR
sub {
        my ($action, $category) = split ('/', shift);
        $CGI->{mv_todo} ='search';
        $CGI->{mv_nextpage} = 'results';
        $CGI->{mv_search_file} = 'products';
        $CGI->{mv_searchtype} = 'db';
        $CGI->{mv_coordinate} = 'yes';
        $CGI->{mv_return_fields} = 'sku';
        $CGI->{mv_matchlimit} = '10';
        $CGI->{mv_sort_field} = 'manufacturer,price';
        $CGI->{mv_sort_option} = 'f,n';
        $CGI->{mv_search_field} = 'category';
        $CGI->{mv_search_field} .= '\0inactive';
        $CGI->{mv_column_op} = 'rm';
        $CGI->{mv_column_op} .= '\0ne';
        $CGI->{mv_searchspec} = "$category";
        $CGI->{mv_searchspec} .= '\01';
        $CGI->{banner_text} = "$category";
        $Tag->update('process');
        return 1;
}
EOR

but I get the following search error:

Sorry, your search returned no results.
Errors:
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.

Jamie