The default registration form (which is next to login form) altered by b2bking doesn't send attachments. If a person selects wholesaler account type, and fills out all info - attaches file. Admin doesn't receive that file (it is non existent)
For more context we also use forminator (atleast planned to before b2bking) and it's forms send attachments as they should, with no issues. (The problem with forminator in this case, is that it doesn't send custom emails depending on the approval conditions)
Also if user creates not good enough password, registration button doesn't do anything (that is understandable, but no notice about wrongfully created password comes up, which confuses the user)
Regarding the file upload issue - as a first step, could you please check your WordPress Media Library (Media page in the WordPress backend) to see if you can locate the uploaded file there? Sometimes what happens is that the file gets uploaded correctly but there's an issue with the download process. If you can confirm whether the file is visible in the Media Library, we can determine the next steps - there are some code snippets we can use to set up a different download process if needed.
About the registration button and password strength - B2BKing actually doesn't control this functionality, as it's part of your theme and the standard WooCommerce password strength settings. I checked your site and can see the "password not strong enough" message area here: https://prnt.sc/xeolQ8InOQV3
If it would help I believe I can assist with a custom code snippet that would show a visible alert when users click the button with an insufficiently strong password, letting them know they need to strengthen their password. Would that help here?
Yes it is there and I think it is being sent as intended. Actually maybe it was me who messed up and didn't attach anything the first time, even though I am certain I did. But also I was also regarding emails (as I can see they do not carry the file, I was expecting they do - as in comparison with forminator)
If you could write a custom snippet for that, that would be great! (please keep in mind our /my-account/ slug is /paskyra/ if that is important.
On the other hand we need your help for a correct workflow/logic regarding this wholesaler registration/approval process:
Our intended setup:
Wholesalers as "Professionals": When a professional registers for an account, we get email, with link to that users backend page - we review their certificate, assign them a "manager" based on their city and approve the account by changing role to b2b group via b2bking field. Note: This "manager" is purely informational—used to display his contact details in the b2B user's dashboard and sent via email when the account is approved.
Problem: The manager assignment is was initially designed to be done using ACF Pro fields, which display in the admin backend (users page) as a dropdown for users with the 'Profesionalas' role. However after adding B2BKing, b2b and b2c users are handled differently and by default, when users are in the approval stage (of registration), their role is automatically set to 'B2C' (and we cannot change that). Thus we are having a problem of displaying the dropdown selector for manager. And we notice that some of the functions, like approval emails, are already built into B2BKing.
The issue:
Manager Assignment on Pending Accounts: How can we make the custom dropdown field for assigning a manager visible on the admin page for pending B2B accounts (who are still marked as B2C before approval) so that it would be intuitive to use and for the approved email purposes?
Email Integration: How can we integrate the assigned manager’s contact information into the approval email sent by B2BKing when a B2B registration is approved?
Currently no custom email solution was created, only the custom selector for manager (kliento_vadybininke) and code to display assigned managers info in my-account dashboard (this is the code, with a bit redacted manager info and for test purposes targeted roles are admin and regular customer (instead of b2b user)):
add_action('woocommerce_account_dashboard', 'custom_dashboard_content');
function custom_dashboard_content() { $current_user = wp_get_current_user();
if (in_array('customer', $current_user->roles) || in_array('administrator', $current_user->roles)) {
$kliento_vadybininke = get_field('kliento_vadybininke', 'user_' . $current_user->ID);
if ($kliento_vadybininke) { echo '<div class="custom-dashboard-content">';
switch ($kliento_vadybininke) {
case 'Pasirinkti...': echo '<h2>Jūsų vadybininkė</h2>'; echo '<p>Jums vadybininkė dar nepriskirta.</p>'; echo '<p>Jeigu po registracijos praėjo daugiau, kaip 4 d.d. Prašome susisiekti su mumis.</p>'; break;
case 'Beatričė': echo '<h2>Jūsų vadybininkė</h2>'; echo '<p>Beatričė</p>'; echo '<p>Tel</p>'; echo '<p>El. Paš</p>'; echo '<p>Pagrindinė būveinė</p>'; break;
case 'Laima': echo '<h2>Jūsų vadybininkė</h2>'; echo '<p>Laima</p>'; echo '<p>Tel</p>'; echo '<p>El. Paš</p>'; echo '<p>Pagrindinė būveinė</p>'; break;
default: echo '<p>Jums vadybininkė dar nepriskirta. Prašome susisiekti su mumis.</p>'; echo '<p>Jeigu po registracijos praėjo daugiau, kaip 4 d.d. Prašome susisiekti su mumis.</p>'; break; }
echo '</div>'; } } }
Regarding email attachments: The emails currently do not support attached files. This would require customizing the email templates by editing the .php files. While attaching actual files is challenging, you could include a link to the file on your website backend instead.
To clarify - which specific email would you like to include the file in? Is it the notification B2BKing sends to the site admin when a new customer requires approval?
Regarding manager contact information: I understand you want to integrate the assigned manager's contact information into the approval email sent to customers when their B2B registration is approved.
This requires customizing the email template for the account approval notification. Here's how to customize the template:
1. Navigate to: wp-content/plugins/b2bking/includes/emails/templates/
2. Copy the "your-account-approved-email-template.php" file
3. Paste it into your theme folder (e.g., wp-content/themes/storefront/ or preferably your child theme folder)
4. Modify the PHP template to include the manager info
As mentioned in our other ticket discussion about implementing a manager dropdown during the approval process, you should be able to access the selected value in this PHP email template using $_POST['salesagent']. For more general information on customizing B2BKing email templates, please refer to: https://woocommerce-b2b-plugin.com/docs/how-to-customize-b2bking-emails/#3-toc-title
Hello,
The default registration form (which is next to login form) altered by b2bking doesn't send attachments. If a person selects wholesaler account type, and fills out all info - attaches file. Admin doesn't receive that file (it is non existent)
For more context we also use forminator (atleast planned to before b2bking) and it's forms send attachments as they should, with no issues. (The problem with forminator in this case, is that it doesn't send custom emails depending on the approval conditions)
Also if user creates not good enough password, registration button doesn't do anything (that is understandable, but no notice about wrongfully created password comes up, which confuses the user)
Hi Dovydas,
Glad to assist,
Regarding the file upload issue - as a first step, could you please check your WordPress Media Library (Media page in the WordPress backend) to see if you can locate the uploaded file there? Sometimes what happens is that the file gets uploaded correctly but there's an issue with the download process. If you can confirm whether the file is visible in the Media Library, we can determine the next steps - there are some code snippets we can use to set up a different download process if needed.
About the registration button and password strength - B2BKing actually doesn't control this functionality, as it's part of your theme and the standard WooCommerce password strength settings. I checked your site and can see the "password not strong enough" message area here: https://prnt.sc/xeolQ8InOQV3
If it would help I believe I can assist with a custom code snippet that would show a visible alert when users click the button with an insufficiently strong password, letting them know they need to strengthen their password. Would that help here?
Kind regards,
Stefan
Hello Stefan,
Yes it is there and I think it is being sent as intended. Actually maybe it was me who messed up and didn't attach anything the first time, even though I am certain I did. But also I was also regarding emails (as I can see they do not carry the file, I was expecting they do - as in comparison with forminator)
If you could write a custom snippet for that, that would be great! (please keep in mind our /my-account/ slug is /paskyra/ if that is important.
On the other hand we need your help for a correct workflow/logic regarding this wholesaler registration/approval process:
Our intended setup:-
-
The issue:Wholesalers as "Professionals": When a professional registers for an account, we get email, with link to that users backend page - we review their certificate, assign them a "manager" based on their city and approve the account by changing role to b2b group via b2bking field. Note: This "manager" is purely informational—used to display his contact details in the b2B user's dashboard and sent via email when the account is approved.
Problem: The manager assignment is was initially designed to be done using ACF Pro fields, which display in the admin backend (users page) as a dropdown for users with the 'Profesionalas' role. However after adding B2BKing, b2b and b2c users are handled differently and by default, when users are in the approval stage (of registration), their role is automatically set to 'B2C' (and we cannot change that). Thus we are having a problem of displaying the dropdown selector for manager. And we notice that some of the functions, like approval emails, are already built into B2BKing.
Manager Assignment on Pending Accounts: How can we make the custom dropdown field for assigning a manager visible on the admin page for pending B2B accounts (who are still marked as B2C before approval) so that it would be intuitive to use and for the approved email purposes?
Email Integration: How can we integrate the assigned manager’s contact information into the approval email sent by B2BKing when a B2B registration is approved?
Currently no custom email solution was created, only the custom selector for manager (kliento_vadybininke) and code to display assigned managers info in my-account dashboard (this is the code, with a bit redacted manager info and for test purposes targeted roles are admin and regular customer (instead of b2b user)):
Hi again,
Regarding email attachments: The emails currently do not support attached files. This would require customizing the email templates by editing the .php files. While attaching actual files is challenging, you could include a link to the file on your website backend instead.
To clarify - which specific email would you like to include the file in? Is it the notification B2BKing sends to the site admin when a new customer requires approval?
Regarding manager contact information: I understand you want to integrate the assigned manager's contact information into the approval email sent to customers when their B2B registration is approved.
This requires customizing the email template for the account approval notification. Here's how to customize the template:
1. Navigate to: wp-content/plugins/b2bking/includes/emails/templates/
2. Copy the "your-account-approved-email-template.php" file
3. Paste it into your theme folder (e.g., wp-content/themes/storefront/ or preferably your child theme folder)
4. Modify the PHP template to include the manager info
As mentioned in our other ticket discussion about implementing a manager dropdown during the approval process, you should be able to access the selected value in this PHP email template using $_POST['salesagent']. For more general information on customizing B2BKing email templates, please refer to: https://woocommerce-b2b-plugin.com/docs/how-to-customize-b2bking-emails/#3-toc-title