Cart creation techniques (was Re: Problems with Price field)

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 15360
interpreted = N
texte = >Next question... > >Shouldn't this create a new cart? > >store/Results.tmpl$search?db=PC.db&woCategorydatarq=Electrical&rank=off&searchT >i >tle=Electrical&max=10&cart=[cart] > >It creates one called [cart].That's because there's no existing [cart] value on the page your hyperlink is on, and that's why, when you put 'cart=[cart]' into your hyperlink, WebCat sets the [cart] value on the next page equal to [cart], literally -- because that's exactly what you're telling it to do.Unless there's already a [cart] value on your page with the hyperlink, there's no reason to put the 'cart=[cart]' parameter into that link. The 'cart=[cart]' parameter is used only for PASSING the existing [cart] value to the next page, not for creating a new [cart] values ... :) Valuable Tip:An excellent method for seeing what form variable values are set on each of your WebDNA pages is to use the [formvariables] context as described in the HTML docs. I use it on every page I create while I'm still in the 'creation and testing' process, because it saves me lots of time trying to figure out what values WebCat thinks are on each page.In other words, USE IT! Your life will get a LOT easier if you do ... :)Sincerely, Ken Grome WebDNA Solutions http://www.smithmicro.com/webdnasolutions/... Associated Messages, from the most recent to the oldest:

    
>Next question... > >Shouldn't this create a new cart? > >store/Results.tmpl$search?db=PC.db&woCategorydatarq=Electrical&rank=off&searchT >i >tle=Electrical&max=10&cart=[cart] > >It creates one called [cart].That's because there's no existing [cart] value on the page your hyperlink is on, and that's why, when you put 'cart=[cart]' into your hyperlink, WebCat sets the [cart] value on the next page equal to [cart], literally -- because that's exactly what you're telling it to do.Unless there's already a [cart] value on your page with the hyperlink, there's no reason to put the 'cart=[cart]' parameter into that link. The 'cart=[cart]' parameter is used only for PASSING the existing [cart] value to the next page, not for creating a new [cart] values ... :) Valuable Tip:An excellent method for seeing what form variable values are set on each of your WebDNA pages is to use the [formvariables] context as described in the HTML docs. I use it on every page I create while I'm still in the 'creation and testing' process, because it saves me lots of time trying to figure out what values WebCat thinks are on each page.In other words, USE IT! Your life will get a LOT easier if you do ... :)Sincerely, Ken Grome WebDNA Solutions http://www.smithmicro.com/webdnasolutions/... Kenneth Grome

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:

Server crashes and triggers . . . are they linked? (2001) [WebDNA] math variables bug in OSX 7.0 / 7.1 (2012) Personal Web Server combined with Webcatalog 2.1 (1998) WebCatalog can't find database (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) F*** you (1998) PROTECT PAGES (2002) Where is f2? (1997) WebCat2b15MacPlugin - [protect] (1997) WebCat and WebTen 2.0 (1997) when is date system date or order date? (1997) label?! (2005) Attn: Bug in GeneralStore example b15 (1997) Adding Items to Cart (2003) Paths relative to root not working (2000) WebCat2 - Getting to the browser's username/password data (1997) Virtual hosting and webcatNT (1997) Resume Catalog ? (1997) WCS Newbie question (1997) Item in Cart 2 times - Any code? (2000)