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:
[OT] "ID" in the URL scares Googlebot? (2003)
remove line item (2000)
WebCat2.0 acgi vs plugin (1997)
OT: Collaborative Browsing (2000)
The IBC root beer has arrived! (1997)
[OT] Industry news from Australia (2000)
Bulk Email >>>>Any ideas? (2001)
remotely add + sign (1997)
Just Testing (1997)
WC2.0 Memory Requirements (1997)
Search: Is this possible? (2005)
Questions (1998)
Help with update to 2.11 (1998)
WC2b15 File Corruption (1997)
WebCat2 several catalogs? (1997)
How To question on setting up downloads (1997)
Am I going senile? (Price recalc based on quantity) (1997)
[WebDNA] Stupid question about CentOS v4 and WebDNA v6 (2008)
Nested Loops and SHOWIFs (1997)
Web Catalog 2 demo (1997)