/** * Generate the cart cookie identifier, or return null if the cart is only managed in the session object, * not in a client cookie. * * @return string */ protected function generateCartCookieIdentifier() { $id = null; if (ConfigQuery::read("cart.use_persistent_cookie", 1) == 1) { $id = $this->tokenProvider->getToken(); $this->session->set('cart_use_cookie', $id); } return $id; }
protected function generateCookie(Session $session) { $id = null; if (ConfigQuery::read("cart.session_only", 0) == 0) { $id = uniqid('', true); $session->set('cart_use_cookie', $id); } return $id; }