Session Cookie

I want to create sometime like a session cookie for shopify website, when customer is log into account for 30 days and click on my account menu or link it will automaticaly direct them to their account page, after 30 days it should redirect them to the sign in page to establish a new session cookie for 30 days. Please I will need help to accomplish this process.

Hi @jpeprah ,

You can try using the code snippet below.

Step 1: Go to Online Store > Themes > edit code and find theme.liquid

Step 2: Insert it just above the closing tag.


Hope this can help you !

Thank you for your swift response, but unfortunately that solution did not work, I log in but did not remember the session cookie, I click on my account and instead of taking me to the account page, I was redirected to login again to login even though I I have already login.

Any help will be appreciated, I have been working on it for days.

Hi @jpeprah ,

You need to ensure that when you successfully log in, the customer’s information is saved in a cookie.

Any how do I do that? I want session information to be saved in a cookie for 30days so that customers don’t have to log in every time.

I was able to figure this out. Thank you.

How did you login? Through API?