cornburn Posted March 3, 2007 Posted March 3, 2007 Please can someone help?!?!?! :) I've just finished putting the final touches to a new site and it looks like I've broken the cart. I've been trying for hours to get it working and can't see what's changed. Could anyone throw any ideas at me? I have SEO URLs installed and it's always worked fine. I have static links that point to product pages and these are the ones playing up. Products add to the cart fine but as soon as you click any of the static links on the left the cart empties itself. What have I done????? If you click around other links breated by oscommerce the cart stays fine until one of the static ones is clicked. www.folding-bikes.net/asbikes It was supposed to go live this weekend and now I'm panicking!!!! The only files I've worked on the the main index and a few others, nothing related to the cart though :S
cornburn Posted March 3, 2007 Author Posted March 3, 2007 It seems to be losing the user's session when these links are clicked. Has anyone got any ideas? Getting desperate now :(
Guest Posted March 3, 2007 Posted March 3, 2007 As you say it is the static links that are breaking it - you can't use normal html links because they will not carry the session id and will break the session. you need to code the links using some php such as: <a href="<?php echo tep_href_link('mypage.php'); ?>">my page </a> or <?php echo '<a href="' . tep_href_link('mypage.php') . '">My page</a>'; ?> Tom
cornburn Posted March 4, 2007 Author Posted March 4, 2007 As you say it is the static links that are breaking it - you can't use normal html links because they will not carry the session id and will break the session. you need to code the links using some php such as: <a href="<?php echo tep_href_link('mypage.php'); ?>">my page </a> or <?php echo '<a href="' . tep_href_link('mypage.php') . '">My page</a>'; ?> Tom Thanks Tom I might get around to doing this to be on the safe side but somehow they have started working again. It now holds on to the session even when following any of the links. I'm not sure if SEO URLs somehow translates them back to php URLs for the cart but now it's definitely fine. Any idea how the cart is keeping track of sessions after following the static links? :S I can't see how it's managing to do it but definitely don't want it suddenly stopping on me again!
Guest Posted March 5, 2007 Posted March 5, 2007 it can use cookies to track the sessions but this won't work for all customers (i.e not for those with cookies disabled) Tom
cornburn Posted March 6, 2007 Author Posted March 6, 2007 Right, I'll redo them all to be on the safe side then. Thanks for your help :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.