Re: Problem 2 of 2 (was: Shipping Confusion)

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33651
interpreted = N
texte = You need to identify a unique value for all the posters in the database. Do they all have ...pstr... in the SKU? Do they all have an 'itemType' field w/ a poster value? Do they all have Poster in the 'title' field? Something that all posters have that no other products have. Then you can do a test to see if any lineitems meet that criteria... and if at least one does, then you add the poster tube item to the cart.Let's pretend all your posters have an 'itemType' field w/ a poster value. So then:[lineitems] [showif [url][itemType][/url]=poster] [text show=F]needsTube=yes[/text] [/showif] [/lineitems][showif [url][needsTube][/url]=yes] [SetLineItem cart=[cart]&index=[math show=T][NumLineItems]+1[/math]]quantity=1&price=5[/SetLineItem] [/showif](remove all carriage returns added by email - the ones that break proper syntax)HTH -John> > > For now, I think I'd settle for this solution if I could figure out > how to make it work! How does one search the lineitems and add a > lineitem based on the result? The logic is simple enough, but I'm > having a hard time with it... > ------------------------------------------------------------- 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: Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
  2. Re: Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
  3. Re: Problem 2 of 2 (was: Shipping Confusion) (Rob Marquardt 2000)
  4. Re: Problem 2 of 2 (was: Shipping Confusion) (John Peacock 2000)
  5. Re: Problem 2 of 2 (was: Shipping Confusion) (John Butler 2000)
  6. Re: Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
  7. Re: Problem 2 of 2 (was: Shipping Confusion) (John Peacock 2000)
  8. Re: Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
  9. Re: Problem 2 of 2 (was: Shipping Confusion) (John Butler 2000)
  10. Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
You need to identify a unique value for all the posters in the database. Do they all have ...pstr... in the SKU? Do they all have an 'itemType' field w/ a poster value? Do they all have Poster in the 'title' field? Something that all posters have that no other products have. Then you can do a test to see if any lineitems meet that criteria... and if at least one does, then you add the poster tube item to the cart.Let's pretend all your posters have an 'itemType' field w/ a poster value. So then:[lineitems] [showif [url][itemType][/url]=poster] [text show=F]needsTube=yes[/text] [/showif] [/lineitems][showif [url][needsTube][/url]=yes] [SetLineItem cart=[cart]&index=[math show=T][NumLineItems]+1[/math]]quantity=1&price=5[/SetLineItem] [/showif](remove all carriage returns added by email - the ones that break proper syntax)HTH -John> > > For now, I think I'd settle for this solution if I could figure out > how to make it work! How does one search the lineitems and add a > lineitem based on the result? The logic is simple enough, but I'm > having a hard time with it... > ------------------------------------------------------------- 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 Butler

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:

Template Cache problem (2000) ShipToState question (1998) [WebDNA] anyone successfully using webdna with paypal's (2008) Obtaining a dice result (2007) Help name our technology! (1997) Authenticate (2000) WCS Newbie question (1997) Generating Report Totals (1997) [WebDNA] Quick sort/results grouping Q (2008) RE: protect tag on NT (1997) [WebDNA] Fails from http:// but works from file:/// (2009) Need formatting help (1998) The IBC root beer has arrived! (1997) WebCatalog stalls (1998) Re:Emailer and encryption (1997) Showif vs. IF/then/else (2001) Cart ID Duplication (2001) Requiring that certain fields be completed (1997) [date format] w/in sendmail (1997) Various Problems (1997)