Extra field in registration

This topic contains 5 reply and 2 voices, and was last updated by towhid 9 years, 4 months ago
Viewing 5 Posts - 1 through 5 (of 5 total)
Author Posts
July 6, 2015 at 6:58 am 54373
towhid I am trying to add in an (about us) text area to the settings page and show it on their shop... cannot find a way of doing this.. do you have an idea I took the code that you have posted and played with it... the problem I have I think is being able to show it on the store page.... what code do I use there..?
function endereco( $current_user, $profile_info ) {
$pv_local_pickup_enabled = isset( $profile_info['pv_local_pickup_enabled'] ) ? esc_attr($profile_info['pv_local_pickup_enabled']) : 'no';
$profile = isset( $profile_info['profile'] ) ? $profile_info['profile'] : '';
?>

<div class="gregcustom dokan-form-group">
<label class="dokan-w3 dokan-control-label" for="setting_address">
<?php _e( 'Local Pickup', 'dokan' ); ?>
</label>
<div class="dokan-w5">
<div class="checkbox">
<label>
<input name="pv_local_pickup_enabled" type="checkbox" id="pv_local_pickup_enabled" class="<?php echo 'id_' . $store_id; ?>" value="yes" <?php checked( $pv_local_pickup_enabled, 'yes' ); ?>/>
<?php
_e('Enable Local Pickup for the shop products', 'dokan');
?>
</label>
</div>
</div>
</div>
<div class="gregcustom dokan-form-group">
<label class="dokan-w3 dokan-control-label" for="setting_address"><?php _e( 'Profile', 'dokan' ); ?></label>
<div class="dokan-w5">
<input type="text" class="dokan-form-control input-md valid" name="profile" id="reg_profile" value="<?php echo $profile; ?>" />
</div>
</div>

<?php
}
add_filter( 'dokan_settings_after_banner', 'endereco', 10, 2);

/**
* Save the extra fields.
*
* @param  int  $customer_id Current customer ID.
*
* @return void
*/
function save_extra_endereco_fields( $store_id, $dokan_settings ) {

if (isset($_POST['pv_local_pickup_enabled'])) {
$dokan_settings['pv_local_pickup_enabled'] = $_POST['pv_local_pickup_enabled'];
}

if ( isset( $_POST['profile'] ) ) {
$dokan_settings['profile'] = $_POST['profile'];
}

update_user_meta( $store_id, 'dokan_profile_settings', $dokan_settings );
}

add_action( 'dokan_store_profile_saved', 'save_extra_endereco_fields', 10, 2 );
July 6, 2015 at 2:29 pm 54429
towhid towhid

Hello Paul,

I have already forwarded this issue to our developer team. Please allow me sometimes. Hope I will come back to you a right solution.

Thanks

July 7, 2015 at 11:15 am 54529
towhid towhid

Hello Paul,

add_action( 'dokan_store_profile_frame_after', 'show_field_value', 10, 2 );

function show_field_value($store_user, $store_info) {?>

extra field value: <?php echo $store_info['pv_local_pickup_enabled']; ?>
<?php }

——————————————–

put this code after that code.

July 8, 2015 at 4:54 am 54674
Paul Paul

OK added that and all it gave me was the fact that the box had been ticked..

so I added the following and it worked!

add_action( ‘dokan_store_profile_frame_after’, ‘show_field_value’, 10, 2 );

function show_field_value($store_user, $store_info) {?>

Store Profile


July 8, 2015 at 9:22 am 54686
Paul Paul

Thanks again for the code… have been playing with it and want to be able to change it to a text area instead of a textbox and it needs a WYSIWYG editor too… how would I add that in?

July 8, 2015 at 2:23 pm 54747
towhid towhid

Hello Paul,

To avail this kind of addition you have to customize the plugin. But I am really sorry to say that we do not provide any customization services. If you need this option very urgently you can hire a developer you can do the customization on your own if you know how to programming.

Thanks

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