MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] cookie again, sorry



Quoting Karl (friend@forfree.at):
> 
> already tried something like this before. it looks like that the browser
> doesn´t give back a coockie witch is placed oon the same page to it.
> 
> will do some workaround with other text in the messages.
> 

It can't -- it doesn't have it yet. 8-)

It can be done pretty easily at the cost of two hits initially:

	[if type=explicit compare="q{[read-cookie MV_SESSION_ID]}"]
		<!-- All is copacetic, got a cookie. -->
	[elsif scratch tried]
		[set message]
			You must have cookies set to leave the basket.
			Check out now or forever lose your shopping cart.
		[/set]
	[/elsif]
	[else]
		[set tried]1[/set]
		[bounce href="[area ord/basket]"]
	[/else]
	[/if]

It really will help to do this at the top of the page, as parsing
is aborted at the bounce tag; this makes the redirect fairly fast.
You can use [scratch message] later in the page to send a message,
or any of many other means.

The compare value is Perl, so it must be properly quoted.

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
Few blame themselves until they     131 Willow Lane, Floor 2  | ||  _ \
have exhausted all other            Oxford, OH  45056         | || |_) |
possibilities.                      <mikeh@minivend.com>     |___|  _ <
 -- anonymous                       513.523.7621 FAX 7501        |_| \_\


Search for: Match: Format: Sort by: