Re: SKU Question

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 24360
interpreted = N
texte = on page 1 on page 2[replace db=mydatabase.db&eqskudata=[newsku]&append=t]sku=[newsku]&yourdata=[somevariable][/replace]ok, to summerize, you search the database to find all items whose sku data does Not Equal' Bogus so we're going to find every record, right? ok, then 'DEscending sku sort' so the highest sku will show first. then skutype = number, so that it knows to sort numerically, and not alphabetically, and then max=1, because of all those sku's we just found, we're only interested in the first one, the highest one.then it's simple math, the highest sku in the db +1 gets you a new sku.say, for example you have a new db, the number found in the result will be nothing, plus one. so newsku=1.then on page two we replace the record with sku 1, normally, replace won't do that, because sku 1 doesn't exist, which is why we put append=t in there. so replace 1 and if it's not there append it.if the user reloads at this point, record 1 is replaced. but the sku is not incremented.this is all in the docs but kinda hard to grasp, HTH -AaronRodolfo de la Garza wrote:> I tried what Jesse recommend using it this way: > > [search db=mydatabase.db&eqSKUdata=[sku]][founditems][showif > [numFound]=0] [append] > [/showif][/founditems] > > If it is the first time I use this SKU, I suppose that [numFound] will be > 0 but it doesn't append it, I don't know why. > > Am I doing somethig wrong? > > On the other hand, Howard said: > > you could generate the SKU on the same form > where they enter the rest of the info, and on the submitted page,. Then, > if they go back and submit again, the record > will not be added because the replace will already see a record with that > sku, so it will replace it, otherwise if it doesn't aleady exist, it will > add it. > > I don't understand, what does use a replace with append=t means. > I'm just learning. > > Ken said: > use an append context and put the code that creates your SKU inside the > context instead of in the form > > I'm using the append context and I can do it. It is true the SKU will be > not duplcated (Good Idea) but the item will be duplicated with different > SKU. > > Are there a way to prevent this? > > Thanks for your support. > > Rodolfo de la Garza > > The 11/13/99 12:47 PM Jesse Williams Proudman lists@ninewire.com wrote > > >On the page that appends it, check to see if the sku is in use with a > >search. > > > >Jesse Williams Proudman - NineWire Production > > http://www.ninewire.com <-> Jesse@ninewire.com > > Innovative and Creative Web Design and Hosting > > > >> -----Original Message----- > >> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On > >> Behalf Of Rodolfo de la Garza > >> Sent: Saturday, November 13, 1999 10:47 AM > >> To: WebCatalog Talk > >> Subject: SKU Question > >> > >> > >> Hi there, > >> > >> How can I prevent SKU to be duplicated by error? > >> If the user click the back button and submit again the item the SKU will > >> be duplicated. > >> > >> Any Idea? > >> > >> Thanks. > >> > >> > >> ------------------------------------------------------------- > >> Brought to you by CommuniGate Pro - The Buzz Word Compliant > >> Messaging Server. > >> To end your Mail problems go to . > >> > >> 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 > >> > >> > > > > > >------------------------------------------------------------- > >Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging > Server. > >To end your Mail problems go to . > > > >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 > > > > ------------------------------------------------------------- > Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. > To end your Mail problems go to . > > 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 ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Associated Messages, from the most recent to the oldest:

    
  1. Re: SKU Question (Aaron Lynch 1999)
  2. Re: SKU Question (Jesse Williams Proudman 1999)
  3. Re: SKU Question (J. A. Hill 1999)
  4. Re: SKU Question (Rodolfo de la Garza 1999)
  5. Re: SKU Question (Aaron Lynch 1999)
  6. Re: SKU Question (Rodolfo de la Garza 1999)
  7. Re: SKU Question (Kenneth Grome 1999)
  8. Re: SKU Question (Howard Wolosky 1999)
  9. Re: SKU Question (Jesse Williams Proudman 1999)
  10. SKU Question (Rodolfo de la Garza 1999)
