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:

Protecting webdelivery (1997) Protect (1997) I'm new be kind (1997) Question (2001) Need relative path explanation (1997) FlushDatabases (2000) Running _every_ page through WebCat ? (1997) [item] appears after 'remove last item' ... (1997) RE: Displaying Location (1997) AppleScript question (1997) Just another thing regarding my weird ShoppingCarts (2003) http://www.smithmicro.com/WebDNAReference/ current? (2000) Order not created error (1997) Searchable list archive (1997) Forbidden CGI Error (1997) Code database (1998) WebCommerce: Folder organization ? (1997) Summing fields (1997) WebCatalog can't find database (1997) Protect (1997)