Re: Referrer field to header field conversion
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 15740
interpreted = N
texte = You are trying to change a field in the header of a cart. WebCatalog's'SmartCart' creates a unique cart before you even realize you need.To set the value of Header30 of a given cart, you need a [setHeader] context:[SetHeader db=your.db&cart=[cart]]header30=[referrer][/setheader] (see how[cart] works?)That string should be used where you have Header30=[url][referrer][url]By the way, [referrer] is already a URL, so doesn't need the [url] conversioncontext. That context replaces URL problem characters, like spaces, into theirURL-acceptable gibberish: %20. I think [convertChars] converts it back tonormal, but I will probably forever confuse these.Good Luck!Pat McCormickBrian B. Burton wrote:> Hello Again!>> A while ago I asked how to take the initial referrer of a visitor to my web> site and put this info in their shopping cart for later reference. I got> some excellent suggestions, but I still can't seem to make it work. The> problem is the visitor comes to an entry page, then clicks the big pretty> graphic to actually enter the site, in the process doing a search, and> generating a cart value. ( I now realise that this isn't required, as you> can do embedded searches (which I do), and generate cart numbers later, but> anyway...) I want to add the Header30=[referrer] tag, something like this...>
href=Search.tmpl$search?Header30=[url][referrer][/url]&cart=[cart]&db=mypro> d.txt&geSKU=0>> This doesn't work, because you apparently can't add info to a cart value> (after all it only exists as a number in a URL)> so then I tried...> > which creates a cart file, doesn't append the referrer into it, and will> cause a problem if anybody uses the back button after shopping for a while> to get back to the search screen!> so then I tried...> href=Search.tmpl$add?Header30=[url][referrer][/url]&cart=[cart]&db=myprod.t> xt&sku=0>> but this was doomed to fail as I have no SKU with a value of 0 and I really> have NO desire to add any line items to the shopping cart file at this time.> (not to mention stupid customer questions that I would invariable hear as a> result of this!)>> So again I am exactly where I started...nowhere.>> What I need is a $create? command to create a shopping cart file so I can> play with the headers without adding any line items. Or is there another> way I am overlooking?>> Brian B. Burton>> P.S. I installed webcatalog 2.01 updater last night, and ever since then my> shopping carts have only lasted 2 hours before being auto deleted. I thought> it was (is) supposed to be 24 Hours?
Associated Messages, from the most recent to the oldest:
You are trying to change a field in the header of a cart. WebCatalog's'SmartCart' creates a unique cart before you even realize you need.To set the value of Header30 of a given cart, you need a
[setheader] context:[SetHeader db=your.db&cart=
[cart]]header30=
[referrer][/setheader] (see how
[cart] works?)That string should be used where you have Header30=
[url][referrer][url]By the way,
[referrer] is already a URL, so doesn't need the
[url] conversioncontext. That context replaces URL problem characters, like spaces, into theirURL-acceptable gibberish: %20. I think
[convertchars] converts it back tonormal, but I will probably forever confuse these.Good Luck!Pat McCormickBrian B. Burton wrote:> Hello Again!>> A while ago I asked how to take the initial referrer of a visitor to my web> site and put this info in their shopping cart for later reference. I got> some excellent suggestions, but I still can't seem to make it work. The> problem is the visitor comes to an entry page, then clicks the big pretty> graphic to actually enter the site, in the process doing a search, and> generating a cart value. ( I now realise that this isn't required, as you> can do embedded searches (which I do), and generate cart numbers later, but> anyway...) I want to add the Header30=
[referrer] tag, something like this...>
href=Search.tmpl$search?Header30=[url][referrer][/url]&cart=
[cart]&db=mypro> d.txt&geSKU=0>> This doesn't work, because you apparently can't add info to a cart value> (after all it only exists as a number in a URL)> so then I tried...>
[url][referrer][/url]&cart=
[cart]>> which creates a cart file, doesn't append the referrer into it, and will> cause a problem if anybody uses the back button after shopping for a while> to get back to the search screen!> so then I tried...>
href=Search.tmpl$add?Header30=[url][referrer][/url]&cart=
[cart]&db=myprod.t> xt&sku=0>> but this was doomed to fail as I have no SKU with a value of 0 and I really> have NO desire to add any line items to the shopping cart file at this time.> (not to mention stupid customer questions that I would invariable hear as a> result of this!)>> So again I am exactly where I started...nowhere.>> What I need is a $create? command to create a shopping cart file so I can> play with the headers without adding any line items. Or is there another> way I am overlooking?>> Brian B. Burton>> P.S. I installed webcatalog 2.01 updater last night, and ever since then my> shopping carts have only lasted 2 hours before being auto deleted. I thought> it was (is) supposed to be 24 Hours?
Pat McCormick
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:
All choices on IE different than Netscape (1997)
Listserver problem (1997)
Disappearing Databases (2000)
WebCatalog 4.0 has been released! (2000)
how do ye do this?????? (2001)
Major Security Hole IIS NT (1998)
Country & Ship-to address & other fields ? (1997)
[taxrate] question (1997)
Counting Inventory (2003)
Quotes inside alt tags (2008)
grep question - how to strip spaces from the beginning ofa string? (2002)
Changing price for a SLU based on options (size, etc.) (1997)
Some Questions (1997)
Job Posting (1998)
Hyperboard users wanting a quoted message (1998)
Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997)
pc (1997)
[WebDNA] fastcgi on Centos 64bit (2010)
denied access (1997)
Location of Browser Info.txt file (1997)