- Posts: 241
- Thank you received: 5
User Group after Purchase
- cberry1971
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
Did the order been validated (confirmed) ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
They are then directed back to our site to setup their profile and attend to other matters. This is only possible for them via a specific user group which (despite completing payment) has not been stored in their current session.
Is my only alternative to ask them to log out and log back in again in order to have that user groups' privileges?
Many thanks
Please Log in or Create an account to join the conversation.
They don't have to log out and then log in, when the order is confirmed, the group will automatically be added on their account.
Just refreshing the page should be ok.
You can too change the default order status in the checkout configuration.
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
1. once the order is "confirmed" the user group is applied however
2. the modules which are to be visible are not seen by that user (newly confirmed) unless they log out / log in.
Is there a work around?
example:
1. go here:
184.154.228.9/~throwdow/live/index.php?o...ent&id=10&Itemid=118
2. click buy tickets and create a dummy account (real email address)
3. complete the free "transaction" you will be marked "confirmed" on our backend
4. click "your account" top right.. notice there are no modules displayed (they should be based on your new user group)
5. log out and log in and click "your account" and the modules are there.
Please Log in or Create an account to join the conversation.
I see what you mean.
Unfortunately, the process confirming the orders and thus adding the user group is a server to server process where the payment gateway directly contacts HikaShop to notify HikaShop of the payment. So the user session is not available in that process and the "user group after purchase" plugin which is triggered when the order is confirmed is not able to change the user session at that time.
The best we can add is to force the logout of the user by deleting the session information from the database if you're using the database as session handler (there is an option to select that in the configuration of joomla).
To do that, you can add the code:
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
wodrocket.com/index.php?option=com_hikas...emo-winter-throwdown
Despite being logged out, the user still looks to be logged in, which is confusing to the user because the confirm language now says "Thank you for your purchase. Please login above to update your athlete profile."
But "above" looks like they are already logged in. If they were to refresh the page, they would notice the login form.
Please Log in or Create an account to join the conversation.
That will require additional code after that code to remove the session data in the session if the current session is for the user of the order.
Add the code
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
After creating new account and completing purchase, it still shows user as logged in (even though they are not) as evidenced by refreshing screen.
I have attached the screenshot. Many thanks.
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
refresh screen.
Please Log in or Create an account to join the conversation.
For the message, you can change it with a translation override:
www.hikashop.com/en/download/languages.html#modify
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
Please Log in or Create an account to join the conversation.
Yes you was supposed to.
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
Parse error: syntax error, unexpected '}' in /home/throwdow/public_html/live/plugins/hikashop/group/group.php on line 94
I have included the entire group.php file
Please Log in or Create an account to join the conversation.
Two "}" were missing.
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
Parse error: syntax error, unexpected '}' in /home/throwdow/public_html/live/plugins/hikashop/group/group.php on line 93
Please Log in or Create an account to join the conversation.
Regards
Please Log in or Create an account to join the conversation.
- cberry1971
-
Topic Author
- Offline
- Posts: 241
- Thank you received: 5
Works on paid products. On free products we are getting the following error:
"No class of content is loaded! To avoid critical error, proccess aborted"
To create the issue go here:
184.154.228.9/~throwdow/live/index.php?o...ent&id=10&Itemid=118
complete registration and purchase (free). Again purchases which are not free work fine.
Please Log in or Create an account to join the conversation.