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:
Major Security Hole (1998)
Displaying photo attached to first record (1997)
Empty Shopping Carts? (1998)
Include a big block of text (1997)
processing .html pages (2001)
Weird problems with [SHOWIF]s (1997)
RequiredFields template (1997)
TPC Connect (1999)
RequiredFields template (1997)
Problem with listfields with WC 4.0.2rc2/Webstar 4.4 (2001)
WebCat2: multiple currency support (1997)
verify online (1997)
[carts] and databases (1997)
Conditional searching & displaying (1997)
Ongoing group search problems ... (1997)
What am I missing (1997)
Navigator Parsing (1997)
Large databases in WebCat (1997)
Problem: 3.0 doesn't update carts (1997)
Max Record length restated as maybe bug (1997)