[ic] Timed build and sessions
Mike Heins
mike at perusion.com
Tue Aug 26 00:38:59 EDT 2003
Quoting Jamie Neil (jamie at versado.net):
> Hi all,
>
> I've got a problem that I'm trying to use timed-build to solve, but I'm
> getting stuck on session id's.
>
> I have two different components that each show a small selection of
> products randomly selected from a subset of the database: "Featured
> Products" uses the merchandising table and "Special Offers" uses a
> sale_price field in the pricing table (see http://www.clickgolf.co.uk/).
>
> These work fine, however I want to modify them so that on any given day
> they display the same products on the same page instead of presenting a
> new set each time the page is refreshed. The idea is to make the pages
> more "stable".
>
> I thought timed-build sounded perfect for this, so I tried this:
[tmp tmp_session_id][scratch mv_no_session_id][/tmp]
[set mv_no_session_id]1[/set]
> [timed-build period="1440" file=|timed/promo-[control banner Featured
> Products]-[control matches 3]-[control promo_type featured]-[value deptid]|]
> ...component code...
> [/timed-build]
[seti mv_no_session_id][scratch tmp_session_id][/set]
That should prevent the id from escaping, I think, allowing you to
use force=1; then it should reset to the previous setting.
If you require cookies, you could instead remove the code from the login
action that sets mv_no_session_id to 0.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike at perusion.com>
There's nothing sweeter than life nor more precious than time.
-- Barney
More information about the interchange-users
mailing list