[ic] question about [value ...] , [cgi ....]
JOHN WRONG
interchange-users@icdevgroup.org
Wed Feb 5 14:59:00 2003
> > I am trying to get the value of mv_search_file after
clicking a
> > area search link in category_horizontal. Nothing was added
to
> > the category_horizontal file but just this:
> >
> > [value mv_category_horizontal] <--- didn't work.
> >
> > then I went throught the milling list and found something
about
> > [cgi ..] so i added this
> >
> > [cgi mv_category_horizontal] <---- didn't work.
> > [cgi fi] <--- event tried that.. didn't work.
> >
> > then I went to the milling list again ..
> > and this time
> > [perl]
> > my $name = $CGI->{fi}
> > return $name
> > [/perl] <---- didn't work.
> >
> > I am trying to keep track of which product cat (area) the
user
> > is on and print out something base on that. Thanks for any
help!
>
> This may or may not be what you're looking for. I was
fortunate
> enough
> to get this from Jeff at shop.sophee.com, I hope he doesn't
mind me
> reposting it, and I would send you to the archives but the
thread
> doesn't
> appear to be there yet. In any case this will grab the info
from the
> user's
> click on something in category_vertical. If this isn't what
you're
> looking
> for then maybe ask again.
>
> Jon
>
>
>
> [if session last_search =~ /products/]
> [seti lastsearch][data session last_search][/seti]
> [perl]
> my @sf;
> my @se;
> my $item;
> my $cnt = 0;
> my $tmpSearch = {};
> my @searchstring = split(/\//,$Scratch->{lastsearch});
> ## build list of sf and se
> foreach $item (@searchstring) {
> if ($item =~ /^sf=(.*)/) {
> push @sf,$1;
> }
> elsif ($item =~ /^se=(.*)/) {
> push @se,$1;
> }
> }
> ## now build our hash of field/term pairs
> foreach $item (@sf) {
> $tmpSearch->{$item} = $se[$cnt];
> $cnt++;
> }
> ## populate needed scratch values
> $Scratch->{lastbrand} = $tmpSearch->{brand};
> $Scratch->{lastmaincat} = $tmpSearch->{maincat};
> $Scratch->{lastsubcat} = $tmpSearch->{subcat};
> return;
> [/perl]
> [/if]
Thanks for the code! It helps a lot. A
nd I got it working with the help of this "[if session
last_search =~ /products/], [seti lastsearch][data session
last_search][/seti]
"
But why couldn't I get the value of mv_search_file by [value or
cgi mv_search_file]? Right now, I get the value from [data
session last_search] which has all the search args.
I through the reference guide but couldn't find anything about
[data session ...]. Maybe i miss something.... anyway what does
it mean or do? thanks for any help!
Thanks again Jon
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag