[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: Remembering mv_searchspec (Was: Re: Thanks a lot!)
****** message to minivend-users from Frank Miedreich <miedreich@acm.org> ******
Hi, Joachim
The names you use for the variables are totally independent of the field
names in your database. Choose whatever you like.
the items array is used for the contents of mv_searchspec. If you use a
coordinated search it's size is the number of stacked mv_searchfields. It
has nothing to do with your products.asc.
Perl code again, without the range search part:
[set search values]
[perl arg=values interpolate=1]
my($msg)='[value mv_searchspec]';
my(@items)=split (/\0/, $msg);
$Safe{'values'}{'s_category'} = $items[0];
$Safe{'values'}{'s_subcategory'} = $items[1];
return '';
[/perl]
[/set]
How this works:
At first I put the contents of mv_searchspec into a scalar named msg. msg
then contains all your searchstrings seperated by the delimiter \0.
I then split the scalar msg into the array "items". There is one item for
each mv_searchspec field in your search definition. No more, no less.
To access the contents of items later on I create minivend variables with
the names s_category and s_subcategory. These names are free for you to
choose. Name them "Autor" and "Verlag" if you like. They are accessable on
minivend pages with [value s_category] etc.
Greetings from Munich, Frank
>Hello Frank,
>
>thank you very mutch for your help! A have a little problem to
>understand your solution!
>
>I am wondering about the variable like "'s_category'" and $items[0] !
>I use, for example, the fields "Autor", "Verlag" etc. ! It seems me,
>that i can use like this...
>
> $Safe{'values'}{'s_Autor'} = $items[11]; (Autor is the 11. field in
>the file products.asc)
> $Safe{'values'}{'s_Verlag'} = $items[14]; (Verlage is the 14. field
>in the same file)
> $Safe{'values'}{'s_price'} = $price;
>
>Hmmm...i have another more question about your solution. It seem me, you
>are able to understand me in german.
>Sorry, i am new in english language and my mental capacibility in
>english is very very poor.
>
>Let me know, if you can use the german language. Otherwise, i try to
>find a friend, who translate my qeustion in english. Let me know, if my
>english is to difficult (to bad) to understand for anybody.
>
>I will be glad, if you are very nice and give me clarification!
>
>Joachim
--
Dual rounds of ROT-13 encryption discontinued. Somebody was able to crack this.
Frank Miedreich
Max-Planck-Institut fuer psychologische Forschung
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list