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:

Updating Prices in Online Database (1999) Search/sort in URL Was: GuestBook example (1997) Looking for a special Image Upload Script (2004) Permissions Ignored - PLEASE HELP (2003) No Line Breaks from OSX server (2002) Press Release hit the NewsWire!!! (1997) Secure Server not remembering discounts (1998) Cannot calculate prices (1997) Modifying order output (1997) [OT] Discussion forum, last visit, Cookie, ... (2003) problems with 2 tags (1997) writing db to disk (1997) WebCat hosting providers? (1997) Cart Question (1998) [SMSI] WebDNA is too good to go away! (2006) 2.1 pricing? (1998) WebMerchant 3.0 for Mac shipping now (1998) international time (1997) Paths (2000) [WebDNA] Non-numbers entered into a field that asks for a (2008)