Hi,

I have a question/comment regarding cf_returnfuseaction that may be answered
here. I've been using the tag exactly as Steve described it below. Mostly
for logins or multi-step registration processes.

Every once in awhile I use it as sort of a subroutine to have users go
through some other multi-step process and then return to their point of
origin. This is where I sometimes run into a problem.

Sometimes users interrupt the process by clicking on a different link and
exit the subroutine before completing it. This is ok as they are not always
required to finish the process. But in this case the return action never
gets executed and the return url is stuck in the client variable.

In this case the behavior of cf_returnfuseaction becomes unpredictable. The
next time I use the tag for some other subroutine it may or may not return
me to the correct place.

Has anyone else encountered this problem before, and if so is there a
solution?

Thanks,
Balazs


-----Original Message-----
From: Steve Nelson [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 8:56 AM
To: [EMAIL PROTECTED]
Subject: Re: ReturnFuseaction - in details


You bet.

The concept of this tag is to keep your users focused when you need them to
do
something else first.

This is a common problem in websites. Look at ebay. Say you were looking at
a
specific item, and you're ready to bid on that item, so you click "sign in".
After you sign in, where does it take you? To your user account. Is that
where
you really wanted to go? Nope, you really wanted to bid on that item, but
now
you have to find it again and by the time you found it, your time was up and
you
lost the bid. DAMN EBAY!

<cf_returnfuseaction> allows you to store where your users should go when
they
finish a process. So if they were looking at a specific item on ebay, they
could
login and automatically return to that page. Or you could have them go
somewhere
else. This is useful if they were about to bid on an item and they needed to
login first. When they were finished logging in, they could complete their
bid.

This essentially allows you to stick a fuseaction from another circuit into
a
multi-step process. Here are some example Fuseactions that might explain it
a
little further.

1) products.viewproduct?product_id=32
2) members.loginform
3) members.login
4) members.loginform (they failed their login)
5) members.login (this time they got it right)
6) products.viewproduct?product_id=32

So now they are back at the product they were looking at, now hopefully
they'll
buy it!

Here's another example, a little more complicated because, plugging a survey
in.

1) products.viewproduct?product_id=32
2) purchase.additemtocart?product_id=32  (you have to be logged in first,
redirect to loginform)
3) members.loginform
4) members.login
5) members.loginform (they failed their login)
6) members.login (this time they got it right)
7) surveys.surveyform
8) surveys.savesurvey
9) purchase.additemtocart?product_id=32 (they are logged in, now add the
item)

Steve Nelson





hal helms wrote:

> Steve,
>
> Do you want to explain to everyone what the purpose of
> <cf_returnfuseaction> is?
>
> -----Original Message-----
> From: Steve Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 22, 2002 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: ReturnFuseaction - in details
>
> You might want to put this in an act file. Try something like this:
>
> <cfif not isdefined("client.clientID")>
>   <cf_returnfuseaction
>     action="set"
>     gotourl="index.cfm?fuseaction=members.loginform"
>     returnurl="#cgi.script_name#?#cgi.query_string#">
> </cfif>
>
> Then from your members.loginform fuseaction, you would point that to
> another fuseaction which would actually log the person in. You might
> have another act_login.cfm that looks like this:
>
> <cfquery name=checklogin....>
>   select clientid
>     from users
>      where email='#attributes.email#'
>        and password='#attributes.password#'
> </cfquery>
> <cfif checklogin.recordcount>
>   <cfset client.clientid=checklogin.clientid>
>   <cf_returnfuseaction
>     action="return">
> </cfif>
>
> Give that a shot.
>
> Steve Nelson
>
> Leonardo Crespo wrote:
>
> > Ok, i will explain in details. I have a fuseaction called
> > "addProduct". The user can only add a product if he's loogged in. So,
> > the fusebox receives the "addProduct" fuseaction and if the user is
> > not logged in, he's sent to the "Login" fuseaction.
> >
> > What i want is, when the user is logged in sucefully, he's sent back
> > to the "addProduct" fuseaction (with a session.loginok or a
> > client.clientID).
> >
> > I cannot hardcode a <cflocation> in the "Login" fuseaction because it
> > is used by others fuseactions.
> >
> > Is this the job of the returnfuseaction tag?
> > icq 18506630
> >
>

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================



Reply via email to