Re: Display [price] in banner ad

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19786
interpreted = N
texte = > >Thanks, this does work and displays the price. However, I also have a > >markup of > >the price and the markup works fine in the details.tpl but not with the > >banner ad > >and I can't seem to figure out what I need to change to get it to work. > > The reason is that just putting [price] into your banner ad is not enough > for WebCatalog to know what the price should be. It needs to know what > database to look in, what sku to look for, etc. That's why you use the > [lookup] to find the price. So from a simplistic standpoint, if you > substitute that big [lookup] everywhere you need [price] in your big math > equation, then you'd get the right information. > > There is a way to simplify this with an [include], though, so you don't > have to do so much typing: > > -- MarkupCalc.inc -- > (put that big bunch of [ShowIf] with [math] text here) > > Then anywhere you need the marked-up price (even on your details.tpl page), use > [include file=MarkupPrice.inc&price=[Lookup > db=catalog.txt&lookinfield=sku&value=[sku]&returnfield=price]] > > You're basically making a 'macro' that takes a SKU and looks up its > marked-up price atuomatically.Ok, sounds simple enough. But I get an error that says, On Special for only $Error: template ' file=MarkupCalc.inc&price=363.19' not found Here is the code I have in the banner ad:
On Special for only $[include file=MarkupCalc.inc&price=[lookup db=catalog.txt&lookinfield=sku&value=455303&returnfield=price]]
I made a MarkupCalc.inc file and pasted all the big bunch of [ShowIf] with [math] stuff in it.Am I missing something????????Thanks ! Mark B. Associated Messages, from the most recent to the oldest:

    
  1. Re: Display [price] in banner ad (PCS Technical Support 1998)
  2. Re: Display [price] in banner ad (Mark Bergkvist 1998)
  3. Re: Display [price] in banner ad (PCS Technical Support 1998)
  4. Re: Display [price] in banner ad (Mark Bergkvist 1998)
  5. Re: Display [price] in banner ad (PCS Technical Support 1998)
  6. Re: Display [price] in banner ad (Mark Bergkvist 1998)
  7. Re: Display [price] in banner ad (Kenneth Grome 1998)
  8. Display [price] in banner ad (Mark Bergkvist 1998)
> >Thanks, this does work and displays the price. However, I also have a > >markup of > >the price and the markup works fine in the details.tpl but not with the > >banner ad > >and I can't seem to figure out what I need to change to get it to work. > > The reason is that just putting [price] into your banner ad is not enough > for WebCatalog to know what the price should be. It needs to know what > database to look in, what sku to look for, etc. That's why you use the > [lookup] to find the price. So from a simplistic standpoint, if you > substitute that big [lookup] everywhere you need [price] in your big math > equation, then you'd get the right information. > > There is a way to simplify this with an [include], though, so you don't > have to do so much typing: > > -- MarkupCalc.inc -- > (put that big bunch of [showif] with [math] text here) > > Then anywhere you need the marked-up price (even on your details.tpl page), use > [include file=MarkupPrice.inc&price=[Lookup > db=catalog.txt&lookinfield=sku&value=[sku]&returnfield=price]] > > You're basically making a 'macro' that takes a SKU and looks up its > marked-up price atuomatically.Ok, sounds simple enough. But I get an error that says, On Special for only $Error: template ' file=MarkupCalc.inc&price=363.19' not found Here is the code I have in the banner ad:
On Special for only $[include file=MarkupCalc.inc&price=[lookup db=catalog.txt&lookinfield=sku&value=455303&returnfield=price]]
I made a MarkupCalc.inc file and pasted all the big bunch of [showif] with [math] stuff in it.Am I missing something????????Thanks ! Mark B. Mark Bergkvist

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:

WebCatalog f2 Installation (1997) PIXO with cometsite ... and/or other plugins (1998) WebCat2_Mac RETURNs in .db (1997) SMSI (Scott) clues?? Bug fixes for next WebDNA release (2005) Almost a there but..bye bye NetCloak (1997) Running 2 two WebCatalog.acgi's (1996) textarea inputs and returns (1999) WebCatalog for guestbook ? (1997) Running _every_ page through WebCat ? (1997) [ShowCart] and GET vs. POST (1997) select multiple (1997) authenticate broken when url not fully specified? (2000) WC2.0 Memory Requirements (1997) Sister-in-Law-Pimps beware... (2003) A Trigger Question (2000) Bug? (1997) selectively replacing records within a [founditems] (2000) [sendmail] on NT? (1997) [search] and [shownext] Problem (2000) RED QUESTION MARK (1999)