How to implement cookies in S-mart ? : LUSENET : S-Mart Shopping Cart : One Thread

I've got S-Mart running, including a lot of modifications that were posted on this board before. The only thing I can't get to work though are the cookies; there's an example posted here on the board somewhere, but it doesn't work for me -the script just does not place the cookie.

I would like to use cookies, as storing orders in the /temp/ direcotory often results in incomplete orders or even empty shopping baskets. I used IP in stead of host, but the problem remains for some ISPs.

Any help ? Javascript cookies perhaps ? Anyone managed to get this to work ?

Thanks in advance,


-- Frank (, February 08, 2000


If you notice on the "To do list" on Barry's home page it says "Cookie support. In progress" Barry mentions cookies in the s-mart script but it hasn't been completed yet. If you read the smart-cfg script file again you will see it says, "# For now cookies aren't functional" after asking if you want to use cookies. So for now you should enter "0" instead of "1". The new version 2.0 promises to have cookie support.

-- Corina Noble (, February 10, 2000.

This message is in response to one placed by Corina on the message board reguarding cookies.

Corina -

I saw your message reguarding version 2.0 implementing cookies. I know I've been using the s-mart for more than a year and that screen hasn't changed at all so I wouldn't hold your breath for it to come out anytime soon. Barry wrote an absolutely wonderful script but I think that other obligations have kept him from pursuing it even further at the present time (Barry - please correct me if you are in fact working on a new release). So, "stock", out of the box wise for the script right now it doesn't look like there is cookie support.

I did however post a cookie routine which I wrote a while back on the message board. I am using it as well as many others in this online forumn community. There are however some people that haven't gotten it to work yet. It seems to react differently on different servers and environments. So, it's not fool-proof and may not work in your application but I know that it does work for many so there is still hope.

You can view my "patch" to enable cookie use on the menu web board. Just scroll through and look for a message that says something like "How to implement cookies with S-mart" with "BP" next to it.

Hope this helps!


-- BP (, February 10, 2000.

I have implemented cookies with my cart. If you are interested to know more, email me at

God bless!

-- Patrick Chan (, March 20, 2000.

Moderation questions? read the FAQ