Re: forming a SKU

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23521
interpreted = N
texte = >The only real safe sku would be > >[date %Y%m%d][time %h%m%s][showif >[lastrandom]=[random]][math][random]+[random][/math][/showif][showif >[lastrandom]![random][lastrandom][/showif][ordersku][productsku][sizeSKU][shapeS >KU][colorSKU] I disagree. This will not work the way you think it will ...You have to remember that the [lastrandom] and [random] tags are relative to the thread they are called in, they have no connection with any other threads. Therefore, the same [random] and [lastrandom] values could theoretically be created at the exact same time in two or more completely separate threads.The most reliable and 'practical' way to create a unique SKU value across *all* active webcat threads is by using the [cart] tag. That's why WebCat's internal [cart] calculation code uses date, time *AND* a special 'index' value that's never used in two different threads to generate a guaranteed-unique [cart] value every time.If your goal is to create a unique SKU value that *also* has some code to indicate size, color, etc. the best solution is to use something like this:[cart][size][color][etc]Where the size, color, etc. values are simply *appended* to the end of the guaranteed-unique [cart] value.Sincerely, Ken Grome Associated Messages, from the most recent to the oldest:

    
  1. Re: forming a SKU (Larry Hewitt 1999)
  2. Re: forming a SKU (Kenneth Grome 1999)
  3. Re: forming a SKU (Martin Bech 1999)
  4. Re: forming a SKU (Peter Ostry 1999)
  5. Re: forming a SKU (Joseph Pugh 1999)
  6. Re: forming a SKU (Martin Bech 1999)
  7. Re: forming a SKU (Kenneth Grome 1999)
  8. Re: forming a SKU (Kenneth Grome 1999)
  9. Re: forming a SKU (Jan Kinzler 1999)
  10. Re: forming a SKU (Joseph Pugh 1999)
  11. Re: forming a SKU (Martin Bech 1999)
  12. Re: forming a SKU (Joseph Pugh 1999)
  13. Re: forming a SKU (Peter Ostry 1999)
  14. Re: forming a SKU (Martin Bech 1999)
  15. Re: forming a SKU (Joseph Pugh 1999)
  16. Re: forming a SKU (Peter Ostry 1999)
  17. Re: forming a SKU (Joseph Pugh 1999)
  18. forming a SKU (Jan Kinzler 1999)
>The only real safe sku would be > >[date %Y%m%d][time %h%m%s][showif >[lastrandom]=[random]][math][random]+[random][/math][/showif][showif >[lastrandom]![random][lastrandom][/showif][ordersku][productsku][sizeSKU][shapeS >KU][colorSKU] I disagree. This will not work the way you think it will ...You have to remember that the [lastrandom] and [random] tags are relative to the thread they are called in, they have no connection with any other threads. Therefore, the same [random] and [lastrandom] values could theoretically be created at the exact same time in two or more completely separate threads.The most reliable and 'practical' way to create a unique SKU value across *all* active webcat threads is by using the [cart] tag. That's why WebCat's internal [cart] calculation code uses date, time *AND* a special 'index' value that's never used in two different threads to generate a guaranteed-unique [cart] value every time.If your goal is to create a unique SKU value that *also* has some code to indicate size, color, etc. the best solution is to use something like this:[cart][size][color][etc]Where the size, color, etc. values are simply *appended* to the end of the guaranteed-unique [cart] value.Sincerely, Ken Grome Kenneth Grome

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:

Beta version-Mac? (was Emailer update for Mac?) (1998) TCP Connect (2000) [BULK] [WebDNA] A new commerce system for v7+ (2011) Not carrying Zero (2000) WebCat2 as a chat server? (1997) Can't Update records (1997) Generating Report Totals (1997) Further on formula.db failure to calculate shipCost (1997) security problem (1997) I try hard to think positively (1998) International Orders (1998) OT: Web Cams (2003) user submitted data REPOST (2000) PIXO Support (1997) Using [Showif] tag. Mac (1997) Sorting when searching with grouped fields (2002) [Reload mydata.db] (1998) Summary layout (1997) Databases inside [SHOWIF] (1998) Multiple Ad databases? (1997)