[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 "Jeff Carnahan" <tails@dakotacom.net> ******
I have something working for this, it takes an extra second to refresh the
users browser to the indicated flypage, but here it is, it's not being
properly wrapped in my email editor, but I'm sure you can figure it out..
I'm using an in-page search loop on a predefined profile,
srch_revision-profile. In my case, this profile returns a list of coin
denomination values. And with more than one product having the same
denomination value, I need to use a [loop-change .. /] tag here. Setting a
quick scratch variable, Redirect indicates whether or not I should send
users off to the next page, and I set another value to the returned
denomination value for use later.
This is at the top of my page...
[perl arg="values scratch" interpolate=1]
my %Results = ( [loop search="mp=srch_revision-profile"][loop-change
DenominationValue][condition][loop-field
denomination][/condition]"[loop-field denomination]" => 1,
[/loop-change DenominationValue][/loop]);
$Safe{'scratch'}{'Redirect'} = (scalar keys(%Results) == 1) ? 1 : 0;
$Safe{'values'}{'DenomValue'} = (keys (%Results))[0];
return '';
[/perl][if type="scratch" term="Redirect" op=">" compare="0"][tag op=header
interpolate=1]
Status: 302 moved
Location: [area href="srch_coin-group-listing.html"]
[/tag][/if]
--
Warmest Regards...
__________________________________________________________________
Cyberscope, Inc. Jeff Carnahan
Online Internet Commerce jeff@cyberscope.com
http://www.cyberscope.com/ tails@dakotacom.net
__________________________________________________________________
-----Original Message-----
From: owner-minivend-users@minivend.com
[mailto:owner-minivend-users@minivend.com]On Behalf Of David Ekholm
Sent: Tuesday, February 16, 1999 3:36 PM
To: minivend-users@minivend.com
Subject: Can minivend go directly to flypage when the search returns
only one item?
****** message to minivend-users from "David Ekholm" <info@minivend.com>
******
Hello everyone,
I have searched the documentation and the mailing list archive about this
question. If it's so simple that no one has bothered to post the answer,
then please bear with me.
Is there an easy way to get minivend to go to the flypage for an item when
the search returns only one item? For an example of what I'm referring to,
try searching for a unique book on Amazon.com. This seems like an obvious
option but I can't find it anywhere in the docs.
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]
This works OK for a few items, but is really slow if > 20 items are
returned
by the search. I guess that minivend must go through the entire
[search-list] (flypage stuff) [/search-list] routine even though I want the
[if] tag to bypass this when there is more than 1 item. The [if] tag
apparently just prevents the result from getting to the browser.
I've thought about trying the new [fly-list] tag, but I can't figure out
how
to get the item code into it without going through the [search-list] tag.
I could also write a Perl routine to do it all, but that (for me) would be
a
lot of work and I would feel very foolish if there is an easier way to do
it
within minivend. So I thought I'd ask the list first.
Any help on this would be really appreciated.
BTW, my site is hosted by minivend.com so I guess I'm running the latest
beta 3.12 (Mike?).
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
-
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