Re: A question on sub-categories
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 11589
interpreted = N
texte = >If you have a product in some type of category. That product has 2 types, >colour & size, each of which can create an individual item. So, instead >of displaying say 30 products in the standard format, it would display >the product including description, then the differnet combinations of >colour and size as line items.One way is to create 2 databases that have a field in common, such as SKU. This is called a relational database because the 2 are related by the common field text. You can then nest searches so that you loop through all the subcategory information for each 'major' item.---- Major.db ----SKU Description Price123 Tennis Shoes 55.00401 Blue Jeans 65.00---- Minor.db ----SKU Color Size123 Red 12123 Red 11123 Blue 12123 Blue 9401 Stone 34401 Relaxed 34401 Relaxed 36So to see it all listed by major product:[search db=Major.db&neSKUdata=0] [FoundItems] [Description], $[Price]
[search db=Minor.db&eqSKUdata=[SKU]] [FoundItems] [Color], [Size]
[/FoundItems] [/search] [/FoundItems][/search]Notice the interior search looks for a different SKU each time based on the value of the outer search's current value of SKU. This nesting causes the interior search to be performed once per major SKU. The output looks like this:Tennis Shoes, $55.00 Red 12 Red 11 Blue 12 Blue 9Blue Jeans, $65.00 Stone 34 Relaxed 34 Relaxed 36Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors =====Pacific Coast Software | WebCatalog Pro, WebCommerce Solution11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
>If you have a product in some type of category. That product has 2 types, >colour & size, each of which can create an individual item. So, instead >of displaying say 30 products in the standard format, it would display >the product including description, then the differnet combinations of >colour and size as line items.One way is to create 2 databases that have a field in common, such as SKU. This is called a relational database because the 2 are related by the common field text. You can then nest searches so that you loop through all the subcategory information for each 'major' item.---- Major.db ----SKU Description Price123 Tennis Shoes 55.00401 Blue Jeans 65.00---- Minor.db ----SKU Color Size123 Red 12123 Red 11123 Blue 12123 Blue 9401 Stone 34401 Relaxed 34401 Relaxed 36So to see it all listed by major product:[search db=Major.db&neSKUdata=0]
[founditems] [Description], $[Price]
[search db=Minor.db&eqSKUdata=[SKU]]
[founditems] [Color], [Size]
[/FoundItems] [/search] [/FoundItems][/search]Notice the interior search looks for a different SKU each time based on the value of the outer search's current value of SKU. This nesting causes the interior search to be performed once per major SKU. The output looks like this:Tennis Shoes, $55.00 Red 12 Red 11 Blue 12 Blue 9Blue Jeans, $65.00 Stone 34 Relaxed 34 Relaxed 36Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors =====Pacific Coast Software | WebCatalog Pro, WebCommerce Solution11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Grant Hulbert
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: Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997)
RE: WebCat: Access denied, but why? (1997)
WC1.6 to WC2 date formatting -FIXED! (1997)
Jimmy Houssen (1998)
Close-to Comparison Code (1998)
[url] link (1998)
RE: [WebDNA] .htm files (2008)
WebCat.acgi from /cgi-bin/? (1997)
Using Plug-In while running 1.6.1 (1997)
Re:quit command on NT (1997)
It finally happened ... (2003)
emailer w/F2 (1997)
emailer (1997)
reserved characters for field names? (1998)
WebCatalog can't find database (1997)
WebCat Beta NT 18 (1997)
Resume Catalog ? (1997)
[math] are you there? (1999)
addlineitem mystery (2003)
No Subject (1998)