Re: Reload adding to cart

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39217
interpreted = N
texte = Thanks John! I've been working on something similar to this and it is good to hear some validation. I really don't like the Idea of a redirect but If I want the shopping cart on the same page as my search/results I can't think of any other way to do it.Maurice gave me some ideas about using a flag to validate against but my seemingly feeble mind :-) can't seem to come up with the answer.Last night I dug into the docs a little and decided I need to dig in a little further. ;-> One question I have.... Can one use globabl tags ([showif etc.]) in a Orderfile>Lineitems context? I wrote something that was supposed to check the cart and place a flag depending on if an item was already in there or not but it didn't work. Can someone give an example of this? thx.John Peacock wrote:> [snip] > > 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--->ShoppingCart > > No 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 > >-- Donovan D. Brooke Systems Administrator/ Assc. Art Director Epsen Hillmer Graphics I know I'm making progress when I look at the questions I have asked in the past and think to myself... how stupid was that ------------------------------------------------------------- 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)
Thanks John! I've been working on something similar to this and it is good to hear some validation. I really don't like the Idea of a redirect but If I want the shopping cart on the same page as my search/results I can't think of any other way to do it.Maurice gave me some ideas about using a flag to validate against but my seemingly feeble mind :-) can't seem to come up with the answer.Last night I dug into the docs a little and decided I need to dig in a little further. ;-> One question I have.... Can one use globabl tags ([showif etc.]) in a Orderfile>Lineitems context? I wrote something that was supposed to check the cart and place a flag depending on if an item was already in there or not but it didn't work. Can someone give an example of this? thx.John Peacock wrote:> [snip] > > 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--->ShoppingCart > > No 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 > >-- Donovan D. Brooke Systems Administrator/ Assc. Art Director Epsen Hillmer Graphics I know I'm making progress when I look at the questions I have asked in the past and think to myself... how stupid was that ------------------------------------------------------------- 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/ Donovan Brooke

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:

list/menus (2000) webdna code shows on .htm extensions. (2000) Add to Cart & List of Products (1997) Errata: WCS Newbie question (1997) New Site Announcement (1998) [WebDNA] ImageMagick (2016) Getting total number of items ordered (1997) Sort Order on a page search (1997) Errant Email. (1998) WebTen? (1997) sort problems....bug or brain fart? (1997) WebCatalog can't find database (1997) Another form question (2000) WebDNA Engine Won't Start (2003) WebCat and PIXO (2000) Re:Email (1998) HomePage Caution (1997) [WriteFile] problems (1997) Cookie Problems (2000) Removing items from a cart is wonky... (1998)