MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Can minivend go directly to flypage when the search returns only one item?



******    message to minivend-users from "David Ekholm" <info@minivend.com>     ******

Thought I should post an update on where I am on this.  First of all, thanks
to everyone who answered my post. I really appreciate it.  I think that Jeff
Carnahan's code looks neat, but I worry about running into browsers that
don't support the redirection.  So I'm still pursuing the brute force
solution.

To repeat myself a little for clarity, I'm trying to get the search to
present the flypage if the search returns only one item:

>> I've tried to put my flypage code in the results page as in:
>>
>> [if value mv_search_match_count < 2]
>>
>> [search-list] (flypage stuff) [/search-list]
>>
>> [else]
>>
>> [search-list] (result page stuff) [/search-list]
>>
>> [/else][/if]

The above code was very slow (2 min for 50 items) because minivend
apparently evaluated the flypage code for every item, even with the [if] tag
blocking it.  I tried Mike's suggestion:

>Surround each [search-list] with [search-region]  [/search-region]
>and it should only do the substitution once. Make sure to put the
>[no-match] [/no-match] section inside those.

but it didn't seem to help.  What did help enormously (since I'm still in
the old tags mode) is putting [new] on the results page.  A 50 item result
went from 2 min to 10-12 sec!  (After putting [new] on the page I tried
Mike's suggestion again but it still made no difference.)  Since the time is
still dependent on the number of items returned, I guess that the flypage
code is still being evaluated for each item but it's being done much more
efficiently in the new tags mode.  Inspires me to redo my catalog with the
new tags!

I still think that an option in the search function to go to the flypage if
one item is returned by the search would be nifty and more efficient - are
you listening Mike?  I also think that the [fly-list] tag would work better
here, if I could figure out how to get the [item-code] into the argument.
Any ideas on that?

Thanks again for everyone's help and input.

David Ekholm
A Compleat Mystery Bookshop        Phone: 603-430-7553
7 Commercial Alley                 Fax: 603-430-9387
Portsmouth, NH 03801               Web: http://www.compleatmystery.com


-
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


Search for: Match: Format: Sort by: