- Posts: 64
- Thank you received: 6
Manage Customer's Joomla Group from Hikashop
- Jokingmind
-
Topic Author
- Offline
Less
More
5 years 7 months ago #328999
by Jokingmind
Manage Customer's Joomla Group from Hikashop was created by Jokingmind
-- HikaShop version -- : 4.4.0
Hello.
A quick question: is it possible to add users to specific Joomla users groups from the hika component?
At the moment, the site add new users to "Private User" group; only after the owner of the site has checked the info added by customers in registration form fields he can decide to move him to the "Reseller" group. To do this, he must remember to go to Joomla Group Manager and change the level.
Is there a way to simplfy that process, that I've missed? Like setting an hidden custom field, that can be modified only by Owner, form hika component, that change the joomla group level too?
Thank you!
Hello.
A quick question: is it possible to add users to specific Joomla users groups from the hika component?
At the moment, the site add new users to "Private User" group; only after the owner of the site has checked the info added by customers in registration form fields he can decide to move him to the "Reseller" group. To do this, he must remember to go to Joomla Group Manager and change the level.
Is there a way to simplfy that process, that I've missed? Like setting an hidden custom field, that can be modified only by Owner, form hika component, that change the joomla group level too?
Thank you!
Please Log in or Create an account to join the conversation.
5 years 7 months ago #329009
by nicolas
Replied by nicolas on topic Manage Customer's Joomla Group from Hikashop
Hi,
It's possible.
You can create a custom user field of the table "user" so that the owner can select the group in that field and save the user.
Then, you can create mass actions on the table "user" with a trigger "after a user is updated", a filter on that custom field column being equal to the value you want, and an action "add user to user group".
That way, when that specific value is selected in the user, it will add it to the corresponding user group.
And repeat the mass action for each different user group you want to handle.
It's possible.
You can create a custom user field of the table "user" so that the owner can select the group in that field and save the user.
Then, you can create mass actions on the table "user" with a trigger "after a user is updated", a filter on that custom field column being equal to the value you want, and an action "add user to user group".
That way, when that specific value is selected in the user, it will add it to the corresponding user group.
And repeat the mass action for each different user group you want to handle.
Please Log in or Create an account to join the conversation.
- Jokingmind
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 6
5 years 7 months ago #329034
by Jokingmind
Replied by Jokingmind on topic Manage Customer's Joomla Group from Hikashop
Awesome!
Merci!
Now, just one more step.
At the moment we have 2 user_level values: customer and reseller.
Customer is the default one, but many of them have already been moved to reseller Joomla Group, instead the new field shows "customer".
If the owner update the client without changing the new custom field, the user is moved back to customers Joomla group, as I've made that action too, of course.
So I would like to create a new mass action that changes the user_level value based on real Joomla Group, so to sync everything.
I've made a new mass action that you can see in the attachements. It should be run just once.
But I get a MySql error.
Searching on forum I've found a previous post where you asks for detailed mysql error message.
Made that change in the database/exception/executing.php
I post the erorr in the attachments too. Hope it helps.
Thank you for your precious support.
Davide
Merci!
Now, just one more step.
At the moment we have 2 user_level values: customer and reseller.
Customer is the default one, but many of them have already been moved to reseller Joomla Group, instead the new field shows "customer".
If the owner update the client without changing the new custom field, the user is moved back to customers Joomla group, as I've made that action too, of course.
So I would like to create a new mass action that changes the user_level value based on real Joomla Group, so to sync everything.
I've made a new mass action that you can see in the attachements. It should be run just once.
But I get a MySql error.
Searching on forum I've found a previous post where you asks for detailed mysql error message.
Made that change in the database/exception/executing.php
I post the erorr in the attachments too. Hope it helps.
Thank you for your precious support.
Davide
Please Log in or Create an account to join the conversation.
5 years 7 months ago #329039
by nicolas
Replied by nicolas on topic Manage Customer's Joomla Group from Hikashop
Hi,
Looking at the MySQL error message, it seems that for some reason the alias of the table "hk_user" is translated to hk_livello for some reason.
However, I tried to run a similar mass action and I'm not able to reproduce the error.
So I must be missing something about your setup.
I think I'll need a backend access and a FTP access to check on the issue directly.
Could you provide that via our contact form ?
www.hikashop.com/support/contact-us.html
Looking at the MySQL error message, it seems that for some reason the alias of the table "hk_user" is translated to hk_livello for some reason.
However, I tried to run a similar mass action and I'm not able to reproduce the error.
So I must be missing something about your setup.
I think I'll need a backend access and a FTP access to check on the issue directly.
Could you provide that via our contact form ?
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
- Jokingmind
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 6
5 years 7 months ago #329061
by Jokingmind
Replied by Jokingmind on topic Manage Customer's Joomla Group from Hikashop
Hi
I've sent the email with the superuser and the FTP account.
Saving your account, a warning with a similar errore (hk_livello) is appeard on top.
You account is valid anyway, I could enter the site.
Meanwhile, this morning the owner noticed a wired behaviour.
Inside the client page some address table fields were missing. Vat number and pec address were not displayed anymore in the billing address.
I made a check on the test site too, where these fields are shown correctly.
The test site is a back up of last week; during this week I've made some modifications to the products page view, but nothing related to these values (vat and pec).
Long story short: after some hours of tries and errors I've found that on the live site I had to make these fields available to superuser too.
The wired thing is that on the test the superuser is unchecked and the fields are visible, you can see the parameters in the screenshots.
Thank you.
Davide
I've sent the email with the superuser and the FTP account.
Saving your account, a warning with a similar errore (hk_livello) is appeard on top.
You account is valid anyway, I could enter the site.
Meanwhile, this morning the owner noticed a wired behaviour.
Inside the client page some address table fields were missing. Vat number and pec address were not displayed anymore in the billing address.
I made a check on the test site too, where these fields are shown correctly.
The test site is a back up of last week; during this week I've made some modifications to the products page view, but nothing related to these values (vat and pec).
Long story short: after some hours of tries and errors I've found that on the live site I had to make these fields available to superuser too.
The wired thing is that on the test the superuser is unchecked and the fields are visible, you can see the parameters in the screenshots.
Thank you.
Davide
Please Log in or Create an account to join the conversation.
- Jokingmind
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 6
5 years 7 months ago #329086
by Jokingmind
Replied by Jokingmind on topic Manage Customer's Joomla Group from Hikashop
Hi,
don't consider the second part of previous mail.
I've never relized that ACL was involved in the visualization of data in admin too.
Sorry
Davide
don't consider the second part of previous mail.
I've never relized that ACL was involved in the visualization of data in admin too.
Sorry
Davide
Please Log in or Create an account to join the conversation.
5 years 7 months ago #329117
by nicolas
Replied by nicolas on topic Manage Customer's Joomla Group from Hikashop
Hi,
Thanks. I found the issue.
A mass action on the user data with an action "update the values" on a column from a custom field not starting with "user_" would generate a fatal error.
And of course, on my local test environment I was testing with a custom field with a column name starting with "user_" and thus it worked fine.
I've added the patch via FTP on your website and confirmed it fixed the problem.
We'll also add the patch on our end for future versions of HikaShop.
Thanks. I found the issue.
A mass action on the user data with an action "update the values" on a column from a custom field not starting with "user_" would generate a fatal error.
And of course, on my local test environment I was testing with a custom field with a column name starting with "user_" and thus it worked fine.
I've added the patch via FTP on your website and confirmed it fixed the problem.
We'll also add the patch on our end for future versions of HikaShop.
Please Log in or Create an account to join the conversation.
- Jokingmind
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 6
5 years 7 months ago #329127
by Jokingmind
Replied by Jokingmind on topic Manage Customer's Joomla Group from Hikashop
Hi!
Very good job!
As you were on my test environment I'll need to add the patch to live site too. Backup and restore on live site is not the best solution as I'll have to back up orders, clients and so on, as this two sites are already unsync.
That's not a big problem if you're planning to release the patched verion soon.
Any idea about that timing?
Thank you.
Davide
Very good job!
As you were on my test environment I'll need to add the patch to live site too. Backup and restore on live site is not the best solution as I'll have to back up orders, clients and so on, as this two sites are already unsync.
That's not a big problem if you're planning to release the patched verion soon.
Any idea about that timing?
Thank you.
Davide
Please Log in or Create an account to join the conversation.
5 years 7 months ago #329131
by nicolas
Replied by nicolas on topic Manage Customer's Joomla Group from Hikashop
Hi,
I've added the patch as a hot fix on the current release.
So you can download the install package of the latest version of Hikashop on our website and install it on yours to get the patch.
I've added the patch as a hot fix on the current release.
So you can download the install package of the latest version of Hikashop on our website and install it on yours to get the patch.
Please Log in or Create an account to join the conversation.
- Jokingmind
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 6
5 years 7 months ago #329194
by Jokingmind
Replied by Jokingmind on topic Manage Customer's Joomla Group from Hikashop
Hi!
I've run a test on my local enviornment. It works as intended but I've recieved a message at the end.
Maybe I've made something wrong with the action rules or maybe is just a message.
I attach both files (message and config), can you please confirm I've not made a mistake.
Thank you
I've run a test on my local enviornment. It works as intended but I've recieved a message at the end.
Maybe I've made something wrong with the action rules or maybe is just a message.
I attach both files (message and config), can you please confirm I've not made a mistake.
Thank you
Please Log in or Create an account to join the conversation.
5 years 7 months ago #329218
by nicolas
Replied by nicolas on topic Manage Customer's Joomla Group from Hikashop
Hi,
Thank you for your feedback. It's another small bug. No worries.
I've added a patch for it.
So you can download again the install package of the latest version of Hikashop on our website and install it on yours to get the patch.
Thank you for your feedback. It's another small bug. No worries.
I've added a patch for it.
So you can download again the install package of the latest version of Hikashop on our website and install it on yours to get the patch.
The following user(s) said Thank You: Jokingmind
Please Log in or Create an account to join the conversation.
- Jokingmind
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 6
5 years 7 months ago #329248
by Jokingmind
Replied by Jokingmind on topic Manage Customer's Joomla Group from Hikashop
Perfect, live site updated! No errors.
Thank you!
Thank you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.217 seconds