Simple way to create unique SKU
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 11097
interpreted = N
texte = This seemed really obvious after it occured to me. It may be helpful toothers.The WC2.0 site we're going to release in the next week or two includes adatabase of used records (phonograph records) in which each is a uniqueitem. I needed a simple way to assign a unique SKU to each new item withit being transparent to our customer. (Neither the customer or hiscustomers need to see the SKU's as there are other unique identifiers tothe merchandise, and he doesn't use them in his retail operation--the SKU'sreally only need to be there for WC.) I started out working with Kenneth'scounter example, but then it dawned on me that time and date were easierways to implement this.Using sku=[DATE %y%j%H%M%S] on my template for adding items to thecatalog, I generate a unique number (such as 97132110236) that will not beduplicated and that serves as a kind of time stamp as well. I considerednot using the year or seconds, but if something were to be added at thesame hour and minute of the same day of the year next year, or if two itemswere added during the same minute, it could be a problem.Once we do our final debug on the site and release it, I'll upload to theFTP site. We are using frames in what I think is a non-uglyimplementation, and are including some neat email functions and contextualhelp that IMHO are pretty neat. Our customer has been amazed at theblinding speed of WC.EdEd TrefzgerVice President and WebmasterYellow Dog Communications, Inc.http://www.yellowdog.com/phone 716.235.4685 fax 716.235.0509
Associated Messages, from the most recent to the oldest:
This seemed really obvious after it occured to me. It may be helpful toothers.The WC2.0 site we're going to release in the next week or two includes adatabase of used records (phonograph records) in which each is a uniqueitem. I needed a simple way to assign a unique SKU to each new item withit being transparent to our customer. (Neither the customer or hiscustomers need to see the SKU's as there are other unique identifiers tothe merchandise, and he doesn't use them in his retail operation--the SKU'sreally only need to be there for WC.) I started out working with Kenneth'scounter example, but then it dawned on me that time and date were easierways to implement this.Using sku=[DATE %y%j%H%M%S] on my template for adding items to thecatalog, I generate a unique number (such as 97132110236) that will not beduplicated and that serves as a kind of time stamp as well. I considerednot using the year or seconds, but if something were to be added at thesame hour and minute of the same day of the year next year, or if two itemswere added during the same minute, it could be a problem.Once we do our final debug on the site and release it, I'll upload to theFTP site. We are using frames in what I think is a non-uglyimplementation, and are including some neat email functions and contextualhelp that IMHO are pretty neat. Our customer has been amazed at theblinding speed of WC.EdEd TrefzgerVice President and WebmasterYellow Dog Communications, Inc.http://www.yellowdog.com/phone 716.235.4685 fax 716.235.0509
Ed Trefzger
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:
Am I going senile? (Price recalc based on quantity) (1997)
[WebDNA] WebDNA 8.6 announced - New features (2018)
page redirect in webDNA (1997)
Re:2nd WebCatalog2 Feature Request (1996)
Calendar Snippet Problems (1998)
Further tests with the infamous shipCost (1997)
[WebDNA] Admin Login Required to Serve any TPL Page (2009)
A little syntax help (1997)
Friday night shopping site joke (1997)
My new discussion forum (2003)
WebCat2b15MacPlugin - [protect] (1997)
Is this possible, WebCat2.0 and checkboxes (1997)
Alpha numeric [CreateDate] (2000)
Editing Users.db (1997)
$Quit, $CloseDatabase corrections (1997)
Re:Copyright ? (1997)
Bugs in IE 6.0 ? (2003)
[AppendFile] problem (WebCat2b13 Mac .acgi) (1997)
WebDNA 6 vs. Lasso 7 (2004)
different ship dates and shopping carts -- how to? (1997)