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

#   Issue with 'User group after purchase'

##

- **[Thrane](/forum/user/31786-thrane "View Thrane's Profile")**
- [![Thrane's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31786-thrane "View Thrane's Profile") Topic Author
- [ Offline](/forum/user/31786-thrane)

Less More

- Posts: 366
- Thank you received: 26
-
-

4 years 11 months ago [\#337639](#337639) by [Thrane](/forum/user/31786-thrane "View Thrane's Profile")  *[Issue with 'User group after purchase'](/forum/26-product-category-display/903599-issue-with-user-group-after-purchase#337639 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4  Hi  I have setup a giftcard with variants using HikaSerial, but when I save the product, I get this warning:  &quot;Please note that you have the guest checkout activated for your checkout but products with a 'User group after purchase', like the one you just saved, can't be purchased by guest customers.&quot;  And customers can't buy the giftcards as guest. Both main product and variants are all set to NONE in User group after purchase.  Any good ideas on how to solve this?  Regards Thomas")* was created by *[Thrane](/forum/user/31786-thrane "View Thrane's Profile")*

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.3
-- PHP version -- : 7.4

Hi

I have setup a giftcard with variants using HikaSerial, but when I save the product, I get this warning:

"Please note that you have the guest checkout activated for your checkout but products with a 'User group after purchase', like the one you just saved, can't be purchased by guest customers."

And customers can't buy the giftcards as guest.
Both main product and variants are all set to NONE in User group after purchase.

Any good ideas on how to solve this?

Regards
Thomas

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDM1OTktaXNzdWUtd2l0aC11c2VyLWdyb3VwLWFmdGVyLXB1cmNoYXNlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

4 years 11 months ago [\#337644](#337644) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Issue with 'User group after purchase'](/forum/26-product-category-display/903599-issue-with-user-group-after-purchase#337644 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4  Hi  I have setup a giftcard with variants using HikaSerial, but when I save the product, I get this warning:  &quot;Please note that you have the guest checkout activated for your checkout but products with a 'User group after purchase', like the one you just saved, can't be purchased by guest customers.&quot;  And customers can't buy the giftcards as guest. Both main product and variants are all set to NONE in User group after purchase.  Any good ideas on how to solve this?  Regards Thomas")*

Hi,

Before solving the issue we need to understand it.
I tried on my end but I'm not able to reproduce the problem.
The value of that setting is really empty in the database when I try to do the same, and I don't get the warning.
So this indicates that there must be a value on your end stored in the database for the "user group after purchase" setting.
Could you go in your PHPMyAdmin, open the hikashop_product table, search for that gift card product entry (with the product_name for example), and look at the column "product_group_after_purchase" ?
There should not be a value for it.
Could you tell us what you have there ?

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

- **[Thrane](/forum/user/31786-thrane "View Thrane's Profile")**
- [![Thrane's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31786-thrane "View Thrane's Profile") Topic Author
- [ Offline](/forum/user/31786-thrane)

Less More

- Posts: 366
- Thank you received: 26
-
-

4 years 11 months ago [\#337652](#337652) by [Thrane](/forum/user/31786-thrane "View Thrane's Profile")  Replied by *[Thrane](/forum/user/31786-thrane "View Thrane's Profile")* on topic *[Issue with 'User group after purchase'](/forum/26-product-category-display/903599-issue-with-user-group-after-purchase#337652 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4  Hi  I have setup a giftcard with variants using HikaSerial, but when I save the product, I get this warning:  &quot;Please note that you have the guest checkout activated for your checkout but products with a 'User group after purchase', like the one you just saved, can't be purchased by guest customers.&quot;  And customers can't buy the giftcards as guest. Both main product and variants are all set to NONE in User group after purchase.  Any good ideas on how to solve this?  Regards Thomas")*

Hi

2 variants had NONE in the field, the rest were empty.
I removed the NONE in those two and now it works again ![:-)](/media/kunena/emoticons/3.png ":-)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDM1OTktaXNzdWUtd2l0aC11c2VyLWdyb3VwLWFmdGVyLXB1cmNoYXNlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

4 years 11 months ago [\#337658](#337658) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Issue with 'User group after purchase'](/forum/26-product-category-display/903599-issue-with-user-group-after-purchase#337658 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4  Hi  I have setup a giftcard with variants using HikaSerial, but when I save the product, I get this warning:  &quot;Please note that you have the guest checkout activated for your checkout but products with a 'User group after purchase', like the one you just saved, can't be purchased by guest customers.&quot;  And customers can't buy the giftcards as guest. Both main product and variants are all set to NONE in User group after purchase.  Any good ideas on how to solve this?  Regards Thomas")*

Hi,

Now the question is how these "none" were added there ?
Did you import the data and it was written "none" in that column for these variants instead of having an empty value ?
Was is NONE in uppercase that you saw in the database ?

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

- **[Thrane](/forum/user/31786-thrane "View Thrane's Profile")**
- [![Thrane's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31786-thrane "View Thrane's Profile") Topic Author
- [ Offline](/forum/user/31786-thrane)

Less More

- Posts: 366
- Thank you received: 26
-
-

4 years 11 months ago [\#337667](#337667) by [Thrane](/forum/user/31786-thrane "View Thrane's Profile")  Replied by *[Thrane](/forum/user/31786-thrane "View Thrane's Profile")* on topic *[Issue with 'User group after purchase'](/forum/26-product-category-display/903599-issue-with-user-group-after-purchase#337667 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4  Hi  I have setup a giftcard with variants using HikaSerial, but when I save the product, I get this warning:  &quot;Please note that you have the guest checkout activated for your checkout but products with a 'User group after purchase', like the one you just saved, can't be purchased by guest customers.&quot;  And customers can't buy the giftcards as guest. Both main product and variants are all set to NONE in User group after purchase.  Any good ideas on how to solve this?  Regards Thomas")*

Hi

I created both products and variants manually.
NONE was in uppercase in the database.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDM1OTktaXNzdWUtd2l0aC11c2VyLWdyb3VwLWFmdGVyLXB1cmNoYXNlP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

4 years 11 months ago [\#337694](#337694) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Issue with 'User group after purchase'](/forum/26-product-category-display/903599-issue-with-user-group-after-purchase#337694 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4  Hi  I have setup a giftcard with variants using HikaSerial, but when I save the product, I get this warning:  &quot;Please note that you have the guest checkout activated for your checkout but products with a 'User group after purchase', like the one you just saved, can't be purchased by guest customers.&quot;  And customers can't buy the giftcards as guest. Both main product and variants are all set to NONE in User group after purchase.  Any good ideas on how to solve this?  Regards Thomas")*

Hi,

Thanks for the details.
We'll replace the line (2 places): Code:

if(!empty($product-&gt;product_group_after_purchase) &amp;&amp; $product-&gt;product_group_after_purchase != 'all' &amp;&amp; $product-&gt;product_group_after_purchase != '') {

to: Code:

if(!empty($element-&gt;product_group_after_purchase) &amp;&amp; !in_array($element-&gt;product_group_after_purchase, array('all', '', 'none', 'NONE'))) {

in the file plugins/hikashop/group/group.php on our end for the next release.
That will make it work even if "none" is in there for some reasons.

The following user(s) said Thank You: [Thrane](/forum/user/31786-thrane "View Thrane's Profile")

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

- **[Thrane](/forum/user/31786-thrane "View Thrane's Profile")**
- [![Thrane's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31786-thrane "View Thrane's Profile") Topic Author
- [ Offline](/forum/user/31786-thrane)

Less More

- Posts: 366
- Thank you received: 26
-
-

4 years 11 months ago [\#337695](#337695) by [Thrane](/forum/user/31786-thrane "View Thrane's Profile")  Replied by *[Thrane](/forum/user/31786-thrane "View Thrane's Profile")* on topic *[Issue with 'User group after purchase'](/forum/26-product-category-display/903599-issue-with-user-group-after-purchase#337695 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.4  Hi  I have setup a giftcard with variants using HikaSerial, but when I save the product, I get this warning:  &quot;Please note that you have the guest checkout activated for your checkout but products with a 'User group after purchase', like the one you just saved, can't be purchased by guest customers.&quot;  And customers can't buy the giftcards as guest. Both main product and variants are all set to NONE in User group after purchase.  Any good ideas on how to solve this?  Regards Thomas")*

Great!
Glad to help ...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDM1OTktaXNzdWUtd2l0aC11c2VyLWdyb3VwLWFmdGVyLXB1cmNoYXNlP3RtcGw9bWFya2Rvd24=) 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.100 seconds

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