Issue with 'User group after purchase'

  • Posts: 357
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
2 years 4 months ago #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:

"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 or Create an account to join the conversation.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
2 years 4 months ago #337644

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 or Create an account to join the conversation.

  • Posts: 357
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
2 years 4 months ago #337652

Hi

2 variants had NONE in the field, the rest were empty.
I removed the NONE in those two and now it works again :-)

Please Log in or Create an account to join the conversation.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
2 years 4 months ago #337658

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 or Create an account to join the conversation.

  • Posts: 357
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
2 years 4 months ago #337667

Hi

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

Please Log in or Create an account to join the conversation.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
2 years 4 months ago #337694

Hi,

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

if(!empty($product->product_group_after_purchase) && $product->product_group_after_purchase != 'all' && $product->product_group_after_purchase != '') {
to:
if(!empty($element->product_group_after_purchase) && !in_array($element->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

Please Log in or Create an account to join the conversation.

  • Posts: 357
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
2 years 4 months ago #337695

Great!
Glad to help ...

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum