rs2k Posted February 29, 2008 Posted February 29, 2008 When I try to go to create account from the shopping cart and cookies are not enabled the session ID stays the same but does not pass on. Force cookies is disabled. When I change the url from: https://www.mystore.com/create_account.php?...LONG-SESSION-ID to: https://www.mystore.com/create_account.php?...LONG-SESSION-ID then everything works like it should. Is there any way to prevent "fromcart=true&" from showing up?
rs2k Posted February 29, 2008 Author Posted February 29, 2008 FIXED IT! I had modified checkout_shipping.php to redirrect people from to create_account.php instead of the login page. I changed // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); //tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, 'fromcart=true', 'SSL')); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } to // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); //tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); //tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, 'fromcart=true', 'SSL')); tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } I think this may have been an expensive bug.
♥FWR Media Posted February 29, 2008 Posted February 29, 2008 FIXED IT!I had modified checkout_shipping.php to redirrect people from to create_account.php instead of the login page. I changed // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); //tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, 'fromcart=true', 'SSL')); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } to // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); //tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); //tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, 'fromcart=true', 'SSL')); tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } I think this may have been an expensive bug. It wasn't a bug .. at least not an oscommerce bug. you probably have an SEO url contrib installed, probably ULTIMATE SEO URLS with w3C settings ON. Works great but it also adds & to redirects So firstly take out your hacks. If you have the aforementioned URL contrib. Find (catalog/includes/classes/seo.class.php).. case ($this->attributes['USE_SEO_REDIRECT'] == 'true'): header("HTTP/1.0 301 Moved Permanently"); header("Location: $url"); // redirect...bye bye and adjust to .. case ($this->attributes['USE_SEO_REDIRECT'] == 'true'): $url = str_replace('&', '&', $url); header("HTTP/1.0 301 Moved Permanently"); header("Location: $url"); // redirect...bye bye For good measure find (catalog/includes/functions/general.php) .. header('Location: ' . $url); Add directly above .. $url = str_replace('&', '&', $url); Report back how you get on. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
rs2k Posted March 3, 2008 Author Posted March 3, 2008 Thanks!! I followed your instructions and now the sites work as they should. What the the fromcart=true statement do? I'm not able to find any information about it in the forums.
designgroop Posted March 15, 2008 Posted March 15, 2008 Just wanted to confirm that this fixed a number of issues with my installation: (for the benefit of others searching for this..) The string replace code successfully fixed & in URL issues I had that were affecting: *search *advanced search *errors on checkout_payment.php not showing - in particular with Protx Direct. This particular issue, I presume, would have a detrimental affect on any part of Oscommerce that needed to take values from a GET string that had been generated by a redirect. Hope others find their solution on this page. R. :thumbsup:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.