Hi,
That's not really an error. It just a warning and that warning can be ignored. The cookies work as expected like that.
The cookies are only to provide the cart_id and session_id for the browser to the server, so there is no need for third party context support.
Now, we could potentially add that but with the setcookie function we're using there, it's only possible to set the SameSite attribute with PHP 7.3 or higher. And since we still support older versions of PHP, we can't really use the normal way of setting it.
There is a roundabout way though. Try changing the code:
if((int)@$this->user->user_id > 0) {
@setcookie('hikashop_'.$type.'_id', '', time() - 3600, '/');
@setcookie('hikashop_'.$type.'_session_id', '', time() - 3600, '/');
} else {
$delay = (int)$this->config->get('cart_cookie_retaining_period', 31557600);
@setcookie('hikashop_'.$type.'_id', $element, time() + $delay, "/");
@setcookie('hikashop_'.$type.'_session_id', $jsession->getId(), time() + $delay, "/");
}
to:
if((int)@$this->user->user_id > 0) {
@setcookie('hikashop_'.$type.'_id', '', time() - 3600, '/; SameSite=Lax');
@setcookie('hikashop_'.$type.'_session_id', '', time() - 3600, '/; SameSite=Lax');
} else {
$delay = (int)$this->config->get('cart_cookie_retaining_period', 31557600);
@setcookie('hikashop_'.$type.'_id', $element, time() + $delay, "/; SameSite=Lax");
@setcookie('hikashop_'.$type.'_session_id', $jsession->getId(), time() + $delay, "/; SameSite=Lax");
}
in the file administrator/components/com_hikashop/classes/cart.php
That should remove these warnings even on older versions of PHP.