Re: [WebDNA] cart stored as a session cookie
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 100533
interpreted = N
texte = --=====================_57818093==.ALTContent-Type: text/plain; charset="us-ascii"Thanks Brian and Terry - will implement and try it out. I knew that there had to be a better way than attaching ?cart=[cart] to every link.When going to the SSL, I'll just pass the cart value in a hidden input as per normal.Thanks again!GJKAt 01:47 PM 8/13/2008, you wrote:>well, how I do it is...>>all pages on the site are built with an included header file, so >adding code in one place and having it run on every page is effortless.>in my header.inc file i have another cart.inc file included. (keeps >things tidy that way)>>it has in it..>>[!] Attempt to give new visitors a cookie. (new visitor = one without >a current cookie) [/!]>[showif [getcookie Mycart]=]>[setcookie name=Mycart&value=[cart]&path=/&domain=[getmimeheader >Host]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+3[/math] [/format] [math time]{[time]}+{05:00:00}[/math] GMT]>[/showif]>>[!] Give the nice people who just placed an order a new cookie [/!]>[!] I reset the cart value from the previous page elsewhere as part of >the checkout process [/!]>[showif [referrer]^checkoutfinished.tpl]>[setcookie name=Mycart&value=[cart]&path=/&domain=[getmimeheader >Host]&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}+3[/math] [/format] [math time]{[time]}+{05:00:00}[/math] GMT]>[/showif]>>[!] and we set the cart value to the value stored in the cart cookie >[/!]>[hideif [getcookie Mycart]=]>[text]cart=[getcookie Mycart][/text]>[/hideif]>>>TA-DA!>>>> Brian B. Burton> 256-457-6232> Department of Redundancy Department>---------------------------------------------------------------> Specializing in website design and development to make your >customers exclaim:> "Out of all the websites I visit, yours is the easiest to use!"--=====================_57818093==.ALTContent-Type: text/html; charset="us-ascii"
Thanks Brian and Terry - will implement and try itout. I knew that there had to be a better way than attaching?cart=[cart] to every link.
When going to the SSL, I'll just pass the cart value in a hidden input asper normal.
Thanks again!
GJK
At 01:47 PM 8/13/2008, you wrote:
well, how I do it is...
all pages on the site are built with an included header file, so
adding code in one place and having it run on every page iseffortless.
in my header.inc file i have another cart.inc file included. (keeps
things tidy that way)
it has in it..
[!] Attempt to give new visitors a cookie. (new visitor = onewithout
a current cookie) [/!]
[showif [getcookie Mycart]=]
[setcookiename=Mycart&value=[cart]&path=/&domain=[getmimeheader
Host]&expires=[format days_to_date %A,%d-%b-%Y][math]{[date]}+3[/math] [/format] [mathtime]{[time]}+{05:00:00}[/math] GMT]
[/showif]
[!] Give the nice people who just placed an order a new cookie [/!]
[!] I reset the cart value from the previous page elsewhere as partof
the checkout process [/!]
[showif [referrer]^checkoutfinished.tpl]
[setcookiename=Mycart&value=[cart]&path=/&domain=[getmimeheader
Host]&expires=[format days_to_date %A,%d-%b-%Y][math]{[date]}+3[/math] [/format] [mathtime]{[time]}+{05:00:00}[/math] GMT]
[/showif]
[!] and we set the cart value to the value stored in the cartcookie
[/!]
[hideif [getcookie Mycart]=]
[text]cart=[getcookie Mycart][/text]
[/hideif]
TA-DA!
Brian B. Burton
256-457-6232
Department of Redundancy Department
---------------------------------------------------------------
Specializing in website design and development to make your
customers exclaim:
"Out of all the websites I visit, yours is the easiest touse!"
--=====================_57818093==.ALT--
Associated Messages, from the most recent to the oldest:
--=====================_57818093==.ALTContent-Type: text/plain; charset="us-ascii"Thanks Brian and Terry - will implement and try it out. I knew that there had to be a better way than attaching ?cart=
[cart] to every link.When going to the SSL, I'll just pass the cart value in a hidden input as per normal.Thanks again!GJKAt 01:47 PM 8/13/2008, you wrote:>well, how I do it is...>>all pages on the site are built with an included header file, so >adding code in one place and having it run on every page is effortless.>in my header.inc file i have another cart.inc file included. (keeps >things tidy that way)>>it has in it..>>
[!] Attempt to give new visitors a cookie. (new visitor = one without >a current cookie) [/!]>[showif [getcookie Mycart]=]>[setcookie name=Mycart&value=
[cart]&path=/&domain=[getmimeheader >Host]&expires=[format days_to_date %A, %d-%b-%Y]
[math]{
[date]}+3[/math] [/format] [math time]{
[time]}+{05:00:00}[/math] GMT]>[/showif]>>
[!] Give the nice people who just placed an order a new cookie [/!]>
[!] I reset the cart value from the previous page elsewhere as part of >the checkout process [/!]>[showif
[referrer]^checkoutfinished.tpl]>[setcookie name=Mycart&value=
[cart]&path=/&domain=[getmimeheader >Host]&expires=[format days_to_date %A, %d-%b-%Y]
[math]{
[date]}+3[/math] [/format] [math time]{
[time]}+{05:00:00}[/math] GMT]>[/showif]>>
[!] and we set the cart value to the value stored in the cart cookie >[/!]>[hideif [getcookie Mycart]=]>
[text]cart=[getcookie Mycart][/text]>[/hideif]>>>TA-DA!>>>> Brian B. Burton> 256-457-6232> Department of Redundancy Department>---------------------------------------------------------------> Specializing in website design and development to make your >customers exclaim:> "Out of all the websites I visit, yours is the easiest to use!"--=====================_57818093==.ALTContent-Type: text/html; charset="us-ascii"
Thanks Brian and Terry - will implement and try itout. I knew that there had to be a better way than attaching?cart=[cart] to every link.
When going to the SSL, I'll just pass the cart value in a hidden input asper normal.
Thanks again!
GJK
At 01:47 PM 8/13/2008, you wrote:
well, how I do it is...
all pages on the site are built with an included header file, so
adding code in one place and having it run on every page iseffortless.
in my header.inc file i have another cart.inc file included. (keeps
things tidy that way)
it has in it..
[!] Attempt to give new visitors a cookie. (new visitor = onewithout
a current cookie) [/!]
[showif [getcookie Mycart]=]
[setcookiename=Mycart&value=[cart]&path=/&domain=[getmimeheader
Host]&expires=[format days_to_date %A,%d-%b-%Y][math]{[date]}+3[/math] [/format] [mathtime]{[time]}+{05:00:00}[/math] GMT]
[/showif]
[!] Give the nice people who just placed an order a new cookie [/!]
[!] I reset the cart value from the previous page elsewhere as partof
the checkout process [/!]
[showif [referrer]^checkoutfinished.tpl]
[setcookiename=Mycart&value=[cart]&path=/&domain=[getmimeheader
Host]&expires=[format days_to_date %A,%d-%b-%Y][math]{[date]}+3[/math] [/format] [mathtime]{[time]}+{05:00:00}[/math] GMT]
[/showif]
[!] and we set the cart value to the value stored in the cartcookie
[/!]
[hideif [getcookie Mycart]=]
[text]cart=[getcookie Mycart][/text]
[/hideif]
TA-DA!
Brian B. Burton
256-457-6232
Department of Redundancy Department
---------------------------------------------------------------
Specializing in website design and development to make your
customers exclaim:
"Out of all the websites I visit, yours is the easiest touse!"
--=====================_57818093==.ALT--
Gary Krockover
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:
Obscure Question of the day (1997)
Dumb Question about Docs (1997)
shipping costs (1997)
WC Database Format (1997)
Re WebDNA has reached it connection limit (2004)
[OT] Unix question -solution?- (2002)
[CART] (1997)
[WebDNA] double emails (2014)
WebMerchant Question (1998)
NT error logs (1997)
Migrating to NT (1997)
Shipping cost out of synch (1998)
Problem displaying search result (1997)
I have troubles to send message out (1998)
[WebDNA] Cheers (2008)
[OT] (2002)
Stinkin' [Referrer] (1998)
change the number format (1997)
Generating and appending SKU to a db automatically (1998)
Comments in db? (1997)