change first name and last name to company name

This topic contains 7 reply and 2 voices, and was last updated by towhid 8 years, 11 months ago
Viewing 7 Posts - 1 through 7 (of 7 total)
Author Posts
May 12, 2015 at 12:45 pm 43688
towhid how do i replace change first name and last name to company name in the seller registration form
May 12, 2015 at 12:53 pm 43691
towhid towhid

Hello Obiora,

If you change the two filed into a one filed and for this you need customization.

Here is the code of change the first name and last name field:

Please navigate to dokan-plugin/includes/template-tags.php and find below lines of code and change whatever you want

<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>

Thank you 🙂

May 12, 2015 at 1:46 pm 43694
obiora obiora

it changed in the form.. but in account (edit details) it still shows first name and last name.
how do i rename it there thank you

May 12, 2015 at 2:25 pm 43705
towhid towhid

Please open plugins/woocommerce/templates/myaccount/form-edit-account.php find below lines of code and change whatever you want.

<p class="form-row form-row-first">
		<label for="account_first_name"><?php _e( 'First name', 'woocommerce' ); ?> <span class="required">*</span></label>
		<input type="text" class="input-text" name="account_first_name" id="account_first_name" value="<?php echo esc_attr( $user->first_name ); ?>" />
	</p>
	<p class="form-row form-row-last">
		<label for="account_last_name"><?php _e( 'Last name', 'woocommerce' ); ?> <span class="required">*</span></label>
		<input type="text" class="input-text" name="account_last_name" id="account_last_name" value="<?php echo esc_attr( $user->last_name ); ?>" />
	</p>

Thank you 🙂

May 12, 2015 at 3:40 pm 43741
obiora obiora

done that. the last place is on the account migration form
for a customer wanting to become a seller. thank you

May 12, 2015 at 3:53 pm 43746
towhid towhid

Please navigate to dokan-plugin/includes/template-tags.php and find below lines of code and change whatever you want
<a href="<?php echo dokan_get_page_url( 'myaccount', 'woocommerce' ); ?>account-migration/seller/" class="button button-primary"><?php _e( 'Become a Seller', 'dokan' ); ?></a>

Thank you 🙂

May 12, 2015 at 4:00 pm 43749
obiora obiora

i meant that the first name last name does not obey the above changes at the migration form where the customer wants to become a seller.

May 12, 2015 at 4:10 pm 43751
towhid towhid

Please navigate to dokan-plugin/templates/update-account.php and find below lines of code and change whatever you want

<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( $f_name ) ) echo esc_attr( $f_name ); ?>" 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( $l_name ) ) echo esc_attr( $l_name ); ?>" required="required" />
            </p>

Thank you 🙂

Viewing 7 Posts - 1 through 7 (of 7 total)