Re: Some Advise needed
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 12486
interpreted = N
texte = >I am working on a project that has some products that will need to either>have seperate prices depending on what size of the product is purchased or>maybe a base + additional charge would work.>>For example you have a bottle of gear lube that comes in 4 oz., 8 oz. and>12 oz. sizes, with prices of $4.00, $7.00 and $10.00.The simplest approach (but maybe not the prettiest) is to pretend like all those variations are different products in your database. So when people search for lube, they see 3 different SKUs, 3 different prices, and 3 different descriptions.But if you truly want to make them look like 'variations' of a single product, you can do some more work like the following:Assuming that not all products will have exactly 3 variations, your best bet is to use a related database that contains the variations, using a sku that is similar so you can find the variations easily. For simplicity, you could use the related database even for products that have no variations, just to keep the WebDNA consistent.You'll also need to make a special formula for price, so WebCatalog can figure out which alternate price product you're referring to in the cart.-- catalog.db --SKU Title TaxableLube Gear Lube TWax Seat Wax T-- Variations.db --SKU SubType Description PriceLube 1 4 oz. 4.00Lube 2 8 oz. 7.00Lube 3 12 oz. 10.00Wax 1 Vanilla 9.00Wax 2 Cinnamon 9.00So you would do all your searches in the main catalog.db, and for each found item you would do a search thru the Variations.db to find the prices and descriptions.[FoundItems] [SKU], [Title] <-- Main product shows here [search db=Variations.db&eqSKUdata=[SKU]] [FoundItems] [SubType], [Description], [Price] <-- list variations here
Add [/FoundItems] [/search][/FoundItems]For pricing, you would have to search for the SKU+SubType in the variations database to get the correct price for that particular product.-- Formulas.db --price [search db=Variations.db&eqSKUdatarq=[sku]&eqSubTypedatarq=[SubType]][FoundItems][price][/FoundItems][/search]I have not tested this (it comes off the top of my head), but it's the general idea.Grant 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:
>I am working on a project that has some products that will need to either>have seperate prices depending on what size of the product is purchased or>maybe a base + additional charge would work.>>For example you have a bottle of gear lube that comes in 4 oz., 8 oz. and>12 oz. sizes, with prices of $4.00, $7.00 and $10.00.The simplest approach (but maybe not the prettiest) is to pretend like all those variations are different products in your database. So when people search for lube, they see 3 different SKUs, 3 different prices, and 3 different descriptions.But if you truly want to make them look like 'variations' of a single product, you can do some more work like the following:Assuming that not all products will have exactly 3 variations, your best bet is to use a related database that contains the variations, using a sku that is similar so you can find the variations easily. For simplicity, you could use the related database even for products that have no variations, just to keep the WebDNA consistent.You'll also need to make a special formula for price, so WebCatalog can figure out which alternate price product you're referring to in the cart.-- catalog.db --SKU Title TaxableLube Gear Lube TWax Seat Wax T-- Variations.db --SKU SubType Description PriceLube 1 4 oz. 4.00Lube 2 8 oz. 7.00Lube 3 12 oz. 10.00Wax 1 Vanilla 9.00Wax 2 Cinnamon 9.00So you would do all your searches in the main catalog.db, and for each found item you would do a search thru the Variations.db to find the prices and descriptions.
[founditems] [SKU], [Title] <-- Main product shows here [search db=Variations.db&eqSKUdata=[SKU]]
[founditems] [SubType], [Description], [Price] <-- list variations here
Add [/FoundItems] [/search][/FoundItems]For pricing, you would have to search for the SKU+SubType in the variations database to get the correct price for that particular product.--
formulas.db --price [search db=Variations.db&eqSKUdatarq=[sku]&eqSubTypedatarq=[SubType]]
[founditems][price][/FoundItems][/search]I have not tested this (it comes off the top of my head), but it's the general idea.Grant 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:
Separate SSL Server (1997)
[WebDNA] Emerging from the Shell (was: unique words) (2009)
EmailCompleted Clean Up (2001)
No Wanna Duppys (1998)
Tracking inbound links for discounts (1997)
no serial? (1998)
GD Spam (2003)
Missing Cart Information (2003)
another problem (1997)
Setting up WebCatalog with Retail Pro data (1996)
Nested tags count question (1997)
WebCat cannot handle compatible search parameters? (1997)
WC1.6 to WC2 date formatting (1997)
To Err or Not Custom Error (1999)
The Top Ten (2002)
attachment (2000)
Date Range search (1997)
Country & Ship-to address & other fields ? (1997)
Change [cart] date (2002)
How to get shownext to just shownext once (1997)