Re: Changing price for a SLU based on options (size, etc.)
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13446
interpreted = N
texte = <<>I've tried to hack the formula.db to put up a different price if it>finds that the SKU is a match and the size is Double Xtra Large.>>No Joy. Does anyone have an example formula.db or advise. I've>considered creating seperate SKU's for each price, but would like to>avoid that solution as it seems a kludge.It is NOT a kludge, it is the proper way to do things. Go into anyretail store and look at any two items that are identical except forsize or color and you will clearly see two different SKU's.Size and color are defining factors that make items different, so youshould have a different SKU for every item that has a different sizeor color from another item ...>>While it is true that by the time the order is complete, a unique SKU thatincludes color and other options has to be made, making separate e-storelistings for each option may not be the natural way for a shopper to shop.We've made our inventory.db related to an option.db (actually option1.db,option2.db and option3.db since there are up to three options for someinventory items). The option.db displays as radio buttons from whichshoppers choose their options. We then append codes onto the end of theSKU that reflect the options chosen by the shopper. The price formula looks like:price [math][lookupdb=inventory.db&lookInField=unique&value=[unique]&returnField=standardcost][hideif [textA]=none]+[Lookupdb=option1.db&lookInField=optkey1&value=[textA]&returnField=pdelta1][/hideif][hideif [textB]=none]+[Lookupdb=option2.db&lookInField=optkey2&value=[textB]&returnField=pdelta2][/hideif][hideif [textC]=none]+[Lookupdb=option3.db&lookInField=optkey3&value=[textC]&returnField=pdelta3][/hideif][/math]Where TextA,B and C are values selected by the popups. In the case of just shirt sizes having different prices, the structurecould probably be much simpler and having [showif]s if size = XL, or XXLthen adding the price difference.Regards,Sandy
Associated Messages, from the most recent to the oldest:
<<>I've tried to hack the formula.db to put up a different price if it>finds that the SKU is a match and the size is Double Xtra Large.>>No Joy. Does anyone have an example formula.db or advise. I've>considered creating seperate SKU's for each price, but would like to>avoid that solution as it seems a kludge.It is NOT a kludge, it is the proper way to do things. Go into anyretail store and look at any two items that are identical except forsize or color and you will clearly see two different SKU's.Size and color are defining factors that make items different, so youshould have a different SKU for every item that has a different sizeor color from another item ...>>While it is true that by the time the order is complete, a unique SKU thatincludes color and other options has to be made, making separate e-storelistings for each option may not be the natural way for a shopper to shop.We've made our inventory.db related to an option.db (actually option1.db,option2.db and option3.db since there are up to three options for someinventory items). The option.db displays as radio buttons from whichshoppers choose their options. We then append codes onto the end of theSKU that reflect the options chosen by the shopper. The price formula looks like:price
[math][lookupdb=inventory.db&lookInField=unique&value=[unique]&returnField=standardcost][hideif [textA]=none]+[Lookupdb=option1.db&lookInField=optkey1&value=[textA]&returnField=pdelta1][/hideif][hideif [textB]=none]+[Lookupdb=option2.db&lookInField=optkey2&value=[textB]&returnField=pdelta2][/hideif][hideif [textC]=none]+[Lookupdb=option3.db&lookInField=optkey3&value=[textC]&returnField=pdelta3][/hideif][/math]Where TextA,B and C are values selected by the popups. In the case of just shirt sizes having different prices, the structurecould probably be much simpler and having
[showif]s if size = XL, or XXLthen adding the price difference.Regards,Sandy
Sandra L. Pitner <76501.3521@CompuServe.COM>
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:
WebDNA Docs (2003)
Weird error/limit - something amiss? (1997)
I can help! (1996)
WebDNA 4.5 on CentOS (2006)
Frames and WebCat (1997)
New Guestbook Source (1997)
New commands in Final candidate (1997)
X etc.... (1999)
Showing unopened cart (1997)
nesting limits? (1998)
Electronic delivery (2006)
setlineitem quantity to zero? (2000)
Custom error files (1998)
suffix mapping for NT? (1997)
Requiring that certain fields be completed (1997)
Purchased cart being overwritten - still !?? (1997)
what the... (2004)
Integration with SQL (1997)
Date comparison has serious bug ... (1998)
OPEN MARKET PATENTS SOUND ECOMMERCE ALARM (1998)