-- HikaShop version -- : 4.3.0
In the plugin: "HikaShop group plugin" from the latest version of Hikashop 4.3.0, an event handler has appeared:
function onBeforeCheckoutViewDisplay ($layout, &$view) {
if ($layout! = 'login')
return;
$order = $view->checkoutHelper->getCart();
if ($this-> checkGuest ($order))
return true;
$view->options['registration_guest'] = false;
}
If the user is already authorized, then layout = 'login' is not displayed, but this handler still processes this layout and a message appears:
"You cannot proceed to a guest checkout as some of the products in your cart require a registration to our website. Please register an account or remove these products from your cart in order to proceed"
To fix this, I added:
if ($order-> user_id! = 0) return;
after
$order = $view->checkoutHelper->getCart();
Is this enough to fix this error, or is there another solution?