Re: Multiple prices
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 10571
interpreted = N
texte = >Is there an example that shows how to deal with '1 sku Item' having >mutliple prices? I would like my customers to be able to select one of 3 >prices for their selection from both the results and detailed templates. >What say you? We purposely made it a little hard so hackers can't just type any old price they want. It would be nice to simply do $Add?price=[AltPrice2], but then people could just edit the URL and type anything they want.So I recommend you put some extra parameter into your $Add command, and then use the price formula to look up the alternate price.$Add?db=catalog.txt&sku=[sku]&alt=1$Add?db=catalog.txt&sku=[sku]&alt=2$Add?db=catalog.txt&sku=[sku]&alt=3Then in Formulas.db:price [lookup db=catalog.txt&lookInField=sku&value=[sku]&returnField=price[alt]]You would then put a price1 price2 and price3 field into your database, and the [alt] above would convert to 1, 2, or 3 depending on which alternate hyperlink they chose.Grant Hulbert, V.P. Engineering | Tools for WebWarriorsPacific Coast Software | WebCatalog, WebCommerce Solution11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMasterSan Diego, CA 92128 |619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com------------------------------------To leave this talk list send an email to macjordomo@smithmicro.comwith BODYunsubscribe WebDNA-Talk------------------------------------
Associated Messages, from the most recent to the oldest:
>Is there an example that shows how to deal with '1 sku Item' having >mutliple prices? I would like my customers to be able to select one of 3 >prices for their selection from both the results and detailed templates. >What say you? We purposely made it a little hard so hackers can't just type any old price they want. It would be nice to simply do $Add?price=[AltPrice2], but then people could just edit the URL and type anything they want.So I recommend you put some extra parameter into your $Add command, and then use the price formula to look up the alternate price.$Add?db=catalog.txt&sku=[sku]&alt=1$Add?db=catalog.txt&sku=[sku]&alt=2$Add?db=catalog.txt&sku=[sku]&alt=3Then in
formulas.db:price [lookup db=catalog.txt&lookInField=sku&value=[sku]&returnField=price[alt]]You would then put a price1 price2 and price3 field into your database, and the [alt] above would convert to 1, 2, or 3 depending on which alternate hyperlink they chose.Grant Hulbert, V.P. Engineering | Tools for WebWarriorsPacific Coast Software | WebCatalog, WebCommerce Solution11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMasterSan Diego, CA 92128 |619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com------------------------------------To leave this
Talk List send an email to macjordomo@smithmicro.comwith BODYunsubscribe WebDNA-Talk------------------------------------
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:
Forwarding Orders Via Email (1998)
Macs and SQL (2000)
Moment of Thanks (1997)
WebStar Secure on other machine (1997)
Include vs. lookup? (1998)
format and math on the fly (1998)
RE: Missing contexts on NT (1997)
possible, WebCat2.0 and checkboxes-restated (1997)
[Announce]: Web server security and password protection (1997)
WebCatalog for Postcards ? (1997)
HomePage Caution (1997)
searchable list archive (1997)
emailer (1997)
What if SSL server down? MAC (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
carriage returns in data (1997)
form data submission gets truncated (1997)
OK, here goes... (1997)
WC 2.0 frames feature (1997)
Crypted pages on Mac OS X Server (2000)