• Resolved lidiyam

    (@lidiyam)


    For registration Have to move the am a vendor and am a customer to top of the username in my account page .

Viewing 1 replies (of 1 total)
  • Hello @lidiyam,

    You will need to make a few changes. First of all, you need to override the mentioned template.

    \wp-content\plugins\dokan-lite\templates\global\seller-registration-form.php

    Please use a child theme so that you do not lose the change during the update.

    Comment out the radio buttons. You will get the button on line no: 62-73. SO comment out those code on your child theme.

    Then add the mentioned code on your child theme functions.php file:

    
    add_action( 'woocommerce_register_form_start', 'dokan_add_type_selection_form', 10 );
    
    function dokan_add_type_selection_form() {
        $postdata = wc_clean( $_POST ); // WPCS: CSRF ok, input var ok.
        $role = isset( $postdata['role'] ) ? $postdata['role'] : 'customer';
        $role_style = ( $role == 'customer' ) ? ' style="display:none"' : '';
        ?>
    
        <p class="form-row form-group user-role">
            <label class="radio">
                <input type="radio" name="role" value="customer"<?php checked( $role, 'customer' ); ?>>
                <?php _e( 'I am a customer', 'dokan-lite' ); ?>
            </label>
    
            <label class="radio">
                <input type="radio" name="role" value="seller"<?php checked( $role, 'seller' ); ?>>
                <?php _e( 'I am a vendor', 'dokan-lite' ); ?>
            </label>
            <?php do_action( 'dokan_registration_form_role', $role ); ?>
        </p>
    
        <?php
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Have to move the am a vendor and am a customer to top of the username’ is closed to new replies.