Re: remotely creating and populating a stock inventory db - almost there!

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 24589
interpreted = N
texte = Just a few questions:Why are you creating a database for every sku? Dont you think you may accumulate to many databases to keep track of? Why not just uses 1 database? I thought [writefile] did not understand databases? could this be causing some of your problems, I looked over the code real quick and didn't analyze the entire thing. That was just one of my thoughts which could be causing you problems in the long run, but if I am wrong, I congratulate you on getting it to work. As we all know, everything written or not written in the manual isn't always true.Brian Boegershausen WebCatalog Programmer www.collegefever.com ----- Original Message ----- From: John Butler To: WebCatalog Talk Sent: Thursday, November 18, 1999 12:02 PM Subject: remotely creating and populating a stock inventory db - almost there! > Good day :-) > > ***** I need help from you serious webcat programmers out there.. ****** > > This is a bit long but some may find some useful code they want :-) > > My site sells items that come in different sizes and colors and I want to offer all > those different sizes and colors using only one SKU per item. I am nearly successful > > in creating an additional feature of my site's admin area which will allow the admin > person to create (via browser) and view a db (which is relational to the main > products.db) > that stores a SKU's number in stock (NIS) for each size/color variation of that > SKU. (Note that there is no limit to the number of fields one can create as with the > recent omnibase app.) > > I just need help with that last section below (FGA-ProductNIS-3.tmpl), but I'll > post the code for the preceding pages as well so you see where I am going and so people > can > have the code if they want. These pages work great to create the db properly, and in > > populating it (the [replace] in FGA-ProductNIS-3.tmpl), but in viewing the > final db (the in FGA-ProductNIS-3.tmpl), the rows of values shown in the > table do not match with the records in the db. Sooo close... I just need this last > 'viewing of > the db' working because I want the user to be able to resubmit to repopulate all the > fields in all the > records if needed. > > Any help would be GREATLY appreciated. > > try it out!! > > (In all pages, only the relevant code is included.) > > -----------------------[FGA-ProductCatalog.tmpl]----------------------- > > > > > > > > > [Search db=FG-products.db&neSKUdata=NadaAmingo&max=100] > [foundItems] > setup > [/foundItems] > [/Search] > > > > -----------------------[/FGA-ProductCatalog.tmpl]----------------------- > > **************************************************************************** * > > -----------------------[FGA-ProductNIS-0.tmpl]----------------------- > > > > > > > > >

Choose how many fields and records for NumInStock database for Product# > [SKU]

> > > > > > Product# [SKU] should have how many size options? > >

> Product# [SKU] should have how many color options? > > > > > > > > > -----------------------[/FGA-ProductNIS-0.tmpl]----------------------- > > **************************************************************************** * > > -----------------------[FGA-ProductNIS-1.tmpl]----------------------- > > > > > > > > >

Choose size options and color options for the upcoming NIS-[SKU].db for > Product# [SKU]

> > > > > >

Give the Sizes Please:

> [loop start=1&end=[NumSizeOpts]&advance=1] > [SKU] ---NIS Size Option#[index]=
> [/loop] >

>

Give the Colors Please:

> [loop start=1&end=[NumColorOpts]&advance=1] > [SKU] ---NIS Color Option#[index]=
> [/loop] > > > > > > -----------------------[/FGA-ProductNIS-1.tmpl]----------------------- > > **************************************************************************** * > > -----------------------[FGA-ProductNIS-2.tmpl]----------------------- > > > > > > > > > > [WriteFile NIS-[SKU].db]NumSizes NumColors color[loop start=1&end=[NumSizeOpts]&advance=1] > [interpret][NISSize[index]][/interpret][/loop] > [/WriteFile] > [loop start=1&end=[interpret][NumColorOpts][/interpret]&advance=1][Append > db=NIS-[SKU].db]NumSizes=[NumSizeOpts]&NumColors=[NumColorOpts]&color=[inter pret][NISColor[index]][/interpret][/Append][/loop] > > [interpret][closedatabase NIS-[SKU].db][/interpret] > >

Please enter values for NIS (Number In Stock) for each size/color variation > for db- NIS-[SKU].db

> > > > > > > [loop start=1&end=[NumSizeOpts]&advance=1] > NISSize[index]=[interpret][NISSize[index]][/interpret] NAME=NISSize[index] value=[interpret][NISSize[index]][/interpret]>
> [/loop] >

> [loop start=1&end=[NumColorOpts]&advance=1] > NISColor[index]=[interpret][NISColor[index]][/interpret] NAME=NISColor[index] value=[interpret][NISColor[index]][/interpret]>
> [/loop] > >

