[ic] Cookie Cart Content

Carl Bailey carl at endpoint.com
Sun Oct 11 02:26:25 UTC 2009


On Oct 10, 2009, at 9:57 PM, Raymond Cheng wrote:
> Hi, All:
>
> How can i use cookies to retain cart contents. I want interchange to  
> retain items in cart for a few days after browser closes. Thank you.
>
> Regards
> Raymond 		 	   		


Raymond,

You can probably use the [set-cookie] tag (http://www.interchange.rtfm.info/icdocs/tags/set-cookie.html 
),  and use ITML to compose the value of the cookie.

[if items]
[set cookieval][/set]
[item-list][seti cookieval][scratch cookieval]|[item-code];[item- 
quantity][/seti][/item-list]
[set-cookie name="cart" value="[scratch cookieval]" expire="[time  
adjust="+168" gmt=1]%a, %m-%b-%Y %H:%M:%S GMT[/time]"]
[/if]

Now the tricky part will be restoring the cart from the cookie when  
your customer returns.

Regards,
Carl
. . . . . . . . . . . . . . . . . .
Carl Bailey
End Point Corp.
t: 919-323-8025
. . . . . . . . . . . . . . . . . .






More information about the interchange-users mailing list