spooks Posted April 11, 2012 Author Share Posted April 11, 2012 @@opiate I assume you have checked that your includes/configure.php cookie settings are correct ? The main issue I note from your site is the lack of any expires header causing 304 'errors' on revisit, I would address that first, take a look at your page speed / yslow scores and address what you can. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
al3ks Posted May 22, 2012 Share Posted May 22, 2012 @@spooks or someone who could help me with this, I have a few questions regarding this topic. If I make a link like this: <a href="mysite/page.php">Link</a> And I force cookie use in my admin settings, (like you said) the user can browse fine without loosing the cart or suddenly logging out, my question is will this work in every case. I mean is it possible it will not work if the user changes some setting in their browser relating to cookies? Also I am using the extra info page manger for 2.3.1 which lets me edit custom pages from admin area but it saves the text information on the database and can translate to HTML. But in there the tep_href_link function doesn't work. Is there a way to make a link in there without loosing the osCsid? Thanks Aleksander Find this post helpful? Click the 'Like this' button. :) Link to comment Share on other sites More sharing options...
germ Posted May 22, 2012 Share Posted May 22, 2012 The ideal link code would be: <a href="<?php echo tep_href_link('page.php'); ?>">Link</a> The gist of the matter is if you don't use the osC function tep_href_link() you run the risk of losing the session and dumping the cart/logging the customer off. That being said, it's not always true. I did some testing a long time ago and linked an osc page to a HTML only file that linked back to the osc page. I could go back and forth without losing the session. This may or may not be true for you, It's always best to use the osc function to construct links. The contribution you mentioned doesn't work using the tep_href_link function because it would have to eval() the code. The way to tell if links in the contribution generated files will be OK for you is just put something in the cart and click the link. Then go to the shopping cart page. If the cart is empty you lost the session. If not - you're good to go. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
al3ks Posted May 22, 2012 Share Posted May 22, 2012 The ideal link code would be: <a href="<?php echo tep_href_link('page.php'); ?>">Link</a> The gist of the matter is if you don't use the osC function tep_href_link() you run the risk of losing the session and dumping the cart/logging the customer off. That being said, it's not always true. I did some testing a long time ago and linked an osc page to a HTML only file that linked back to the osc page. I could go back and forth without losing the session. This may or may not be true for you, It's always best to use the osc function to construct links. The contribution you mentioned doesn't work using the tep_href_link function because it would have to eval() the code. The way to tell if links in the contribution generated files will be OK for you is just put something in the cart and click the link. Then go to the shopping cart page. If the cart is empty you lost the session. If not - you're good to go. Hey thanks for the reply. Any chances to make the contribution show the links using tep_href_link function correctly? how to ecal() the code? I have tried different things and it works on a simple HTML link when the force cookie use option is true. Find this post helpful? Click the 'Like this' button. :) Link to comment Share on other sites More sharing options...
germ Posted May 23, 2012 Share Posted May 23, 2012 Doing an eval() on the code isn't a good idea. Forcing cookie use has it's pro's and con's. If it work for you - run with it. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
vampirehunter Posted August 8, 2012 Share Posted August 8, 2012 anyone know how to make a custom home page that doesn't affect the cpath links to categories and manufacturers? both the categories and manufacturer links are both embedded from index.php which is making it impossible to have a custom home page if anyone knows how to make a custom home page without having these issues, do please tell. i don't want to lose the osCsid. noone seems to know it looks like. Link to comment Share on other sites More sharing options...
♥multimixer Posted August 8, 2012 Share Posted August 8, 2012 Your custom home page issue has nothing to do with the session id. Please don't post all over. You got an answer here My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.