Re: Looking up two prices in database?

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 12643
interpreted = N
texte = >Yes! I cannot get [saleprice] to substitute within the [showif] context. >Can you only display text or HTML within this context?Right. You have to do a lookup based on sku if you want to get the [saleprice]>Are you saying that WebCatalog looks for a price in the Formulas database >only if one of the cart related commands or contexts is sent. In other >words, it isn't the [price] tag that triggers a look into the Formulas >database but a cart related command for a template taht contains the >[price] tag? That's a pretty key concept!Right. Just doing normal displays of fields from databases won't trigger a use of the formula. So when you're showing stuff in your search results, you need to write some WebDNA to show whatever price is important at that time. Formulas are only executed for things that affect the shopping cart -- and only the item being added at that time. So for instance if you add 5 things to the cart, the formula gets evaluated once per item as it's added. The formula won't affect the price of the 1st item in the cart when you're adding the 5th item: the 1st item is 'fixed' at the time you first add it. It won't change unless you remove it or explicitly touch it with a [SetLineItem] context. Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors ===== Pacific Coast Software | WebCatalog Pro, WebCommerce Solution 11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: Looking up two prices in database? (Grant Hulbert 1997)
  2. Re: Looking up two prices in database? ( 1997)
  3. Re: Looking up two prices in database? (Grant Hulbert 1997)
  4. Re: Looking up two prices in database? ( 1997)
  5. Re: Looking up two prices in database? (Grant Hulbert 1997)
  6. Looking up two prices in database? ( 1997)
>Yes! I cannot get [saleprice] to substitute within the [showif] context. >Can you only display text or HTML within this context?Right. You have to do a lookup based on sku if you want to get the [saleprice]>Are you saying that WebCatalog looks for a price in the Formulas database >only if one of the cart related commands or contexts is sent. In other >words, it isn't the [price] tag that triggers a look into the Formulas >database but a cart related command for a template taht contains the >[price] tag? That's a pretty key concept!Right. Just doing normal displays of fields from databases won't trigger a use of the formula. So when you're showing stuff in your search results, you need to write some WebDNA to show whatever price is important at that time. Formulas are only executed for things that affect the shopping cart -- and only the item being added at that time. So for instance if you add 5 things to the cart, the formula gets evaluated once per item as it's added. The formula won't affect the price of the 1st item in the cart when you're adding the 5th item: the 1st item is 'fixed' at the time you first add it. It won't change unless you remove it or explicitly touch it with a [setlineitem] context. Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors ===== Pacific Coast Software | WebCatalog Pro, WebCommerce Solution 11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMaster San Diego, CA 92128 | SiteGuard 619/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:

Nested tags count question (1997) Emailer (1997) [WebDNA] Authnet temporarily down? (2009) No luck with taxes (1997) Opinion Poll Please (2002) WebDNA Resource Center Resource Center (2004) Country & Ship-to address & other fields ? (1997) Reversed words (1997) Webmerchant + Hubby (1998) Country & Ship-to address & other fields ? (1997) WebDNA Commerce Single for MAC 6.0 (2008) Emailer setup (1997) Which GUI HTML editors work with WC ? (1997) WebMerchant Q (2000) PCS Customer submissions ? (1997) Re:2nd WebCatalog2 Feature Request (1996) WCS Newbie question (1997) Postdata expired from cache (2004) Occasional crashes with $remove (1997) Please please help (2001)