Home Forums Plugin Support Others Dokan Dashboard (Customer and Seller integration)

This topic contains 7 replies, has 2 voices, and was last updated by  Nayem 3 years, 11 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #51782

    jacky wong
    Member
    Post count: 100

    Hi,

    I have noticed that only seller can use the Dokan dashboard. Is there anyway to get rid of the “I am a customer” or “I am a seller” in the registration page and allow all members to use the same dashboard? Thank you for your help.

    Regards
    Jacky

    #51785

    Nayem
    Moderator
    Post count: 6480

    Hello,

    I am really sorry to say that it is not possible. Seller dashboard is visible only for the seller. Customer will not be able to see seller dashboard.

    Thanks.

    #51813

    jacky wong
    Member
    Post count: 100

    Hi Nayem,

    Thank you for your prompt reply. Is it possible to disable customer registration and set seller registration as default? Like ebay, once you registered, you can buy or sell and use the dashboard regardless of being a seller or customer. I think this is more user friendly and would encourage more members to sell.

    Regards
    Jacky

    #51820

    Nayem
    Moderator
    Post count: 6480

    Hello,

    Yes, It is possible. You can hide the customer option. You have to edit some code. Please open Dokan plugin/includes/template-tags.php. In this file you will get those code.

    Thanks.

    #51839

    jacky wong
    Member
    Post count: 100

    Hi

    Could you be more specific as to what need to be changed in that file? As i m not a programmer. Your help would be much appreciated. Thanks

    Regards
    Jacky

    #51946

    Nayem
    Moderator
    Post count: 6480

    Add those code in your child theme function.php file-

    [php]

    remove_action(‘register_form','dokan_seller_reg_form_fields');

    function seller_reg_form_fields(){

    $role = isset( $_POST[‘role'] ) ? $_POST[‘role'] : ‘seller';
    $role_style = ( $role == ‘customer' ) ? ‘ style="display:none"' : ”;
    ?>
    <div class="show_if_seller"<?php echo $role_style; ?>>

    <div class="split-row form-row-wide">
    <p class="form-row form-group">
    <label for="first-name"><?php _e( ‘First Name', ‘dokan' ); ?> <span class="required">*</span></label>
    <input type="text" class="input-text form-control" name="fname" id="first-name" value="<?php if ( ! empty( $_POST[‘fname'] ) ) echo esc_attr($_POST[‘fname']); ?>" required="required" />
    </p>

    <p class="form-row form-group">
    <label for="last-name"><?php _e( ‘Last Name', ‘dokan' ); ?> <span class="required">*</span></label>
    <input type="text" class="input-text form-control" name="lname" id="last-name" value="<?php if ( ! empty( $_POST[‘lname'] ) ) echo esc_attr($_POST[‘lname']); ?>" required="required" />
    </p>
    </div>

    <p class="form-row form-group form-row-wide">
    <label for="company-name"><?php _e( ‘Shop Name', ‘dokan' ); ?> <span class="required">*</span></label>
    <input type="text" class="input-text form-control" name="shopname" id="company-name" value="<?php if ( ! empty( $_POST[‘shopname'] ) ) echo esc_attr($_POST[‘shopname']); ?>" required="required" />
    </p>

    <p class="form-row form-group form-row-wide">
    <label for="seller-url" class="pull-left"><?php _e( ‘Shop URL', ‘dokan' ); ?> <span class="required">*</span></label>
    <strong id="url-alart-mgs" class="pull-right"></strong>
    <input type="text" class="input-text form-control" name="shopurl" id="seller-url" value="<?php if ( ! empty( $_POST[‘shopurl'] ) ) echo esc_attr($_POST[‘shopurl']); ?>" required="required" />
    <small><?php echo home_url(); ?>/store/<strong id="url-alart"></strong></small>
    </p>

    <p class="form-row form-group form-row-wide">
    <label for="seller-address"><?php _e( ‘Address', ‘dokan' ); ?><span class="required">*</span></label>
    <textarea type="text" id="seller-address" name="address" class="form-control input" required="required"><?php if ( ! empty( $_POST[‘address'] ) ) echo esc_textarea($_POST[‘address']); ?></textarea>
    </p>

    <p class="form-row form-group form-row-wide">
    <label for="shop-phone"><?php _e( ‘Phone', ‘dokan' ); ?><span class="required">*</span></label>
    <input type="text" class="input-text form-control" name="phone" id="shop-phone" value="<?php if ( ! empty( $_POST[‘phone'] ) ) echo esc_attr($_POST[‘phone']); ?>" required="required" />
    </p>

    <?php do_action( ‘dokan_seller_registration_field_after' ); ?>

    </div>
    <div class="dokan-new-field-wrap" style="display: none;">
    <?php do_action( ‘dokn_aditional_relation_filed' ); ?>
    </div>

    <p class="form-row form-group user-role">

    <label class="radio">
    <input type="radio" name="role" value="seller"<?php checked( $role, ‘seller' ); ?>>
    <?php _e( ‘I am a seller', ‘dokan' ); ?>
    </label>
    <?php do_action( ‘dokan_registration_form_role', $role ); ?>
    </p>

    <?php

    }
    add_action(‘register_form','seller_reg_form_fields');

    [/php]

    #53348

    jacky wong
    Member
    Post count: 100

    hi

    i have added this php to the theme function php. However it doesn't work and whole website is dead with an error message. I have tried many times but still cant fix this. Can you please advise? Thank you for your help.

    regards
    Jacky

    #53349

    Nayem
    Moderator
    Post count: 6480

    Hello Jacky,

    Find this function- function seller_reg_form_fields() in Dokan->inlcudes->template.php file. Now you have to remove the action as i have removed. You have to do the rest with your own way.

    Thanks.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Dokan Dashboard (Customer and Seller integration)’ is closed to new replies.