Re: Browser Caching

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 52640
interpreted = N
texte = I suspect that you're right and that I'm not getting *something* right with the [orderfile] context. I don't see the problem, so let me post some code. Basically I've got a purchase.tpl page where the following link exists for the customer to add the product (it's a single-product site by the way) to their shopping cart: Buy The following code is from the viewcart.tpl page, which is the page that shows the contents of the shopping cart. The case of _Action=Add is invoked when the customer clicks on the above link on the product purchase page. The _Action=Remove is invoked when the customer clicks on the "remove" link next to the lineitem (see code below) on the shopping cart page. The _Action=Update is invoked when the customer changes the quantity in the form field of the lineitem on the shopping cart page and hits the return key to submit the form (see code below). ---------------------------------------------- [Switch value=[_Action]] [Case value=Add] [addlineitem cart=[cart]&SKU=[_SKU]&db=/db/Products.db]quantity=1[/addlineitem] [/Case] [Case value=Remove] [removelineitem cart=[cart]&index=[_LineIndex]] [/Case] [Case value=Update] [setlineitem cart=[cart]&index=[_LineIndex]]quantity=[_NewQty][/setlineitem] [/Case] [/Switch] [orderfile cart=[cart]] .... [lineitems] remove [lookup db=/db/Products.db&lookInField=SKU&value=[SKU]&returnField=Title]
[format .2f][price][/format] [format .2f][math][price]*[quantity][/math][/format] [/lineitems] .... [/orderfile] ---------------------------------------------- Thanks in advance for looking at this and making suggestions! Brian On 9/3/03 1:22 PM, "John Peacock" wrote: > Brian Wachter wrote: > >> Thanks for the response, Donovan. Actually I caught that issue earlier. The >> hierarchy is correct, I flushed everything and the issue remains. Any other >> suggestions? >> > > Actually, I suspect Donovan is correctly diagnosing the problem (which we had > at > one point also). If you hit refresh, does it display the correct contents? > How > are you displaying the cart page (i.e. are you using a command like showpage > or > showcart)? How are you adding the items to the cart (i.e. are you using the > 'add' command or the [addlineitem] context)? > > The issue is that if you are using the [addlineitem] context on a page that is > already in an implied [orderfile] context, the changes will not show up until > you hit the page again, as the inner [orderfile] context is ignored since the > page is already in an implied [orderfile] context. > > John ------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Browser Caching ( John Peacock 2003)
  2. Re: Browser Caching ( Brian Wachter 2003)
  3. Re: Browser Caching ( Donovan 2003)
  4. Re: Browser Caching ( Brian Wachter 2003)
  5. Re: Browser Caching ( Donovan 2003)
  6. Re: Browser Caching ( John Peacock 2003)
  7. Re: Browser Caching ( Brian Wachter 2003)
  8. Re: Browser Caching ( John Peacock 2003)
  9. Re: Browser Caching ( Brian Fries 2003)
  10. Re: Browser Caching ( Donovan 2003)
  11. Re: Browser Caching ( Brian Wachter 2003)
  12. Re: Browser Caching ( Donovan 2003)
  13. Browser Caching ( Brian Wachter 2003)
I suspect that you're right and that I'm not getting *something* right with the [orderfile] context. I don't see the problem, so let me post some code. Basically I've got a purchase.tpl page where the following link exists for the customer to add the product (it's a single-product site by the way) to their shopping cart: [cart]&_Action=Add&_SKU=1001">Buy The following code is from the viewcart.tpl page, which is the page that shows the contents of the shopping cart. The case of _Action=Add is invoked when the customer clicks on the above link on the product purchase page. The _Action=Remove is invoked when the customer clicks on the "remove" link next to the lineitem (see code below) on the shopping cart page. The _Action=Update is invoked when the customer changes the quantity in the form field of the lineitem on the shopping cart page and hits the return key to submit the form (see code below). ---------------------------------------------- [Switch value=[_Action]] [Case value=Add] [addlineitem cart=[cart]&SKU=[_SKU]&db=/db/Products.db]quantity=1[/addlineitem] [/Case] [Case value=Remove] [removelineitem cart=[cart]&index=[_LineIndex]] [/Case] [Case value=Update] [setlineitem cart=[cart]&index=[_LineIndex]]quantity=[_NewQty][/setlineitem] [/Case] [/Switch] [orderfile cart=[cart]] .... [lineitems] [cart]&_Action=Remove&_LineIndex=[LineIndex]">remove [lookup db=/db/Products.db&lookInField=SKU&value=[SKU]&returnField=Title]
[cart]&_Action=Update&_LineIndex=[lineindex]" method="post" name="UpdateQty">
[format .2f][price][/format] [format .2f][math][price]*[quantity][/math][/format] [/lineitems] .... [/orderfile] ---------------------------------------------- Thanks in advance for looking at this and making suggestions! Brian On 9/3/03 1:22 PM, "John Peacock" wrote: > Brian Wachter wrote: > >> Thanks for the response, Donovan. Actually I caught that issue earlier. The >> hierarchy is correct, I flushed everything and the issue remains. Any other >> suggestions? >> > > Actually, I suspect Donovan is correctly diagnosing the problem (which we had > at > one point also). If you hit refresh, does it display the correct contents? > How > are you displaying the cart page (i.e. are you using a command like showpage > or > showcart)? How are you adding the items to the cart (i.e. are you using the > 'add' command or the [addlineitem] context)? > > The issue is that if you are using the [addlineitem] context on a page that is > already in an implied [orderfile] context, the changes will not show up until > you hit the page again, as the inner [orderfile] context is ignored since the > page is already in an implied [orderfile] context. > > John ------------------------------------------------------------- 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://webdna.smithmicro.com/ Brian Wachter

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:

funky values using [fileinfo] (2001) [url] (1997) Looking for a Manual (1997) Display [price] in banner ad (1998) problems with 2 tags (1997) Separate SSL Server (1997) anyone moved to v6? (2004) Anyone using [sendmail] for HTML encoded mail? (2000) Bug? (1997) Email (1998) WebCat2b15MacPlugin - showing [math] (1997) pull downs (1997) same bill to and ship to? (1998) Search crashing server (1998) Where's Cart Created ? (1997) quotes (2004) Open source store builder (Merchant Maker?) (2003) [WebDNA] Permission Settings (2009) Webcatalog/ColdFusion/Tango (1998) New syntax feedback for 4.0 (2000)