Hey guys ive given up doing it myself as i cant find the right path
basically i have a cookie which is used domain wide.
www.domain.com
my shop is under
store.domain.com
I can store the cookie and see it by going to both websites.
i want to keep the same session ID for both websites.
i know i need to add it on the application_top.php file
my cookies show for ex.
PHPSESSID ( established by going to main domain)
then when clicking on a link to the oscommerce store
a new cookie for osCsid appears.
can i implement that it checks if a cookie[name] is there then the value of the session_id, by the shop uses the cookie value
i had an IF statement for if cookie exists but i got no idea where to put it on the application_top file!
Latest News: (loading..)
session and cookies help
Started by xp02ed, Mar 02 2011, 06:03
1 reply to this topic
#1
Posted 02 March 2011, 06:03
#2
Posted 02 March 2011, 12:20
i found this part which looks like what i want
// set the session ID if it exists
if (isset($HTTP_POST_VARS[tep_session_name()])) {
tep_session_id($HTTP_POST_VARS[tep_session_name()]);
} elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {
/* added by me for subdomains*/
tep_session_id($HTTP_GET_VARS[tep_session_name()]);
}
Ive implemented to check if there is a cookie value, if so use that as the session_id() instead of creating a new one.
BUT when i put it in, the links for buy now etc, the paramater of the oscsid appears on the URL bar!
// set the session ID if it exists
if (isset($HTTP_POST_VARS[tep_session_name()])) {
tep_session_id($HTTP_POST_VARS[tep_session_name()]);
} elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {
/* added by me for subdomains*/
tep_session_id($HTTP_GET_VARS[tep_session_name()]);
}
Ive implemented to check if there is a cookie value, if so use that as the session_id() instead of creating a new one.
BUT when i put it in, the links for buy now etc, the paramater of the oscsid appears on the URL bar!














