Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks but that only works when the customer is logged in. I also wanted to allow the customer to add items to the basket without having to register. Besides which I'm already keeping a last_update field in the database against the cart record. (What I mean is, I'm already going to be doing this for registered customers).
      singulars
    2. COIn that case, store the basket in a cookie (as a JSON string) with an expiry date value too. When they return, check for the cookie and expire any items that need to be. Just ensure that no personal information is stored in the cookie. If they need to register to actually get to the check-out/payment section, transfer the information to the DB once they have successfully registered and only use the DB from there on in (i.e., cookie for un-registered, DB for registered). This would allow for order history to be searched as well.
      singulars
    3. COSorry I don't think you understood me. I am storing the cart in the database already, and for registered customers I will find the carts they own from the database. All I'm trying to do here, is that when the browser is closed, persist the session_id from before so that unregistered customers will see their cart from before. So I created a session under the session name, and set it to expire in 30 days, but it still seems to expire when the browser is closed. What do I do to fix that? I only need the session id from before to identify the cart which is already stored in the database. thanks
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload