[thelist] asp experts? 2 things...

aardvark roselli at earthlink.net
Wed Oct 4 11:31:11 CDT 2000


On 4 Oct 00, at 11:08, Jenn Coker wrote:

> aard wrote:
> ---------------------
> - i request the cart item from the form submit...
> - i check for a session variable named 'foo', if it isn't there... - i
> add item to the cart... - i set a session variable named 'foo'... -
> if, however, foo was already there, i just display the page...
> 
> how do you clear 'foo' to add more products?
> 
> simple, do that on your product selection page... kill 'foo' there,
> effectively forcing all cart submissions to come only from that
> page...
> 
> does that make any sense?
> ---------------------------
> yup but.. if i'm killing foo in the product selection page, there is
> no foo til they add something and i then set foo, they are then 
> returned to the *same* page which then kills foo.. foo's presence
> being necessary there though to check whether i should just redisplay
> the page or not.. so it'd always be adding the item in a refresh
> situation, right. er.. maybe not?

i think i see what you're doing...

after someone selects a product (they submit a form), it goes to a 
cart page to show the user what is in the cart... so there are two 
pages the user sees...

product page:
- kill 'foo' session variable when page is requested...
- allow user to submit to cart...

cart page:
- check for 'foo' (if it's not there, this is from the product page, if it is 
there, it's a reload so do nothing but display the page)...
- add item to cart...
- set 'foo'...
- display cart (with options to add more items, returning the user to 
the product page)...

any better?

there may be other factors at play on your end... i'm just offering a 
simplified approach...




More information about the thelist mailing list