Skip to main content
Topic: How to create session (Read 6908 times) previous topic - next topic

How to create session

How to create session to some front end pages

I want session from add to cart page till payment page

Re: How to create session

Reply #1
@arun‍ please use the following to set and get sessions.
Set Session:
Code: [Select]
<?php
set_session("{name}","{data}");
?>
replace {name} with the name you want to access the session with and replace {data} with the value you want to store.

Get Session:
replace {name} with the name you used previously for creating the session, to get the session.
Code: [Select]
<?php
get_session("{name}");
?>

Re: How to create session

Reply #2
I am using Classic version