> > [Search db=NIS-[SKU].db&necolordatarq=nadaamigo][FoundItems][text > show=T]Findex=[index][/text] > [/loop] > > [/FoundItems][/Search] >
[ListFields NIS-[SKU].db][FieldName][/ListFields]
[NumSizes][NumColors][color]< /TD>[loop > start=1&end=[NumSizeOpts]&advance=1][text show=T]Lindex=[index][/text] > Stock= >
> >
> > > > > -----------------------[/FGA-ProductNIS-2.tmpl]----------------------- > > **************************************************************************** * > > -----------------------[FGA-ProductNIS-3.tmpl]----------------------- > > > > > > > > > [Search db=NIS-[SKU].db&necolordatarq=nadaamigo][FoundItems][text > show=f]Findex=[index][/text] > [Replace db=NIS-[SKU].db&eqcolordatarq=[color]]color=[color][loop > start=1&end=[NumSizeOpts]&advance=1][text > show=f]Lindex=[index][/text]&[interpret][NISSize[Lindex]][/interpret]=[inter pret][x[Lindex]y[Findex]][/interpret][/loop][/Replace] > > [/FoundItems][/Search] > [interpret][COMMITDATABASE NIS-[SKU].db][/interpret] > >

See your newly populated COLOR=#AA1177>NIS-[SKU].db

> >
> > >
> > [Search db=NIS-[SKU].db&necolordatarq=nadaamigo][FoundItems][text > show=T]Findex=[index][/text] > [/loop] > [/FoundItems][/Search] >
[ListFields NIS-[SKU].db][FieldName][/ListFields]
[NumSizes][NumColors][color]< /TD>[loop > start=1&end=[NumSizeOpts]&advance=1][text show=T]Lindex=[index][/text] > Stock= db=NIS-[SKU].db&lookInField=color&value=[interpret][NISColor[Findex]][/inter pret]&returnField=[interpret][NISSize[Lindex]][/interpret]¬Found=rats][/i nterpret] > SIZE=5>
> >
> > > > > -----------------------[/FGA-ProductNIS-3.tmpl]----------------------- > > **************************************************************************** * > > > ------------------------------------------------------------- > 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: remotely creating and populating a stock inventory db - almost there! (Derrick Puckett 1999)
  2. INVENTORY:Re: remotely creating and populating a stock inventory db - almost there! (Jym Duane 1999)
  3. Re: remotely creating and populating a stock inventory db - almost there! (Jym Duane 1999)
  4. Re: remotely creating and populating a stock inventory db - almost there! (Brian Boegershausen 1999)
  5. Re: remotely creating and populating a stock inventory db - almost there! (John Butler 1999)
  6. remotely creating and populating a stock inventory db - almost there! (John Butler 1999)
Just a few questions:Why are you creating a database for every sku? Dont you think you may accumulate to many databases to keep track of? Why not just uses 1 database? I thought [writefile] did not understand databases? could this be causing some of your problems, I looked over the code real quick and didn't analyze the entire thing. That was just one of my thoughts which could be causing you problems in the long run, but if I am wrong, I congratulate you on getting it to work. As we all know, everything written or not written in the manual isn't always true.Brian Boegershausen WebCatalog Programmer www.collegefever.com ----- Original Message ----- From: John Butler To: WebCatalog Talk Sent: Thursday, November 18, 1999 12:02 PM Subject: remotely creating and populating a stock inventory db - almost there! > Good day :-) > > ***** I need help from you serious webcat programmers out there.. ****** > > This is a bit long but some may find some useful code they want :-) > > My site sells items that come in different sizes and colors and I want to offer all > those different sizes and colors using only one SKU per item. I am nearly successful > > in creating an additional feature of my site's admin area which will allow the admin > person to create (via browser) and view a db (which is relational to the main > products.db) > that stores a SKU's number in stock (NIS) for each size/color variation of that > SKU. (Note that there is no limit to the number of fields one can create as with the > recent omnibase app.) > > I just need help with that last section below (FGA-ProductNIS-3.tmpl), but I'll > post the code for the preceding pages as well so you see where I am going and so people > can > have the code if they want. These pages work great to create the db properly, and in > > populating it (the [replace] in FGA-ProductNIS-3.tmpl), but in viewing the > final db (the in FGA-ProductNIS-3.tmpl), the rows of values shown in the > table do not match with the records in the db. Sooo close... I just need this last > 'viewing of > the db' working because I want the user to be able to resubmit to repopulate all the > fields in all the > records if needed. > > Any help would be GREATLY appreciated. > > try it out!! > > (In all pages, only the relevant code is included.) > > -----------------------[FGA-ProductCatalog.tmpl]----------------------- > > > > > > > > > [Search db=FG-products.db&neSKUdata=NadaAmingo&max=100] > [founditems] > setup > [/foundItems] > [/Search] > > > > -----------------------[/FGA-ProductCatalog.tmpl]----------------------- > > **************************************************************************** * > > -----------------------[FGA-ProductNIS-0.tmpl]----------------------- > > > > > > > > >

Choose how many fields and records for NumInStock database for Product# > [SKU]

> > > > > > Product# [SKU] should have how many size options? > >