on page 1 [founditems][math][sku]+1[/math][/founditems][/search]>on page 2[replace db=mydatabase.db&eqskudata=[newsku]&append=t]sku=[newsku]&yourdata=[somevariable][/replace]ok, to summerize, you search the database to find all items whose sku data does Not Equal' Bogus so we're going to find every record, right? ok, then 'DEscending sku sort' so the highest sku will show first. then skutype = number, so that it knows to sort numerically, and not alphabetically, and then max=1, because of all those sku's we just found, we're only interested in the first one, the highest one.then it's simple math, the highest sku in the db +1 gets you a new sku.say, for example you have a new db, the number found in the result will be nothing, plus one. so newsku=1.then on page two we replace the record with sku 1, normally, replace won't do that, because sku 1 doesn't exist, which is why we put append=t in there. so replace 1 and if it's not there append it.if the user reloads at this point, record 1 is replaced. but the sku is not incremented.this is all in the docs but kinda hard to grasp, HTH -AaronRodolfo de la Garza wrote:> I tried what Jesse recommend using it this way: > > [search db=mydatabase.db&eqSKUdata=[sku]][founditems][showif > [numFound]=0] [append] > [/showif][/founditems] > > If it is the first time I use this SKU, I suppose that [numFound] will be > 0 but it doesn't append it, I don't know why. > > Am I doing somethig wrong? > > On the other hand, Howard said: > > you could generate the SKU on the same form > where they enter the rest of the info, and on the submitted page,. Then, > if they go back and submit again, the record > will not be added because the replace will already see a record with that > sku, so it will replace it, otherwise if it doesn't aleady exist, it will > add it. > > I don't understand, what does use a replace with append=t means. > I'm just learning. > > Ken said: > use an append context and put the code that creates your SKU inside the > context instead of in the form > > I'm using the append context and I can do it. It is true the SKU will be > not duplcated (Good Idea) but the item will be duplicated with different > SKU. > > Are there a way to prevent this? > > Thanks for your support. > > Rodolfo de la Garza > > The 11/13/99 12:47 PM Jesse Williams Proudman lists@ninewire.com wrote > > >On the page that appends it, check to see if the sku is in use with a > >search. > > > >Jesse Williams Proudman - NineWire Production > > http://www.ninewire.com <-> Jesse@ninewire.com > > Innovative and Creative Web Design and Hosting > > > >> -----Original Message----- > >> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On > >> Behalf Of Rodolfo de la Garza > >> Sent: Saturday, November 13, 1999 10:47 AM > >> To: WebCatalog Talk > >> Subject: SKU Question > >> > >> > >> Hi there, > >> > >> How can I prevent SKU to be duplicated by error? > >> If the user click the back button and submit again the item the SKU will > >> be duplicated. > >> > >> Any Idea? > >> > >> Thanks. > >> > >> > >> ------------------------------------------------------------- > >> Brought to you by CommuniGate Pro - The Buzz Word Compliant > >> Messaging Server. > >> To end your Mail problems go to . > >> > >> 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 > >> > >> > > > > > >------------------------------------------------------------- > >Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging > Server. > >To end your Mail problems go to . > > > >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 > > > > ------------------------------------------------------------- > Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. > To end your Mail problems go to . > > 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 ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Aaron Lynch

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:

Re:Emailer setup (1997) WebMerchant 2.1.2 (1998) ISAPI WC6a and Windows 2003 Web Edition (2006) WebCatalog Upgrade Pricing? (1997) [OT] DOD again (2003) I have observed and I am gone. (1998) Navigator 4.0 & tables (1997) Documentation Feedback (1997) Running 2 two WebCatalog.acgi's (1996) Template cache problem with WC4 on Mac OS X (2000) WebCat2b12 - New features for 1.6 users ... (1997) [delete] problem (1997) Summary layout (1997) [WebDNA] Domain upgrade questions (2009) Email (1998) [INCLUDE] Limitations (1998) 3.0 [TEXT] variables (1998) Getting Values into Cart the easy way?* (1998) [delete] problem (1997) webcat (2000)