Re: Reload adding to cart

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39215
interpreted = N
texte = Donovan Brooke wrote: > > Hello again, > On my found_items (or results) page I also have my > shopping cart. When someone goes to add an item from > the found items it refreshes the results page and adds the > item to the cart. My problem is that all the variable values are > still in place (and need to be I think) so when a reload is done > all the previous actions are done once again. > > This means that if someone adds something to the cart, then > does a reload/refresh, then that item is added once more. (and so on) > > How do people get around this? I tried a formed based link instead but > it did not work... same thing.This is a user stupid, please replace sort of issue. Unless you do all of your adding to carts in a context (where you can decide whether they have already added this item), you are stuck. When a page is reloaded, the browser (as you have discovered) submits EXACTLY the same variables as previously.One thing you can do is have the target of the add be an intermediary page which contains only a redirect to the actual shopping cart page. That way, the variables are submitted to a page and then stripped off by the redirect. Here is the flow: SearchPage ---submit---> AddMePage ---redirect--->ShoppingCartNo amount of hitting refresh on the ShoppingCart page will have any effect, since the form variables will be eaten by AddMePage.If you are clever, you can even have the ShoppingCart page redirect to itself, which we do since Netscape doesn't always display the initial-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Reload adding to cart (Donovan Brooke 2001)
  2. Re: Reload adding to cart (Maurice Rickard 2001)
  3. Re: Reload adding to cart (Donovan Brooke 2001)
  4. Re: Reload adding to cart (John Peacock 2001)
  5. Re: Reload adding to cart (Donovan Brooke 2001)
  6. Re: Reload adding to cart (Donovan Brooke 2001)
  7. Re: Reload adding to cart (John Peacock 2001)
  8. Re: Reload adding to cart (Donovan Brooke 2001)
  9. Re: Reload adding to cart (Donovan Brooke 2001)
  10. Re: Reload adding to cart (Maurice Rickard 2001)
  11. Reload adding to cart (Donovan Brooke 2001)
Donovan Brooke wrote: > > Hello again, > On my found_items (or results) page I also have my > shopping cart. When someone goes to add an item from > the found items it refreshes the results page and adds the > item to the cart. My problem is that all the variable values are > still in place (and need to be I think) so when a reload is done > all the previous actions are done once again. > > This means that if someone adds something to the cart, then > does a reload/refresh, then that item is added once more. (and so on) > > How do people get around this? I tried a formed based link instead but > it did not work... same thing.This is a user stupid, please replace sort of issue. Unless you do all of your adding to carts in a context (where you can decide whether they have already added this item), you are stuck. When a page is reloaded, the browser (as you have discovered) submits EXACTLY the same variables as previously.One thing you can do is have the target of the add be an intermediary page which contains only a redirect to the actual shopping cart page. That way, the variables are submitted to a page and then stripped off by the redirect. Here is the flow: SearchPage ---submit---> AddMePage ---redirect--->ShoppingCartNo amount of hitting refresh on the ShoppingCart page will have any effect, since the form variables will be eaten by AddMePage.If you are clever, you can even have the ShoppingCart page redirect to itself, which we do since Netscape doesn't always display the initial-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Strange error (2000) Security Issues and WebCommerce Solution (1997) Problems with [Search] param - Mac Plugin b15 (1997) TCPSend/Replace DB Records (2002) [WebDNA] Anyone using version 6.2.1 in production on Linux (2013) Passing variables to Realm Authentication - WebStar (1998) WebDelivery (1998) [WebDNA] An unknown error occured // Deadlock avoided (2011) Mystery File (2005) [OT] 'Email this story to a friend' (2003) [WebDNA] "Safe Write for Database" setting.... (2016) Stay on Products page (2003) Shopping Cart Problem (1998) Surprise x and y post args (1998) Email notification to one of multiple vendors ? (1997) Sample Tearoom Search Error (1997) Same Database needed on two machines (2002) Sending emails (went[ot] ) (2002) F3 crashing server (1997) Https not showing products (2004)