TourCMS community

For users of the TourCMS tour operator ecommerce platform

I have a cookie problem and I don't mean the chocolate chip variety :-)

We use the attached script on our website (www.egypt-uncovered.com) to allow visitors to select the currency in which they wish to view the website. The script is supposed to set a cookie on the visitors computer in oder to remember this choice and to retain the chosen currency whilst the visitor is browing around the website.

Something on my website has happend to stop this from working. The currency still converts properly when you choose a new currency from the dropdown list in the top left menu, but it only last as long as you don't move to another page or refresh the page you are on. If you do the currency goes back to the base currency of the website, in this case GBP.

I guess this means that the cookie isn't retaining the information or isn't being set properly.

Does anyone know how to fix this problem?

I am not that good at script programming so please keep it simple :-)

Thanks

Attachments:

Reply to This

Replies to This Discussion

Hi Martin
While we don't directly support what people do with their websites we do try and help where we can (especially for customers like you who help other people out in the forum!)

Your problem here was for 2 reasons
* Your web hosting provider has changed your PHP version on your webserver - the old method of getting data from the cookies was no longer supported. (I have updated your code on one of your websites to use the new way of doing it)

* You had wrapped your PHP scripts (in TourCMS) with a script tag... you only need to do that for JavaScript - not PHP. As a result there was what is called "white space" between the top of your page and where your web server was trying to set the cookie. White space is not permitted (not a restriction introduced by TourCMS - but by your webserver..... indeed any web server!). (I have removed this from your TourCMS snippet and it now works 100%...... obviously you are going to have to do a full site rebuild for this change to take effect on your full site)

Alex

Reply to This

Alex

Thanks for helping with that and for doing it so quickly. Next time i will not be so cheeky, and I will pay someone to fix my coding problems :-)

Martin

Reply to This

Are you sure its not the chocolate chip variety :-) hey hey

Reply to This

RSS

About TourCMS community

TourCMS team TourCMS team created this social network on Ning.

Create your own social network!

The bug board

© 2008   Created by TourCMS team on Ning.   Create your own social network

Badges  |  Report an Issue  |  Privacy  |  Terms of Service