Jump to content



Photo
* * * * * 4 votes

What is the osCsid & why you must not loose it.


This topic has been archived. This means that you cannot reply to this topic.
206 replies to this topic

#201   spooks

spooks
  • Members
  • 7,017 posts

Posted 11 April 2012 - 00:07

@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.

#202   al3ks

al3ks
  • Members
  • 288 posts

Posted 22 May 2012 - 19:44

@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. :)

#203   germ

germ
  • Members
  • 13,921 posts

Posted 22 May 2012 - 23:08

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 >

#204   al3ks

al3ks
  • Members
  • 288 posts

Posted 22 May 2012 - 23:51

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. :)

#205   germ

germ
  • Members
  • 13,921 posts

Posted 23 May 2012 - 00:45

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 >

#206   vampirehunter

vampirehunter
  • Members
  • 374 posts

Posted 08 August 2012 - 11:34

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.

#207   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,554 posts

Posted 08 August 2012 - 13:53

Your custom home page issue has nothing to do with the session id. Please don't post all over. You got an answer here