> Product# [SKU] should have how many color options? > > > > > > > > > -----------------------[/FGA-ProductNIS-0.tmpl]----------------------- > > **************************************************************************** * > > -----------------------[FGA-ProductNIS-1.tmpl]----------------------- > > > > > > > > >

Choose size options and color options for the upcoming NIS-[SKU].db for > Product# [SKU]

> > > > > >

Give the Sizes Please:

> [loop start=1&end=[NumSizeOpts]&advance=1] > [SKU] ---NIS Size Option#[index]=
> [/loop] >

>

Give the Colors Please:

> [loop start=1&end=[NumColorOpts]&advance=1] > [SKU] ---NIS Color Option#[index]=
> [/loop] > > > > > > -----------------------[/FGA-ProductNIS-1.tmpl]----------------------- > > **************************************************************************** * > > -----------------------[FGA-ProductNIS-2.tmpl]----------------------- > > > > > > > > > > [WriteFile NIS-[SKU].db]NumSizes NumColors color[loop start=1&end=[NumSizeOpts]&advance=1] > [interpret][NISSize[index]][/interpret][/loop] > [/WriteFile] > [loop start=1&end=[interpret][NumColorOpts][/interpret]&advance=1][Append > db=NIS-[SKU].db]NumSizes=[NumSizeOpts]&NumColors=[NumColorOpts]&color=[inter pret][NISColor[index]][/interpret][/Append][/loop] > > [interpret][closedatabase NIS-[SKU].db][/interpret] > >

Please enter values for NIS (Number In Stock) for each size/color variation > for db- NIS-[SKU].db

> > > > > > > [loop start=1&end=[NumSizeOpts]&advance=1] > NISSize[index]=[interpret][NISSize[index]][/interpret] NAME=NISSize[index] value=[interpret][NISSize[index]][/interpret]>
> [/loop] >

> [loop start=1&end=[NumColorOpts]&advance=1] > NISColor[index]=[interpret][NISColor[index]][/interpret] NAME=NISColor[index] value=[interpret][NISColor[index]][/interpret]>
> [/loop] > >

> > [Search db=NIS-[SKU].db&necolordatarq=nadaamigo][founditems][text > show=T]Findex=[index][/text] > [/loop] > > [/FoundItems][/Search] >
[ListFields NIS-[SKU].db][FieldName][/ListFields]
[NumSizes][NumColors][color]< /TD>[loop > start=1&end=[NumSizeOpts]&advance=1][text show=T]Lindex=[index][/text] > Stock= >
> >
> > > > > -----------------------[/FGA-ProductNIS-2.tmpl]----------------------- > > **************************************************************************** * > > -----------------------[FGA-ProductNIS-3.tmpl]----------------------- > > > > > > > > > [Search db=NIS-[SKU].db&necolordatarq=nadaamigo][founditems][text > show=f]Findex=[index][/text] > [Replace db=NIS-[SKU].db&eqcolordatarq=[color]]color=[color][loop > start=1&end=[NumSizeOpts]&advance=1][text > show=f]Lindex=[index][/text]&[interpret][NISSize[Lindex]][/interpret]=[inter pret][x[Lindex]y[Findex]][/interpret][/loop][/Replace] > > [/FoundItems][/Search] > [interpret][COMMITDATABASE NIS-[SKU].db][/interpret] > >

See your newly populated COLOR=#AA1177>NIS-[SKU].db

> >
> > >
> > [Search db=NIS-[SKU].db&necolordatarq=nadaamigo][founditems][text > show=T]Findex=[index][/text] > [/loop] > [/FoundItems][/Search] >
[ListFields NIS-[SKU].db][FieldName][/ListFields]
[NumSizes][NumColors][color]< /TD>[loop > start=1&end=[NumSizeOpts]&advance=1][text show=T]Lindex=[index][/text] > Stock=[interpret][lookup > db=NIS-[SKU].db&lookInField=color&value=[interpret][NISColor[Findex]][/inter pret]&returnField=[interpret][NISSize[Lindex]][/interpret]¬Found=rats][/i nterpret] > SIZE=5>
> >
> > > > > -----------------------[/FGA-ProductNIS-3.tmpl]----------------------- > > **************************************************************************** * > > > ------------------------------------------------------------- > 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 Brian Boegershausen

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:

Monthly Reports (2000) New public beta available (1997) [WebDNA] WebDNA & VPS (2009) WebCat2final1 crashes (1997) Cart contains # (2000) Deleting Cookie Problems (2007) Sample Email Catalog Order? (1998) Re[2]: Balancing randomness (2000) RE: Credit Card Checksum (1997) Storebuilder Seems to have just died (2003) [WebDNA] Use of MySQL with WebDNA (2010) [defined]ish (1997) WebDNA vs PHP (2003) Multiple Newcarts (1996) Loosing Quantity (2000) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) WCS Newbie question (1997) Re:PCS Customer submissions ? (1997) [ShowIf] and empty fields (1997) Date sorting (1997)