Skip to main content

cookies in cart

More
11 years 8 months ago #184822 by dimavricos
cookies in cart was created by dimavricos
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3

Is there an easy way to create cookies for the shoping cart?
For example, if the user has 2 items in the cart , close the browser and then open again then show the 2 items again and not empy cart.

Thanks

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #184824 by lousyfool
Replied by lousyfool on topic cookies in cart
It works like that out of the box - at least it does for me.
However, browser settings could prevent the cookies from being stored, so best check the browser in use, or try another browser with its default settings?

Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #184826 by dimavricos
Replied by dimavricos on topic cookies in cart
Hi, thanks for you quick reply.
I checked it on chrome and ie with default settings but both after reopening the cart is empty.
This happens when i close the browser not the tab.
So is there a way to do something like this? This really helps the ux.
Thanks

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #184831 by lousyfool
Replied by lousyfool on topic cookies in cart
Urgh, sorry, now I'm getting it: close the browser (= quit)...

Well, typically it's considered a security feature e.g. in case computers are shared by multiple people, and of higher priority than the UX for a single user.
Though your argument (UX) is well understood, along these lines and in the interest of your site visitors/users I'd recommend leaving it as is... even if it doesn't answer your original question... ;)

Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #184841 by dimavricos
Replied by dimavricos on topic cookies in cart
Indeed this is right about the computers that are shared.
Thought, the cart contains info which are are simple and for me dont need to be secured as it has to be for example the checkout steps. So i am sorry that i insist on this but can you tell me if there is a way do it?
Thanks :)

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #184843 by nicolas
Replied by nicolas on topic cookies in cart
Hi,

That's already the case by default. However, the cookies will expired based on the "session lifetime" setting of the Joomla configuration.
So if you set that option to 1 day, the cart will only be kept for 1 day.

Also for registered users, the cart will be kept longer based on the "cart retaining period" option of the HikaShop configuration.

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago - 11 years 8 months ago #184875 by korzo
Replied by korzo on topic cookies in cart
Long story short, for guest user:
  • with default browser settings cart is lost when he closes the browser.
  • with "Continue where you left off" set on, cart will last for "cart retaining period" days.

For guest user cart is identified by session id.
Joomla session depends on session cookie and "session lifetime" mentioned by nicolas.

After "session lifetime" period, session is considered expired and is deleted by PHP(session garbage collector) on next request with probability 1%(by default).

Session cookie should be deleted when user closes browser, but this is ignored by most browsers when "Continue where you left off(Chrome)/Show my windows from last time(Firefox)" is set.

If there is no session but session cookie exists, Joomla will reuse session id from cookie.
Last edit: 11 years 8 months ago by korzo.

Please Log in or Create an account to join the conversation.

Time to create page: 0.240 seconds
Powered by Kunena Forum