Re: formula.db problems

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23479
interpreted = N
texte = >On the previous page (shoppingcart.tpl) I have: > >This way I can show the shopper how much the shipping will be before they >actually >enter in their CC information. >Then on the invoice.tpl page where the formula.db is invoked I have: > >[SetHeader >cart=[cart]]&shipVia=[url][__shipVia][/url]&ShipToZip=[__ShipToZip]&CartIPAddre >ss=[ipAddress][/SetHeader]Why are those variables named __ShipToZip instead of simply ShipToZip? I can't tell for sure without your templates, but my guess is that you're hitting this page with either command=ShowCart or command=Add. Either one of those commands automatically will set your header fields (without needing the explicit [SetHeader]) if the name of the form variable is ShipToZip, but not if it's named anything else.If you hit this page with command=Add, then the formula is evaluated *before* the [SetHeader] tag, so it won't know the value of [ShipToZip] yet. I suppose you could use [__ShipToZip] in your formulas instead, but it's really better to use the 'natural' header field names that the cart natively knows about already.Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: formula.db problems (PCS Technical Support 1999)
  2. Re: formula.db problems (es-sleestak 1999)
  3. RE:formula.db problems (PCS Technical Support 1999)
  4. RE:formula.db problems (es-sleestak 1999)
>On the previous page (shoppingcart.tpl) I have: > >This way I can show the shopper how much the shipping will be before they >actually >enter in their CC information. >Then on the invoice.tpl page where the formula.db is invoked I have: > >[SetHeader >cart=[cart]]&shipVia=[url][__shipVia][/url]&ShipToZip=[__ShipToZip]&CartIPAddre >ss=[ipaddress][/SetHeader]Why are those variables named __ShipToZip instead of simply ShipToZip? I can't tell for sure without your templates, but my guess is that you're hitting this page with either command=ShowCart or command=Add. Either one of those commands automatically will set your header fields (without needing the explicit [setheader]) if the name of the form variable is ShipToZip, but not if it's named anything else.If you hit this page with command=Add, then the formula is evaluated *before* the [setheader] tag, so it won't know the value of [ShipToZip] yet. I suppose you could use [__ShipToZip] in your formulas instead, but it's really better to use the 'natural' header field names that the cart natively knows about already.Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ PCS Technical Support

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:

Practice runs ? (1997) WebCatalog for guestbook ? (1997) (2000) Webcatalog and foreign languages (1998) Changing buttons (1999) Problems getting parameters passed into email. (1997) WebCat2 - many [carts] on one template page? (1997) virtual virtual hosted store.... (1998) Re1000001: Setting up shop (1997) [WebDNA] WebDNA 8.6 announced - New features (2018) Upgrade Pricing? (2003) Multiple fields on 1 input (1997) [TaxableTotal] - not working with AOL and IE (1997) Mult-File Upload w/ Web Star (2000) FYI: virus alert (1996) [Webcat 2]Next (1997) Sort Order on a page search (1997) [WebDNA] paypal (2009) WebCat2b12plugin - [search] is broken ... not! (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997)