Re: [WebDNA] Shopping cart code debug

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 101936
interpreted = N
texte = this has a bug where I marked, see below: On Feb 5, 2009, at 12:18 PM, Ki Song wrote: > I found some bugs ... here's the modified code: > > ====================================================== > ====================================================== > [text show=f]SPSubtotal=0[/text] > [text show=f]SPQualify=f[/text] > [text show=f]promoExists=f[/text] > > [lineitems] > [showif [sku]~SP] > [math show=f]SPSubtotal=[SPSubtotal]+([price]*[quantity])[/math] > [/showif] > [/lineitems] > [showif [url]SPSubtotal>99] Here, you are missing the ^^^^^ closing [/url] around [SPSubtotal]. and also it (the var [SPSubtotal] itself) should be enclosed by square brackets if you expect the value of that var to be inserted there. > > [text show=f]SPQualify=t[/text] > [/showif] > > [SPQualify],[SPSubtotal][!]I want to see what SPQualify and SPSubtotal > are set to[/!] > ====================================================== > ====================================================== > > I have an item in the cart that starts with SP and is over 100. > However, the variables show up as f and 0, respectively. > > Same result. > > > Ki Song > > Ki Song wrote: >> Can you guys take a look at the code below: >> ====================================================== >> ====================================================== >> [text show=f]SPSubtotal=0[/text] >> [text show=f]SPQualify=f[/text] >> [text show=f]promoExists=f[/text] >> [lineitems] >> [showif [url][sku][/url]~SP] >> [showif [math show=f]SPSubtotal=[SPSubtotal]+([price]*[quantity]) >> [/math]>99] >> [text show=f]SPQualify=t[/text] >> [/showif] >> [/showif] >> [/lineitems] >> [SPQualify],[SPSubtotal][!]I want to see what SPQualify and >> SPSubtotal are set to[/!] >> ====================================================== >> ====================================================== >> I have an item in the cart that starts with SP and is over 100. >> However, the variables show up as f and 0, respectively. >> Can you guys see anything wrong? >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Shopping cart code debug (Marc Thompson 2009)
  2. Re: [WebDNA] Shopping cart code debug (Ki Song 2009)
  3. Re: [WebDNA] Shopping cart code debug (Govinda 2009)
  4. Re: [WebDNA] Shopping cart code debug (Donovan Brooke 2009)
  5. Re: [WebDNA] Shopping cart code debug (Ki Song 2009)
  6. Re: [WebDNA] Shopping cart code debug (Govinda 2009)
  7. Re: [WebDNA] Shopping cart code debug (Govinda 2009)
  8. Re: [WebDNA] Shopping cart code debug ("Dan Strong" 2009)
  9. Re: [WebDNA] Shopping cart code debug (Donovan Brooke 2009)
  10. Re: [WebDNA] Shopping cart code debug (Ki Song 2009)
  11. [WebDNA] Shopping cart code debug (Ki Song 2009)
this has a bug where I marked, see below: On Feb 5, 2009, at 12:18 PM, Ki Song wrote: > I found some bugs ... here's the modified code: > > ====================================================== > ====================================================== > [text show=f]SPSubtotal=0[/text] > [text show=f]SPQualify=f[/text] > [text show=f]promoExists=f[/text] > > [lineitems] > [showif [sku]~SP] > [math show=f]SPSubtotal=[SPSubtotal]+([price]*[quantity])[/math] > [/showif] > [/lineitems] > [showif [url]SPSubtotal>99] Here, you are missing the ^^^^^ closing [/url] around [SPSubtotal]. and also it (the var [SPSubtotal] itself) should be enclosed by square brackets if you expect the value of that var to be inserted there. > > [text show=f]SPQualify=t[/text] > [/showif] > > [SPQualify],[SPSubtotal][!]I want to see what SPQualify and SPSubtotal > are set to[/!] > ====================================================== > ====================================================== > > I have an item in the cart that starts with SP and is over 100. > However, the variables show up as f and 0, respectively. > > Same result. > > > Ki Song > > Ki Song wrote: >> Can you guys take a look at the code below: >> ====================================================== >> ====================================================== >> [text show=f]SPSubtotal=0[/text] >> [text show=f]SPQualify=f[/text] >> [text show=f]promoExists=f[/text] >> [lineitems] >> [showif [url][sku][/url]~SP] >> [showif [math show=f]SPSubtotal=[SPSubtotal]+([price]*[quantity]) >> [/math]>99] >> [text show=f]SPQualify=t[/text] >> [/showif] >> [/showif] >> [/lineitems] >> [SPQualify],[SPSubtotal][!]I want to see what SPQualify and >> SPSubtotal are set to[/!] >> ====================================================== >> ====================================================== >> I have an item in the cart that starts with SP and is over 100. >> However, the variables show up as f and 0, respectively. >> Can you guys see anything wrong? >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> old archives: http://dev.webdna.us/TalkListArchive/ > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Govinda

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] OSX users (2009) [WebDNA] authorize.net / payeezy FirstData (2019) Apache2 connector (2003) Quit revisited (1997) Clearing orders and database help! (1997) [ShowIf] and empty fields (1997) Re:PCS Customer submissions ? (1997) Nav. 4 probs with cart - Serious problem (1997) Web Catalog 2 demo (1997) No Line Breaks Appearing (2000) Formulas.db + Users.db (1997) RE: Displaying Location (1997) Show of Hands (2002) Unexpected error (1997) Trouble with formula.db (1997) Replace and Date (2002) Generating Options for a Form. (1997) [WebDNA] some tests (2011) Hiding HTML and page breaks (1997) More on the email templates (1997)