Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 47439
interpreted = N
texte = Try removing the [orderfile cart=[cart]] and [/orderfile] from the template. Using wraps the page in an [orderfile] context implicitly. This may be screwing you up.- CharlesOn 2/4/03 12:42 PM, Joe R. Richardson wrote:> I'm having a problem listing LineItems on my shopping cart. It functions as > if it's one iteration out of sync with the shopping cart. If I put something > in the cart the lineitem doesn't show, but the subtotal does. If I then > refresh the page, the lineitem shows up as #1, but the subtotal reflects two > items (twice as much). Then, if you remove that item, both lineitems show, > but the subTotal goes back. > > I placed some test code on the page and they confirm something funny is > going on. Can anyone tell me what I've done wrong?? > > Thanks, > Joe > > Site location: > ========= START CODE FROM ShoppingCart.tpl =============== > >

Your Shopping Cart Contains the Following Items

>
> > > > >
> > [!]---Test that anything is being---[/!] > > [orderfile cart=[cart]] > [lineitems] > [showif [lineindex]>0] > There are [lineindex] items in your shopping cart.

> [/showif] > [/lineitems] > [/orderfile] > > [showif [numlineitems]=0] > Your cart is empty.
> Please continue shopping.


> [/showif] > > [!]----End Test------[/!] > > > > [!]---Header Labels---[/!] > > > > > > > > > > > > > [!]---Loop thru items in shopping cart---[/!] > > [Orderfile cart=[cart]] > > [lineitems] > > > > > > > > [!]------Show Rat Restrictions-----[/!] > > > [!]------Show selected size--------[/!] > > > [!]------Show selected color-------[/!] > > > > > > > > > > > [/lineitems] > > [/Orderfile] > > [!]---Show the subtotal for all items in cart---[/!] > > > > > > >
Item #TitleLimitSizeColorQtyPriceQty*PriceAction
[lineindex][Title] > [showif [Restriction]=Rats Only] > [Restriction] > [/showif]None > > [hideif ![TextC]] > [TextC] > [/hideif]NA > > [hideif ![TextD]] > [TextD] > [/hideif]NA > > align=right> > > $[price] > > $[format .2f][math][quantity]*[price][/math][/format] > href=ShoppingCart.tpl?command=remove&db=catalog.db&sku=[url][sku][/url]&car > t=[cart]>Remove Item [lineIndex] >
Subtotal$[subTotal] 
> ======================= END CODE FROM ShoppingCart.tpl ================== > > > ------------------------------------------------------------- > 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/-- ------------------------------------ Charles Kline, PresidentRightCode, Inc. 900 Briggs Road Suite #303 Mount Laurel, NJ 08054Email: ckline@rightcode.net Phone: 856.608.7908 Fax: 856.439.0154 URL: http://www.rightcode.net ------------------------------------------------------------- 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: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Donovan 2003)
  2. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Joe R. Richardson 2003)
  3. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Joe R. Richardson 2003)
  4. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (charles kline 2003)
  5. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Donovan 2003)
  6. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Joe R. Richardson 2003)
  7. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Donovan 2003)
  8. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Joe R. Richardson 2003)
  9. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Donovan 2003)
  10. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Joe R. Richardson 2003)
  11. Re: Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Donovan 2003)
  12. Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (Joe R. Richardson 2003)
Try removing the [orderfile cart=[cart]] and [/orderfile] from the template. Using wraps the page in an [orderfile] context implicitly. This may be screwing you up.- CharlesOn 2/4/03 12:42 PM, Joe R. Richardson wrote:> I'm having a problem listing LineItems on my shopping cart. It functions as > if it's one iteration out of sync with the shopping cart. If I put something > in the cart the lineitem doesn't show, but the subtotal does. If I then > refresh the page, the lineitem shows up as #1, but the subtotal reflects two > items (twice as much). Then, if you remove that item, both lineitems show, > but the subTotal goes back. > > I placed some test code on the page and they confirm something funny is > going on. Can anyone tell me what I've done wrong?? > > Thanks, > Joe > > Site location: > ========= START CODE FROM ShoppingCart.tpl =============== > >

Your Shopping Cart Contains the Following Items

> > > [cart]> > > >
> > [!]---Test that anything is being---[/!] > > [orderfile cart=[cart]] > [lineitems] > [showif [lineindex]>0] > There are [lineindex] items in your shopping cart.

> [/showif] > [/lineitems] > [/orderfile] > > [showif [numlineitems]=0] > Your cart is empty.
> Please continue shopping.


> [/showif] > > [!]----End Test------[/!] > > > > [!]---Header Labels---[/!] > > > > > > > > > > > > > [!]---Loop thru items in shopping cart---[/!] > > [Orderfile cart=[cart]] > > [lineitems] > > > > > > > > [!]------Show Rat Restrictions-----[/!] > > > [!]------Show selected size--------[/!] > > > [!]------Show selected color-------[/!] > > > > > > > > > > > [/lineitems] > > [/Orderfile] > > [!]---Show the subtotal for all items in cart---[/!] > > > > > > >
Item #TitleLimitSizeColorQtyPriceQty*PriceAction
[lineindex][Title] > [showif [Restriction]=Rats Only] > [Restriction] > [/showif]None > > [hideif ![TextC]] > [TextC] > [/hideif]NA > > [hideif ![TextD]] > [TextD] > [/hideif]NA > > align=right> > > $[price] > > $[format .2f][math][quantity]*[price][/math][/format] > href=ShoppingCart.tpl?command=remove&db=catalog.db&sku=[url][sku][/url]&car > t=[cart]>Remove Item [lineIndex] >
Subtotal$[subTotal] 
> ======================= END CODE FROM ShoppingCart.tpl ================== > > > ------------------------------------------------------------- > 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/-- ------------------------------------ Charles Kline, PresidentRightCode, Inc. 900 Briggs Road Suite #303 Mount Laurel, NJ 08054Email: ckline@rightcode.net Phone: 856.608.7908 Fax: 856.439.0154 URL: http://www.rightcode.net ------------------------------------------------------------- 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/ charles kline

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:

[WebDNA] [OT] Google redirect or not (2014) WC2f3 (1997) [OT] Might be of interest... (2006) E-Mailer (WebCatb15acgiMac) (1997) Installing on IIS 5.1 Windows XP Pro - Username/Password (2006) WebCatalog can't find database (1997) WebCat2b12 CGI Mac - [shownext] problem (1997) Pirated WebCat? NOT... (2003) Emailer setup (1997) Part 2 - [showif] if variable exists (1998) WebCat2 several catalogs? (1997) How is it done? (1998) ooops...WebCatalog [FoundItems] Problem - LONG - (1997) Banner system (2000) UPDATE - WebDNA - UNIX Shell program request (2004) authorizenet and netscape (2002) Protecting webdelivery (1997) [WebDNA] [OT] hello (2012) A multi-processor savvy WebCatalog? (1997) bug report -- leading < character (1998)