Re: Unique SKUs

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 32000
interpreted = N
texte = At 9:36 AM 5/17/00, WebDNA Support wrote: > >>How do I get a unique SKU to be automatically generated when using an >>>append context or command? >> >>Just use the default WebCat method: >> > > > > >It should be noted that this technique is not endorsed by Smith >Micro, because it fails when two or more people hit the same page >within one second. [cart] is guaranteed to create a unique value >regardless of how many hits are received in a small time frame.So some of the applications SmithMicro sells as part of WebCatloog are unsupported? Is there a disclaimer that I missed? Please see AdminAdd.tpl generated by the database helper.Now if your database will never have two or more records added at the same time fine... but why learn how to do it this way when sooner or later, someone will ask you to build an application that will have the possibility of more then one record being added during any given second.Read the pdf docs on the [cart] feature. Learn it. Love it. Envagelize about it. So change the above (which is found at the bottom of AdminAdd.tpl from database helper) to:Be careful though of people hitting a browser back button and reusing the page thereby making SKU not a unique value in your database.A method that I prefer in some applications would be to create the unique value in the template that actually does the append.So a database helper AdminSearch.tpl code would be changed to this:[showif [action]=Append] [replace db=xxx.db&eqSKUdatarq=[cartl]&append=T]SKU=[cart]&[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables][/replace ] Record Added
[commitdatabase db=xxx.db] [/showif]And make sure you _don't_ pass a _SKU form field from the preceeding page.___Joe____________________________________________________ Joseph D'Andrea JoeDan@West21.com WEST21.com Internet services for the 21st Century http://www.west21.com/ _________________________________________________ ------------------------------------------------------------- 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: Multiple Unique SKUs (Clint Davis 2000)
  2. Re: Multiple Unique SKUs (John Peacock 2000)
  3. Re: Multiple Unique SKUs (Kim Ingram 2000)
  4. Multiple Unique SKUs (Clint Davis 2000)
  5. Re: Unique SKUs (Joseph D'Andrea 2000)
  6. Re: Unique SKUs (WebDNA Support 2000)
  7. Re: Unique SKUs (Clint Davis 2000)
  8. Re: Unique SKUs (Robert Wade 2000)
  9. Re: Unique SKUs (Sally Reidy 2000)
  10. Unique SKUs (Christopher Mackay 2000)
At 9:36 AM 5/17/00, WebDNA Support wrote: > >>How do I get a unique SKU to be automatically generated when using an >>>append context or command? >> >>Just use the default WebCat method: >> > > > > >It should be noted that this technique is not endorsed by Smith >Micro, because it fails when two or more people hit the same page >within one second. [cart] is guaranteed to create a unique value >regardless of how many hits are received in a small time frame.So some of the applications SmithMicro sells as part of WebCatloog are unsupported? Is there a disclaimer that I missed? Please see AdminAdd.tpl generated by the database helper.Now if your database will never have two or more records added at the same time fine... but why learn how to do it this way when sooner or later, someone will ask you to build an application that will have the possibility of more then one record being added during any given second.Read the pdf docs on the [cart] feature. Learn it. Love it. Envagelize about it. So change the above (which is found at the bottom of AdminAdd.tpl from database helper) to:[cart]>Be careful though of people hitting a browser back button and reusing the page thereby making SKU not a unique value in your database.A method that I prefer in some applications would be to create the unique value in the template that actually does the append.So a database helper AdminSearch.tpl code would be changed to this:[showif [action]=Append] [replace db=xxx.db&eqSKUdatarq=[cartl]&append=T]SKU=[cart]&[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables][/replace ] Record Added
[commitdatabase db=xxx.db] [/showif]And make sure you _don't_ pass a _SKU form field from the preceeding page.___Joe____________________________________________________ Joseph D'Andrea JoeDan@West21.com WEST21.com Internet services for the 21st Century http://www.west21.com/ _________________________________________________ ------------------------------------------------------------- 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/ Joseph D'Andrea

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:

Duplicate emails with bcc (2000) Can anyone help me with this shipping thing? (1998) Polls (2003) Wrapping text (1998) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) WC2.0 Memory Requirements (1997) [WebDNA] Version 7.x: webdna.ini and EmailerPrefs (2012) Frames and WebCat (1997) referrer and no caches (1997) [TaxableTotal] - not working with AOL and IE (1997) shipCost (1998) Firesite cache vs webcat cache (1997) webcat 2.1 new cart fields - please explain more (1998) Problem 2 of 2 (was: Shipping Confusion) (2000) Initiating NewCart (1997) Date in IF ELSE Comparison (2004) Search returns all, not 20 (1997) WebCatalog Mac 2.1b3 (1997) WebCat2 - [include] tags (1997) search across ip/domain addresses? (1998)