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 = 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 information.
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="90%,10%">
<frame name="main_frame" src="main_page">
<frame name="status_frame"
src="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="total==0">
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
"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 -
http://lists.zope.org/mailman/listinfo/zope-announcehttp://lists.zope.org/mailman/listinfo/zope-dev
)