Re: Looking up two prices in database?
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 12595
interpreted = N
texte = >1. I'm actually not sure why I am using the [math] context. I'm really >using two conditional statements to look for the price I want. COMMENT?I don't know why you're doing that either. Unless you plan to multiply or divide something, there's no need for math.>2. The [showif] context defines the first condition. Check to see if the >onsale field has a value of T. If it does, THEN show the value of the >saleprice field as instructed by the [saleprice] tag.Sounds good, although [saleprice] may not be valid in that context.>3. If the condition is met, I would expect the formula to show the sale >price in the cell where I have any [price] tag.Yes, it overrides the [price] *only* when adding a new product to the cart.>If it isn't met, I would expect the lookup to be performed and the >regular price to be displayed wherever there is a [price] tag.Yes.>That brings up the next question, which is, does WebCatalog move to the >[lookup] or does it stop after the [showif]?No, it doesn't stop, so your lookup will actually shove some more numbers after the [saleprice]. You need to wrap that portion with a hideif so that only one is shown at a time.Let's try simplifying this and just put in a simple lookup for the [saleprice], with no showifs. Just to see if the saleprice gets put into the cart from your formula, instead of the normal price. Then start getting fancy with show/hide.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:
>1. I'm actually not sure why I am using the
[math] context. I'm really >using two conditional statements to look for the price I want. COMMENT?I don't know why you're doing that either. Unless you plan to multiply or divide something, there's no need for math.>2. The
[showif] context defines the first condition. Check to see if the >onsale field has a value of T. If it does, THEN show the value of the >saleprice field as instructed by the [saleprice] tag.Sounds good, although [saleprice] may not be valid in that context.>3. If the condition is met, I would expect the formula to show the sale >price in the cell where I have any [price] tag.Yes, it overrides the [price] *only* when adding a new product to the cart.>If it isn't met, I would expect the lookup to be performed and the >regular price to be displayed wherever there is a [price] tag.Yes.>That brings up the next question, which is, does WebCatalog move to the >
[lookup] or does it stop after the
[showif]?No, it doesn't stop, so your lookup will actually shove some more numbers after the [saleprice]. You need to wrap that portion with a hideif so that only one is shown at a time.Let's try simplifying this and just put in a simple lookup for the [saleprice], with no showifs. Just to see if the saleprice gets put into the cart from your formula, instead of the normal price. Then start getting fancy with show/hide.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:
test (2000)
[format 40s]text[/format] doesn't work (1997)
Yet another db manager (2004)
AuthorizeNet & StoreBuilder (2002)
HideIf ip= OR ip (1998)
[OT] Display Glitch (2004)
WebCat virtual postcard is done! Thanks for the help! (1998)
Width & Height (1998)
[WebDNA] Informations (2012)
[WebDNA] Some code inside a large loops fail ... but why? (2010)
emailer (1997)
How can I Add several Items into the cart at once? (1997)
More help for discount pricing (1998)
[WebDNA] High-profile WebDNA sites? (2008)
How does WebCatalog search the database? (1997)
tricky embedded[showifs/hideifs] (w/ code.. long) (2000)
[WebDNA] 6.2 Sorry WebDNA server not running (2015)
WebDNA 4.5 OSX/OS9 in exchange of WebDNA 4.5 Win (2004)
Execute Applescript (1997)
random in arizona (2003)