Getting "user group after purchase" to work

  • Posts: 241
  • Thank you received: 5
11 years 3 months ago #123554

-- www.wodrocket.com/index.php?option=com_h...ct&task=show&cid=535
-- HikaShop version -- : 2.1.3
-- Joomla version -- : 2.5.14
-- PHP version -- : ??
-- Browser(s) name and version -- : chrome

Hi, I need new users (first time registrants) who complete purchase and payment to be assigned to their user group IMMEDIATELY after they complete purchase so they can access features of the site assigned to the user group.

Right now, the only way for them to access the group's priviledges is to logout and log back in which is asking alot of them after they are already logged in.

If you goto the following link,

www.wodrocket.com/index.php?option=com_h...ct&task=show&cid=535

and process a order ($.01 which I am happy to reimburse you), you will see that after completing payment thru Authorize.net and being brought back to our site, the user group is not yet active. Only after you logout and log back in do you have access to the group's priviledges.

Screenshot of the settings below.

As always, thank you for the help with this.

Attachments:
Last edit: 11 years 3 months ago by cberry1971. Reason: adding screenshot

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
11 years 3 months ago #123579

Hi,

We made improvements in this plugin in HikaShop 2.1.1 like explained in the Change log.
www.hikashop.com/support/documentation/5...ashop-changelog.html

We now logout users if their user groups have been changed after the purchase so that they have to login after and get the new user groups permissions


The user groups are processed during the user login. If we change them while the user is logged, it does not affect the user session. That's why we logout the user in this case.
But if the order is confirmed by an external call (a "server to server" notification) we can't logout the user because it's not him who "open" the page.
We can't know when the order will be confirmed, we can't know if we have to logout the user when he comes back from the payment website.
So except by implementing something in joomla to logout a user after a modification... I don't know what else can be possible.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 241
  • Thank you received: 5
11 years 3 months ago #123655

Ok that would work perfect except it does not seem to be working in 2.2.1.

I just ran thru a new user dummy transaction processed via PayPal. After completing the transaction I was re-directed back to the site and still logged in as seen in the screenshot. No permissions granted.


Attachments:

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
11 years 3 months ago #123661

Hi,

But if the order is confirmed by an external call (a "server to server" notification) we can't logout the user because it's not him who "open" the page.
We can't know when the order will be confirmed, we can't know if we have to logout the user when he comes back from the payment website.
So except by implementing something in joomla to logout a user after a modification... I don't know what else can be possible.


Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 241
  • Thank you received: 5
11 years 3 months ago #123684

I understand. But I am confused what this version note means:

We now logout users if their user groups have been changed after the purchase so that they have to login after and get the new user groups permissions


Is there any way to add user to group prior to payment? They won't be "confirmed" only "created" but that is fine.

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
11 years 3 months ago #123795

Hi,

It's better to do not change the user group before the order confirmation.
There is no easy solution for the moment, I don't know any Joomla feature which allow to logout/login a user in another session.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum