Re: 2.0Beta Command Ref (can't find this instruction)

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10487
interpreted = N
texte = >Is pvprice a field in your database? If not, then no amount of pvprice=xx >will be able to replace a field that doesn't exist.yes pvprice is a field for a group of products not used in a [cart], just some data base stuff >The syntax for replace with a database that has a price field is >[replace db=product.db&eqskudata=[sku]]price=[math][price]*.95[/math][/replace] > >Notice there is no = after replace, and there is no & at the >beginning of the interior of the replace context.Error in my 1st message, should have been [replace db=, not [replace= >Also [math][pvprice]=[pvprice]*.95[/math] doesn't make sense; remember >that anything with [] around it gets substituted with its real value >_first_, so the line above would read > >[math]6.45=6.45*.95[/math], which is not possible.Was not thinking correctly, used your grandtotal solution of a couple of days ago. And that was adding not multipling. Deserve a swift kick in the rear on that one. Been awhile since I have written in code. >These are just little syntax problems, but they make the whole thing not work.Believe it or not I got it to work with the & after ]][replace db=product.db&eqskudata=[sku]]& (worked)or[replace db=product.db&eqskudata=[sku]](no & worked also) What I did to make it work which was puzzling was[search blah blah [founditems] [replace blah blah [/founditmes]It took the [founditems] to make it work. But using the sample templates from classified ads as a model. The validator.tmpl has the [replace blah blah] with no [founditems] in site. Operating under the impression that [founditems] was only needed if I wanted to display the results not change in background.>So, why are you doing this temporariy price thing? Is it to give certain >persons a discount while they're at your site? If so there are much >better ways to do that, and they don't require modifications to your >database. This is a pure data base look up via a browser for people on our intranet to quote pricing over the phone. During the Month of May we go to a major trade show and announce a 60 day special on a certain product group. So instead of messing with our AIX business apps, it seemed easy to quick do a fast recalculation against a products data base from a dos write from the aix box and let the sales department quote pricing based on this 60 day special. Then a dealer gets 40% off and a distributor gets 40/25% off. All from the reduced list price. This has nothing to do with [carts] and online ordering.Simple terms everyone can understand, if we had blue, red, green and white products. We just wanted to change all the records in the field pvprice for all red products to reflect a 5% discount from list price for 60 days.=============================================== Gary Richter, President PanaVise Products, Inc. 7540 Colbert Dr. Reno, Nevada 89511 Ph: 702.850.2900 Fx: 702.850.2929 Email: grichter@panavise.com http://www.panavise.com =============================================== ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: 2.0Beta Command Ref (can't find this instruction) (Grant Hulbert 1997)
  2. Re: 2.0Beta Command Ref (can't find this instruction) (grichter@panavise.com (Gary Richter) 1997)
  3. Re: 2.0Beta Command Ref (can't find this instruction) (Grant Hulbert 1997)
  4. 2.0Beta Command Ref (can't find this instruction) (grichter@panavise.com (Gary Richter) 1997)
>Is pvprice a field in your database? If not, then no amount of pvprice=xx >will be able to replace a field that doesn't exist.yes pvprice is a field for a group of products not used in a [cart], just some data base stuff >The syntax for replace with a database that has a price field is >[replace db=product.db&eqskudata=[sku]]price=[math][price]*.95[/math][/replace] > >Notice there is no = after replace, and there is no & at the >beginning of the interior of the replace context.Error in my 1st message, should have been [replace db=, not [replace= >Also [math][pvprice]=[pvprice]*.95[/math] doesn't make sense; remember >that anything with [] around it gets substituted with its real value >_first_, so the line above would read > >[math]6.45=6.45*.95[/math], which is not possible.Was not thinking correctly, used your grandtotal solution of a couple of days ago. And that was adding not multipling. Deserve a swift kick in the rear on that one. Been awhile since I have written in code. >These are just little syntax problems, but they make the whole thing not work.Believe it or not I got it to work with the & after ]][replace db=product.db&eqskudata=[sku]]& (worked)or[replace db=product.db&eqskudata=[sku]](no & worked also) What I did to make it work which was puzzling was[search blah blah [founditems] [replace blah blah [/founditmes]It took the [founditems] to make it work. But using the sample templates from classified ads as a model. The validator.tmpl has the [replace blah blah] with no [founditems] in site. Operating under the impression that [founditems] was only needed if I wanted to display the results not change in background.>So, why are you doing this temporariy price thing? Is it to give certain >persons a discount while they're at your site? If so there are much >better ways to do that, and they don't require modifications to your >database. This is a pure data base look up via a browser for people on our intranet to quote pricing over the phone. During the Month of May we go to a major trade show and announce a 60 day special on a certain product group. So instead of messing with our AIX business apps, it seemed easy to quick do a fast recalculation against a products data base from a dos write from the aix box and let the sales department quote pricing based on this 60 day special. Then a dealer gets 40% off and a distributor gets 40/25% off. All from the reduced list price. This has nothing to do with [carts] and online ordering.Simple terms everyone can understand, if we had blue, red, green and white products. We just wanted to change all the records in the field pvprice for all red products to reflect a 5% discount from list price for 60 days.=============================================== Gary Richter, President PanaVise Products, Inc. 7540 Colbert Dr. Reno, Nevada 89511 Ph: 702.850.2900 Fx: 702.850.2929 Email: grichter@panavise.com http://www.panavise.com =============================================== ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ grichter@panavise.com (Gary Richter)

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:

Make it Stop - EOM (2006) RE: Multiple Stores and WebCatalog Prefs (1997) [random] only for 1-100??? (1997) [WebDNA] Quick Date Question (2008) HELP WITH DATES (1997) WebCat2b15MacPlugin - showing [math] (1997) Web Catalog 2 demo (1997) f2 download problems (1997) Bug Report, maybe (1997) [url] link (1998) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) unique ascending numbers (2003) Cookies not setting on IE (2002) Imagemagick, webdna, etc (2006) WC2b15 - [HTMLx]...[/HTMLx] problems (1997) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) WebCat 3.04-3.07 plug-in dying on server.... (2000) WebCatalog vs. Cold Fusion (1998) [Sum] function? (1997) Weird Problem (1997)