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:
Cancel Subscription (1996)
cookie based login process (2004)
[WebDNA] Installing 7.1.702 on CentOS (2012)
Search as error page (2002)
Suddenly can't see files... (2000)
Sku numbers (1997)
[WebDNA] test (2010)
Under Score (1999)
Sending order notification by fax (1999)
show all problem (1997)
Resume Catalog ? (1997)
Help needed! (SIMS recommendation) (1998)
Date search - yes or no (1997)
[WebDNA] Ubuntu 14.04 & WebDNA (2017)
WebCat2b13MacPlugIn - more [date] problems (1997)
WCS Newbie question (1997)
WebCatalog for guestbook ? (1997)
Serial Number Question (1997)
select multiple (1997)
thankyou.tmpl (1997)