This topic contains 1 reply and 2 voices, and was last updated by Nayem 3 years, 11 months ago
Viewing 1 Posts - 1 through 1 (of 1 total)
Author Posts
September 20, 2015 at 10:39 pm 72638
Nayem Hi, I need to have terms and conditions for my vendors. I copied the code and filled in my url. But it still does not show up. Did I do something wrong? "Add terms and condition field in registration form The registration form is coming from WooCommerce, but we have added some extra fields in the registration form for the seller using the WooCommerce functions. To add more fields to the registration fields, you have to open template-tags.php which is located inside \wp-content\plugins\dokan-plugin\includes\ and go to line number 346. You will see a function named dokan_seller_reg_form_fields() all the extra fields are located inside that function. We will add our checkbox for terms and conditions in the bottom of the form. So we will go to line number 385 and paste the following code. 1 2 3 4

Here we have used the built in browser validation to check if the user has checked the box or not. We did not use any PHP code as we do not need to store any data. So only browser validation is enough. We have used # as hyperlink reference placeholder. You have to use the URL of your terms and conditions page. After placing the codes on the template-tags.php file, just hit save and reload your registration page. You will get to see a new checkbox with a link to your terms and conditions page. Terms and Conditions field" Thank you so much
September 21, 2015 at 10:43 am 72670
Nayem Nayem

Hello,

You can add this terms and condition through child theme function.php file. You have to paste those codes into the function file of your child theme-

add_action( 'dokan_seller_registration_field_after','terms_condition' ); 

function terms_condition(){
?>
<p class="form-row form-group form-row-wide">
<label><input name="terms" required="" type="checkbox" value="checked" />
I agree to the <a href="#">terms and conditions</a><span class="required">*</span></label>
</p>

<?php
}

Thanks.

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