Re: 2cd pare of eyes.

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39398
interpreted = N
texte = Sorry Gene, let me get a little further before I take up all you guys's time. :-) (didn't really mean to trouble shoot the logic quite yet... just syntax)Lookup was suggested to me but I decided against it since the input values come from user input and [lookup] is case sensitive. (my fields are mixed) John P. Suggested a way to get around this but at this time I'm just going to keep on keeping on with [search] so I don't have to revamp some stuff.The idea of using eqSKUdatarq=[name] (which should be [value]) is what I tried first. however, I needed to perform actions on the found items of a (not equal to SKU) search. ([name]=NL)Thanks., I'll work it a little further and if I still have problems I'll come begging at that time. :-) D Gene Beljaeff wrote:> Why are you using neSKUdatarq=[blank] in your search and not eqSKUdatarq=[name], or for that matter, a lookup? Also, do you only want to add the SKUs to the cart if they are ALL valid, or do you want to add only valid ones and ignore invalid ones? > > This code should do the latter... > > [showif [qo]=update] > [!]to decide if the items listed are ready to add to the cart[/!] > [!]###loop for every formvariable who's name contains 'SKU'...###[/!] > [formvariables name=SKU&exact=F] > [hideif [url][value][/url]=] > [text]valid=no[/text] > [!]###see if formvariable SKU is in products.db...###[/!] > [text]theSKU=[lookup db=admin/products.db&value=[name]&lookinfield=SKU&returnfield=SKU¬found=][/text] > [showif [theSKU]!] > [text]valid=yes[/text] > [/showif] > [showif [theSKU]=] > [text]theSKU=NL[/text] [!]<=== do you need this? ###[/!]- yes (not quite like this though) > [/showif] > [showif [valid]=yes] > [!]verifies if item is already in cart[/!] > [orderfile cart=[cart]] > [lineitems] > [showif [url][theSKU][/url]=[SKU]] > [text]incart=T[/text] > [/showif] > [hideif [incart]=T] > [text]shop=put[/text] > [/hideif] > [/lineitems] > [/orderfile] > > [!]this adds the item[/!] > [showif [shop]=put] > [addlineitem cart=[cart]&db=admin/products.db&sku=[url][theSKU][/url]][/addlineitem] > [/showif] > [/showif] > [/hideif] > [/formvariables] > [/showif] > > Gene >-- Donovan D. Brooke Systems Administrator/ Assc. Art Director Epsen Hillmer Graphics I know I'm making progress when I look at the questions I have asked in the past and think to myself... how stupid was that ------------------------------------------------------------- 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: 2cd pare of eyes. (Donovan Brooke 2001)
  2. Re: 2cd pare of eyes. (Donovan Brooke 2001)
  3. Re: 2cd pare of eyes. (Gene Beljaeff 2001)
  4. Re: 2cd pare of eyes. (Donovan Brooke 2001)
  5. Re: 2cd pare of eyes. (Samuel Renkert 2001)
  6. Re: 2cd pare of eyes. (Jeroen de Wijn 2001)
  7. 2cd pare of eyes. (Donovan Brooke 2001)
Sorry Gene, let me get a little further before I take up all you guys's time. :-) (didn't really mean to trouble shoot the logic quite yet... just syntax)Lookup was suggested to me but I decided against it since the input values come from user input and [lookup] is case sensitive. (my fields are mixed) John P. Suggested a way to get around this but at this time I'm just going to keep on keeping on with [search] so I don't have to revamp some stuff.The idea of using eqSKUdatarq=[name] (which should be [value]) is what I tried first. however, I needed to perform actions on the found items of a (not equal to SKU) search. ([name]=NL)Thanks., I'll work it a little further and if I still have problems I'll come begging at that time. :-) D Gene Beljaeff wrote:> Why are you using neSKUdatarq=[blank] in your search and not eqSKUdatarq=[name], or for that matter, a lookup? Also, do you only want to add the SKUs to the cart if they are ALL valid, or do you want to add only valid ones and ignore invalid ones? > > This code should do the latter... > > [showif [qo]=update] > [!]to decide if the items listed are ready to add to the cart[/!] > [!]###loop for every formvariable who's name contains 'SKU'...###[/!] > [formvariables name=SKU&exact=F] > [hideif [url][value][/url]=] > [text]valid=no[/text] > [!]###see if formvariable SKU is in products.db...###[/!] > [text]theSKU=[lookup db=admin/products.db&value=[name]&lookinfield=SKU&returnfield=SKU¬found=][/text] > [showif [theSKU]!] > [text]valid=yes[/text] > [/showif] > [showif [theSKU]=] > [text]theSKU=NL[/text] [!]<=== do you need this? ###[/!]- yes (not quite like this though) > [/showif] > [showif [valid]=yes] > [!]verifies if item is already in cart[/!] > [orderfile cart=[cart]] > [lineitems] > [showif [url][theSKU][/url]=[SKU]] > [text]incart=T[/text] > [/showif] > [hideif [incart]=T] > [text]shop=put[/text] > [/hideif] > [/lineitems] > [/orderfile] > > [!]this adds the item[/!] > [showif [shop]=put] > [addlineitem cart=[cart]&db=admin/products.db&sku=[url][theSKU][/url]][/addlineitem] > [/showif] > [/showif] > [/hideif] > [/formvariables] > [/showif] > > Gene >-- Donovan D. Brooke Systems Administrator/ Assc. Art Director Epsen Hillmer Graphics I know I'm making progress when I look at the questions I have asked in the past and think to myself... how stupid was that ------------------------------------------------------------- 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/ Donovan Brooke

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:

PIXO (1997) type 2 errors with ssl server (1997) There is a bug in 3.0.1 mac plug-in (1998) [Announce] WebCatalog 3.0 Beta Program (1998) textA and Title? (1997) WebCat2.0 [format thousands .0f] no go (1997) Looking for a host (1997) Mac Webcat 3.0.3b1 memory leak redirect inside search (1998) WebCat virtual postcard is done! Thanks for the help! (1998) Emailer Problem (1999) WebCatalog Hosting (1996) WebDNA Solutions ... sorry! (1997) Limiting user access to .tmpl files (1997) Searchable list archive (1997) $flushdatabases question ... (1998) [sendmail] on NT? (1997) WebCat2 - Getting to the browser's username/password data (1997) Searching multiple Databases (1997) Where is f2? (1997) Euro WebDNA Conference (2004)