Hello
I have update an addon called price-display-members-only to work on 1.0.8.6 and it's working well,
so I would like to add field to customers table (customer_approval) so when I approval customer the prices will display just, the customers who's not approved by me he will not see the prices ..
so there any idea how to do that
there is an add-on for member approval add on for responsive and I think it has not uploaded to old add-on site .. it has just shared on github.com
Member Approval Add On
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: Member Approval Add On
I might have misunderstood something, so sorry if my answer is not what you are asking.
In order to have a customer-aproval thing, I would think adding a new customer-data-module would be the way to go, and just make it show only in admin?
If that is the way to do it, I would probably also add a admin-dashboard-module to show new unaproved customers, to make sure not to miss any.
//Daniel
In order to have a customer-aproval thing, I would think adding a new customer-data-module would be the way to go, and just make it show only in admin?
If that is the way to do it, I would probably also add a admin-dashboard-module to show new unaproved customers, to make sure not to miss any.
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
-
Omar_one
- Senior Contributor
- Posts: 677
- Joined: Fri Oct 25, 2019 5:06 pm
- Phoenix Version: v1.0.8.16
- Has thanked: 100 times
- Been thanked: 56 times
Re: Member Approval Add On
Thank you @Kofod95
Sorry I didn't explain it good.
the Member Approval will show only in admin and the admin who's will approve it .
what I had done I update called Display Price for Login Members Only, so I would like to add some function to this module or having some hook that after the customers has approved the prices will display..
I can PM you the files or I can share it here..
I was thinking of disabling the Account Navbar module and who's want to be customer will contact us ... but this it's not good
Sorry I didn't explain it good.
the Member Approval will show only in admin and the admin who's will approve it .
what I had done I update called Display Price for Login Members Only, so I would like to add some function to this module or having some hook that after the customers has approved the prices will display..
I can PM you the files or I can share it here..
I was thinking of disabling the Account Navbar module and who's want to be customer will contact us ... but this it's not good
- Kofod95
- Senior Contributor
- Posts: 748
- Joined: Sat Feb 06, 2021 7:38 pm
- Phoenix Version: 1.0.8.20
- Has thanked: 99 times
- Been thanked: 179 times
Re: Member Approval Add On
I see - so now your prices show for those who are logged in only, and you would want to further restrict that to aproved customers only, right?
I would think that restriction could be added to the module hiding the price for guests - I guess you have a column in the customers_table telling whether they are aproved or not? Adding an if () that checks for that value before it shows/hides the price should then be possible. If not, I will gladly take a look at the file hiding the price for guests, and see if I can make something work
//Daniel
I would think that restriction could be added to the module hiding the price for guests - I guess you have a column in the customers_table telling whether they are aproved or not? Adding an if () that checks for that value before it shows/hides the price should then be possible. If not, I will gladly take a look at the file hiding the price for guests, and see if I can make something work
//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Here are a lot of corns: Phoenix user guide
-
Omar_one
- Senior Contributor
- Posts: 677
- Joined: Fri Oct 25, 2019 5:06 pm
- Phoenix Version: v1.0.8.16
- Has thanked: 100 times
- Been thanked: 56 times
Re: Member Approval Add On
Yes, just for approved customers.
I will try to add an if () and see if it's helping if not I will come back to you
Thank you for your help
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Member Approval Add On
If you have a customer data module for your approval, you could modify cm_login_form.php by changing to That would block login until approval.
Code: Select all
$customer_query = $GLOBALS['db']->query($customer_data->build_read(['id', 'password'], 'customers', ['email_address' => $email_address]) . ' LIMIT 1');
$customer_details = $customer_query->fetch_assoc();
if (!$customer_details) {
return false;
}Code: Select all
$customer_query = $GLOBALS['db']->query($customer_data->build_read(['id', 'password', 'approval'], 'customers', ['email_address' => $email_address]) . ' LIMIT 1');
$customer_details = $customer_query->fetch_assoc();
if (!$customer_details || !$customer_data->get('approval', $customer_details)) {
return false;
}-
Omar_one
- Senior Contributor
- Posts: 677
- Joined: Fri Oct 25, 2019 5:06 pm
- Phoenix Version: v1.0.8.16
- Has thanked: 100 times
- Been thanked: 56 times
Re: Member Approval Add On
Thank you @ecartz working well..ecartz wrote: ↑Sat Oct 16, 2021 8:19 pm If you have a customer data module for your approval, you could modify cm_login_form.php by changingtoCode: Select all
$customer_query = $GLOBALS['db']->query($customer_data->build_read(['id', 'password'], 'customers', ['email_address' => $email_address]) . ' LIMIT 1'); $customer_details = $customer_query->fetch_assoc(); if (!$customer_details) { return false; }That would block login until approval.Code: Select all
$customer_query = $GLOBALS['db']->query($customer_data->build_read(['id', 'password', 'approval'], 'customers', ['email_address' => $email_address]) . ' LIMIT 1'); $customer_details = $customer_query->fetch_assoc(); if (!$customer_details || !$customer_data->get('approval', $customer_details)) { return false; }