• Resolved Najm

    (@gcsaudi)


    Hi there,

    #1 Can I restrict users from choosing their URL slug, and instead their store url would be the same as their username?

    Also

    #2 Is it possible to only show ( I am vendor ) option during registration and force all signups to be vendors.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @gcsaudi

    Thank you for reaching us.

    #1. Make a copy of this file – dokan-lite/templates/global/seller-registration-form.php

    Then remove line #28-33 and save the modified file in your-your_child_theme/dokan/global/ folder with exactly the same way.

    That will remove the store URL but the URL will be detected automatically from the username.

    #2. To set the vendor registration form by default you will need to add the below code on your child theme’s function.php file.

    //Make seller registration form selected by default
    remove_action( 'woocommerce_register_form', 'dokan_seller_reg_form_fields' );
    add_action( 'woocommerce_register_form', 'dokan_seller_reg_form_fields_modified',11 );
    
    function dokan_seller_reg_form_fields_modified() {
        $postdata = wc_clean( $_POST );
        $role = isset( $postdata['role'] ) ? $postdata['role'] : 'seller';
        $role_style = ( $role == 'customer' ) ? 'display:none' : '';
    
        dokan_get_template_part( 'global/seller-registration-form', '', array(
            'postdata' => $postdata,
            'role' => $role,
            'role_style' => $role_style
        ) );
    }

    After that add the below custom CSS on the Admin Dashboard > Appearance > Customize > Additional CSS,

    #register p.form-row.form-group.user-role.vendor-customer-registration {
        display: none !important;
    }

    I believe the ablve information will help you.

    Best Regards!

    Hello,
    I believe you are doing well,

    As you haven’t replied for a long, I’m considering that you have got the solution and I’m also resolving this topic.

    But feel free to create another one anytime.

    Thread Starter Najm

    (@gcsaudi)

    Am Sorry I think the first reply notification went to the spam folder.

    Thank you for your reply,

    #1 It actually disabled ( first name, Last name, store name, and phone number ) fields. So users are not able to register.

    #2 It made the default as vendor, but buyer option still shows.

    Thread Starter Najm

    (@gcsaudi)

    For #1:

    If I click, am a buyer, then go back to I am a vendor, it will enable the fields again.

    • This reply was modified 2 years, 11 months ago by Najm.

    Hello @gcsaudi

    If you do not add the mentioned custom CSS then the radio button sections won’t hide. So, ensure you use that custom CSS on the Additional CSS section to hide the radio button from the registration page.

    Moreover, if you remove any required fields from the seller registration filed then you must unset them via your child theme’s function.php. Otherwise, users will get errors.

    Additionally, I should not share any custom solutions as per our support policy. Still, I have provided a solution to help you. But if you face any further issues or need any further modifications then I am afraid that I will not be able to help you any further. I believe you can understand that.

    Stay Safe!

    Thread Starter Najm

    (@gcsaudi)

    @shafinahmad01
    Thank you!

    As a matter of fact, I have added the css in the additional css field on ( customize ) tab of my wordpress. I have also tried to put it in the theme additional css, but it still not worked.

    I do understand, I really appreciate your effort to help, even tho it was out of your free support.

    Thanks again, and again.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Disable Stores URLs and Customers Singups.’ is closed to new replies.