[Skip to main content](#vessel-content)

#   HikaShop group plugin

##

- **[bvitl](/forum/user/38376-bvitl "View bvitl's Profile")**
- [![bvitl's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/fish.gif)](/forum/user/38376-bvitl "View bvitl's Profile") Topic Author
- [ Offline](/forum/user/38376-bvitl)

Less More

- Posts: 9
- Thank you received: 1
-
-
-

6 years 3 months ago -  6 years 3 months ago [\#322056](#322056) by [bvitl](/forum/user/38376-bvitl "View bvitl's Profile")  *[HikaShop group plugin](/forum/27-checkout/900424-hikashop-group-plugin#322056 "-- HikaShop version -- : 4.3.0  In the plugin: &quot;HikaShop group plugin&quot; from the latest version of Hikashop 4.3.0, an event handler has appeared:  If the user is already authorized, then layout = 'login' is not displayed, but this handler still processes this layout and a message appears: &quot;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&quot;  To fix this, I added: if ($order-&gt; user&#95;id! = 0) return; after $order = $view-&gt;checkoutHelper-&gt;getCart();  Is this enough to fix this error, or is there another solution?")* was created by *[bvitl](/forum/user/38376-bvitl "View bvitl's Profile")*

-- 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: Code:

function onBeforeCheckoutViewDisplay ($layout, &amp;$view) { if ($layout! = 'login') return; $order = $view-&gt;checkoutHelper-&gt;getCart(); if ($this-&gt; checkGuest ($order)) return true; $view-&gt;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-&gt; user_id! = 0) return;
after
$order = $view-&gt;checkoutHelper-&gt;getCart();

Is this enough to fix this error, or is there another solution?

Last edit: 6 years 3 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDQyNC1oaWthc2hvcC1ncm91cC1wbHVnaW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

6 years 3 months ago [\#322073](#322073) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[HikaShop group plugin](/forum/27-checkout/900424-hikashop-group-plugin#322073 "-- HikaShop version -- : 4.3.0  In the plugin: &quot;HikaShop group plugin&quot; from the latest version of Hikashop 4.3.0, an event handler has appeared:  If the user is already authorized, then layout = 'login' is not displayed, but this handler still processes this layout and a message appears: &quot;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&quot;  To fix this, I added: if ($order-&gt; user&#95;id! = 0) return; after $order = $view-&gt;checkoutHelper-&gt;getCart();  Is this enough to fix this error, or is there another solution?")*

Hello,

Hard to answer you directly like this, we will need to better understand the context because we process some tests on our side without have this error message.
Can we see your relative screenshots configuration ?
We need to fully understand why this error message have been displayed, and then we will be able to better understand if your fix is enough.
Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDQyNC1oaWthc2hvcC1ncm91cC1wbHVnaW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bvitl](/forum/user/38376-bvitl "View bvitl's Profile")**
- [![bvitl's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/fish.gif)](/forum/user/38376-bvitl "View bvitl's Profile") Topic Author
- [ Offline](/forum/user/38376-bvitl)

Less More

- Posts: 9
- Thank you received: 1
-
-
-

6 years 3 months ago [\#322144](#322144) by [bvitl](/forum/user/38376-bvitl "View bvitl's Profile")  Replied by *[bvitl](/forum/user/38376-bvitl "View bvitl's Profile")* on topic *[HikaShop group plugin](/forum/27-checkout/900424-hikashop-group-plugin#322144 "-- HikaShop version -- : 4.3.0  In the plugin: &quot;HikaShop group plugin&quot; from the latest version of Hikashop 4.3.0, an event handler has appeared:  If the user is already authorized, then layout = 'login' is not displayed, but this handler still processes this layout and a message appears: &quot;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&quot;  To fix this, I added: if ($order-&gt; user&#95;id! = 0) return; after $order = $view-&gt;checkoutHelper-&gt;getCart();  Is this enough to fix this error, or is there another solution?")*

All products "User group after purchase" value "Custom"
Chekout on one page:
[ ![1111.jpg](/forum/attachment/50093) ](/forum/attachment/50093 "1111.jpg")

Without fix, 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".
Even when the user is logged in

When Login layout on other page, all good.

- [ ![1111.jpg](/forum/attachment/50093) ](/forum/attachment/50093 "1111.jpg") [ ](/forum/attachment/50093?download=1 "1111.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDQyNC1oaWthc2hvcC1ncm91cC1wbHVnaW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

6 years 3 months ago [\#322162](#322162) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[HikaShop group plugin](/forum/27-checkout/900424-hikashop-group-plugin#322162 "-- HikaShop version -- : 4.3.0  In the plugin: &quot;HikaShop group plugin&quot; from the latest version of Hikashop 4.3.0, an event handler has appeared:  If the user is already authorized, then layout = 'login' is not displayed, but this handler still processes this layout and a message appears: &quot;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&quot;  To fix this, I added: if ($order-&gt; user&#95;id! = 0) return; after $order = $view-&gt;checkoutHelper-&gt;getCart();  Is this enough to fix this error, or is there another solution?")*

Hi,

Thanks for the details.
We'll indeed need to add some code for that.
However, I think this code instead is better: Code:

$user = JFactory::getUser(); if(empty($user-&gt;guest)) return true;

That's the patch we'll add on our end for the next release.

The following user(s) said Thank You: [bvitl](/forum/user/38376-bvitl "View bvitl's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDQyNC1oaWthc2hvcC1ncm91cC1wbHVnaW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.160 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
