[Zope] Need Ideas on how to accomplish personalized web
pages!
Wade Pearce
Wade.Pearce@dpac.tas.gov.au
Thu, 17 Jan 2002 15:44:28 +1100
This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.
--=_9FC2E8DB.10711AE7
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
How about using frames?
Have a small frame that maintains an order status based per user. =
Basically when the page loads, determine who has logged in via the call:
<dtml-call "REQUEST.set('username', AUTHENTICATED_USER.getUserName())">
With the persons login details, determine if they have any orders in =
process via a Z SQL Method that returns a count(*) of some type. If the =
count =3D 0 then set the status to "You have no current orders." otherwise =
retrieve their order status via more Z SQL Methods from the database and =
place the details within the frame. The status frame doens't have to be =
big, just take a small part of the window so as you can put your informatio=
n. It also means that it doesn't interfere with other operations, because =
once the frame is loaded, its loaded.
The frame setup may be like:
<framset rows=3D"90%,10%">
<frame name=3D"main_frame" src=3D"main_page">
<frame name=3D"status_frame" src=3D"status_page">
</frameset>
status_page may look like this:
<dtml-call "REQUEST.set('username', AUTHENTICATED_USER.getUserName())">
<dtml-with methods>
<dtml-in check_current_orders>
<dtml-call "REQUEST.set('total', total)">
</dtml-in>
<dtml-if expr=3D"total=3D=3D0">
You have no current orders.
<dtml-else>
<dtml-in retrieve_current_order>
...
</dtml-in>
</dtml-if>
</dtml-with>
Because the user has logged in, you're set. If you manage everything by =
user_id not username, then simply use a Z SQL Method to retrieve that.
This is a simple but effective method that I've used quite a bit on =
website I've spent a lot of time building for an online gaming group. =
I've found it useful. It means you can integrate it into a current page =
without having to restructure logins, etc.
Cheers,
Wade Pearce
Wedge Tail Eagles Australasian Net Gaming Association (http://wtecommand.co=
m)
"Powered by Zope"
>>> "Yury German" <ygerman@nyc.rr.com> 01/17/02 03:28pm >>>
Hello All!
Let me tell you what I am trying to set up and about the way I am thinking
of doing this. Maybe someone has a product or a script that does something
similar or can tell me how to accomplish my idea.
I am trying to run a page on my shopping web site that has the ability to
give the customers status of their order. I do not know how to accomplish
this yet all I know is that the idea I stole from dell. The way you can =
log
in to their site and be able to see where in the process the system is.
Basically a uniqe page customised by each user.
I was thinking of two ways to accomplish this.
1. Find some way that a web page inside zope can be redirected to another
web page based on the user ID. This would be the simplest way since I can
then provide dynamic information pulling on different dtml methods and
database queries (leaving the authentication to zope).
2. Create the whole thing via queries and serv it up via zope. This would =
be
a royal pain since I would have to recreate the whole authentication part =
in
the database and can not use zope authentication for this.
So if you have any ideas I would love to hear them.
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -=20
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
--=_9FC2E8DB.10711AE7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 10pt Tahoma; MARGIN-LEFT: 2px">
<DIV>How about using frames?</DIV>
<DIV> </DIV>
<DIV>Have a small frame that maintains an order status based per user. =
;=20
Basically when the page loads, determine who has logged in via the =
call:</DIV>
<DIV> </DIV>
<DIV><dtml-call "REQUEST.set('username',=20
AUTHENTICATED_USER.getUserName())"></DIV>
<DIV> </DIV>
<DIV>With the persons login details, determine if they have any orders =
in=20
process via a Z SQL Method that returns a count(*) of some type. =
If=20
the count =3D 0 then set the status to "You have no current orders." =
otherwise=20
retrieve their order status via more Z SQL Methods from the database and =
place=20
the details within the frame. The status frame doens't have to be =
big,=20
just take a small part of the window so as you can put your information.&nb=
sp;=20
It also means that it doesn't interfere with other operations, because =
once the=20
frame is loaded, its loaded.</DIV>
<DIV> </DIV>
<DIV>The frame setup may be like:</DIV>
<DIV> </DIV>
<DIV><framset rows=3D"90%,10%"></DIV>
<DIV><frame name=3D"main_frame" src=3D"main_page"></DIV>
<DIV><frame name=3D"status_frame"=20
src=3D"status_page"><BR></frameset></DIV>
<DIV> </DIV>
<DIV>status_page may look like this:</DIV>
<DIV> </DIV>
<DIV><dtml-call "REQUEST.set('username',=20
AUTHENTICATED_USER.getUserName())"></DIV>
<DIV><dtml-with methods></DIV>
<DIV><dtml-in check_current_orders></DIV>
<DIV><dtml-call "REQUEST.set('total', total)"></DIV>
<DIV></dtml-in></DIV>
<DIV><dtml-if expr=3D"total=3D=3D0"></DIV>
<DIV>You have no current orders.</DIV>
<DIV><dtml-else></DIV>
<DIV><dtml-in retrieve_current_order></DIV>
<DIV>...</DIV>
<DIV></dtml-in></DIV>
<DIV></dtml-if></DIV>
<DIV></dtml-with></DIV>
<DIV> </DIV>
<DIV>Because the user has logged in, you're set. If you manage =
everything=20
by user_id not username, then simply use a Z SQL Method to retrieve =
that.</DIV>
<DIV> </DIV>
<DIV>This is a simple but effective method that I've used quite a bit on =
website=20
I've spent a lot of time building for an online gaming group. I've =
found=20
it useful. It means you can integrate it into a current page =
without=20
having to restructure logins, etc.</DIV>
<DIV> </DIV>
<DIV>Cheers,</DIV>
<DIV> </DIV>
<DIV>Wade Pearce</DIV>
<DIV> </DIV>
<DIV>Wedge Tail Eagles Australasian Net Gaming Association (<A=20
href=3D"http://wtecommand.com">http://wtecommand.com</A>)</DIV>
<DIV>"Powered by Zope"<BR><BR>>>> "Yury German"=20
<ygerman@nyc.rr.com> 01/17/02 03:28pm >>><BR>Hello=20
All!<BR><BR>Let me tell you what I am trying to set up and about the way I =
am=20
thinking<BR>of doing this. Maybe someone has a product or a script that =
does=20
something<BR>similar or can tell me how to accomplish my idea.<BR><BR>I =
am=20
trying to run a page on my shopping web site that has the ability =
to<BR>give the=20
customers status of their order. I do not know how to accomplish<BR>this =
yet all=20
I know is that the idea I stole from dell. The way you can log<BR>in to =
their=20
site and be able to see where in the process the system is.<BR><BR>Basicall=
y a=20
uniqe page customised by each user.<BR><BR>I was thinking of two ways =
to=20
accomplish this.<BR><BR>1. Find some way that a web page inside zope can =
be=20
redirected to another<BR>web page based on the user ID. This would be =
the=20
simplest way since I can<BR>then provide dynamic information pulling on=20
different dtml methods and<BR>database queries (leaving the authentication =
to=20
zope).<BR><BR>2. Create the whole thing via queries and serv it up via =
zope.=20
This would be<BR>a royal pain since I would have to recreate the whole=20
authentication part in<BR>the database and can not use zope authentication =
for=20
this.<BR><BR>So if you have any ideas I would love to hear=20
them.<BR><BR><BR>_______________________________________________<BR>Zope=20=
maillist - Zope@zope.org<BR><A=20
href=3D"http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/=
mailman/listinfo/zope</A><BR>** =20
No cross posts or HTML encoding! **<BR>(Related lists - <BR><A=20
href=3D"http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.=
zope.org/mailman/listinfo/zope-announce</A><BR><A=20
href=3D"http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.=
org/mailman/listinfo/zope-dev</A>=20
)<BR></DIV></BODY></HTML>
--=_9FC2E8DB.10711AE7--