[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Flypage broken with arg
****** message to minivend-users from Ken Berland <ken@hero.com> ******
I posted an answer to this. Don't use flypage. Use any other page, pass
all your arguments and the item-code, parse them out, and do an in page
search to display the right stuff. You can pass any data you like and use
perl to retrieve it.
>From ken@hero.com Thu Dec 23 15:51:03 1999
Date: Mon, 20 Dec 1999 17:55:25 -0800
From: Ken Berland <ken@hero.com>
To: minivend-users@minivend.com
Subject: Re: [mv] flycat problem with arg
I pass args like this
HREF="[area category sheep]" then on the category page its in [data
session arg] as "sheep". You can set it to a persistent scratch variable
as well:
[if session arg]
[set name="arg-input" interpolate=1][data session arg][/set]
and see it with [scratch arg-input]
you can modify it with perl like this:
[perl arg=scratch]
my($input)=$Safe{scratch}{'arg-input'};
... insert code that modifies $input here
$Safe{scratch}{'my-perl-output'}=$input;
[/perl]
[scratch my-perl-output] shows your new scratch variable.
On Mon, 20 Dec 1999, Christopher P. Lindsey wrote:
> ****** message to minivend-users from "Christopher P. Lindsey" <lindsey@mallorn.com> ******
>
> I'm trying to pass arg to all links on page like this:
>
> <a mv="page" mv.arg="[data session arg]" mv.href="[sql-code]" href="[area [sql-code]]"><b>[sql-param sci_name]</b></a>
>
> It properly generates a URL
>
> http://vapor.example.com/cgi-bin/catalog/abamasp?9joUK2eA;Conifers;6165
>
> but flypage complains that "this item (abamasp) doesn't have a catalog
> page yet..." However, if I remove arg from the URL above and connect
> at
>
> http://vapor.example.com/cgi-bin/catalog/abamasp?9joUK2eA;;6165
>
> the item is found and displayed. In fact, if I put anything between
> the two semi-colons the page will fail.
>
> Does anyone have any ideas? Is this a problem with my flypage (included
> below)?
>
> I'll give some reasons behind this, too... There are a bunch of
> categories of plants, like conifers, perennials, trees, etc. Each
> category has a master list that links to flypage (below). However,
> we'd like to have a "next" and "previous" button to thread through
> the current category. I was trying to pass in arg to contain the
> name of that category -- is there a better way to do this?
>
> Any help would be greatly appreciated -- I'm currently stymied.
>
> Thanks,
>
> Chris
>
> ----------------------------------------------------------------------
> <HTML>
> [tag flag build][/tag]
> <HEAD><TITLE>[item-field sci_name]</TITLE></HEAD>
> __MAINHEADER__
> __TOP__
> __LEFT__
> __BODYHEADER__
>
> [sql type=list
> query="select distinct p.code, p.onsite, p.availability, p.discount, p.description, p.invasive, p.sci_name, h.hardiness_name, s.size_name, p.price from plant
> as p left join size as s on s.size_id = p.size_id left join hardiness as h on h.hardiness_id = p.hardiness_id where p.code='[item-code]'" ]
> <b>[sql-param sci_name]</b></a>
> [if-sql-field invasive]
> <img src="/images/invasive.jpg" BORDER=0 ALT="invasive">
> [/if-sql-field]
> [sql-param hardiness_name] [sql-param size_name] $[sql-param price]<br>
> <p>
> [sql-param description]
> <br>
> [if data products::code::[item-code] =~ /^os-/]
> <i>This item is only available on-site.</i>
> [else]
> [order [item-code]]Add to cart[/order]
> [/else]
> [/if]
> [/sql]
>
> __BODYFOOTER__
> __LEFTFOOTER__
> __MAINFOOTER__
> </CENTER>
> <!-- current page: @@MV_PAGE@@ -->
> </BODY>
> </HTML>
> -
> 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
>
On Thu, 23 Dec 1999, Christopher P. Lindsey wrote:
> ****** message to minivend-users from "Christopher P. Lindsey" <lindsey@mallorn.com> ******
>
> > The docs refer briefly to the area where you are inserting your argument in
> > the section where tracking sessions is dicussed, but they are not clear as
> > to whether or not you can MANUALLY insert an argument, as you are
> > apparently attempting to do. You might want to try the [page] or [area]
> > tag instead; either one lets you pass an argument with the link.
>
> Unfortunately, doing it like
>
> <a href="[area [sql-code] [sql-param category]]">
> <b>[sql-param sci_name]</b>
> </a>
>
> doesn't work, and neither does
>
> <a MV="page" mv.arg="[data session arg]" mv.href="[sql-code]" href="[area [sql-code]]"><b>[sql-param sci_name]</b></a>
>
> It appears that putting anything into the argument field of flypage causes
> it to fail on lookups, whether the extra argument is added manually or via
> minivend tags. :(
>
> > Good luck!
>
> Thanks... :) I think I'm going to have to look at cookies or something
> to do this (or convince the client that what they wanted to do isn't worth
> the hassle for now).
>
> Chris
> -
> 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