Can I have a "product" for access to the site?

  • Posts: 151
  • Thank you received: 9
12 years 3 months ago #59046

Hi,

Can I have a product that offers access to the website?

When the buyer buys this "product", he actually buys his/her login code to have access via the Joomla Login to content behind this login.

Thank you,
Maurice

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #59098

Hi,

Yes, you can do that with the Business edition by setting the option "user group after purchase" in the options screen of your product.
You will configure there a user group which will be added to each user buying that product and you will restrict your paid menus/content to that user group so that they will appear to the user when he logs in with the user group attached to his account.

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

  • Posts: 151
  • Thank you received: 9
12 years 3 months ago #60080

Hi Nicolas,

Of course each user is always added to the "Registered" group because he/she registers at the shop itself (Joomla account).
So in fact ALL users who buy anything, will be put in that group.

So I needed another group, especially for this product, which is a service.

I have added two extra usergroups from which I have selected one in the product setting. The idea is that the user is added to this group after purchase.

Unfortunately this does not work. After purchase, the user is still in the "Registered" group.

What am I doing wrong?

Kind regards,
Maurice

See the attached image for the product properties.

Attachments:
Last edit: 12 years 3 months ago by Maurice.

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #60163

Is the order status confirmed ? If not it means that the payment notification from the payment gateway was not received by HikaShop:
www.hikashop.com/en/support/documentatio...or.html#notification

Also please check that the hikashop group plugin is published and that its access level is public.

Finally, if you're using a payment method were the payment happens on your website during the checkout, you should try to add the code:

function onAfterOrderCreate( &$order,&$send_email){
		return $this->onAfterOrderUpdate( $order,$send_email);
	}
before the line:
function onAfterOrderUpdate(&$order,&$send_email){

in the file plugins/hikashop/group/group.php

The following user(s) said Thank You: Maurice

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

  • Posts: 151
  • Thank you received: 9
12 years 3 months ago #60166

Hi Nicolas,

As a matter of fact the product is free. I checked and the orders are indeed confirmed.
The hikashop group plugin is published and its access level is public.

Adding the code did the trick! So thank you for that.

Note that the path where this file resides is: plugins/hikashop/group.php

Great solution! Thanks!

Maurice

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

Time to create page: 0.068 seconds
Powered by Kunena Forum