January 6, 2015 at 6:29 am 33428
|Nayem||Hi, How can I get rid of the part of the registration page where each new user has to choose whether they are a seller or a customer? I have already made it so that every new user is a seller by default and that they automatically are able to sell. But I still need to get rid of the actual part of the registration page where it asks them to choose. Thanks.|
January 6, 2015 at 3:38 pm 33456
Please open Dokan-plugin/includes/template-tags.php. In line number 347 you will see this code
Thank you 🙂
January 8, 2015 at 10:13 am 33625
Hi Nayem, thanks for the help!
Nizam gave me the following code to put in functions.php in my child theme:
add_filter( ‘woocommerce_new_customer_data’, ‘gabe_new_user_data’ );
Would this conflict with the code you gave me?
January 9, 2015 at 3:45 pm 33708
I think my given code will not conflict with this code you have provided.
Yes you are right. If you do customization in main file then it will be lost after updating the plugin. You have to customize in a child theme because child theme is safe. You have to change those code in your child theme. If you can provide your ftp details then i can change this for you.
Please provide your login details by using this form- http://wedevs.com/provide-login-details/ and also provide your ftp details here in a private reply.
Thank you 🙂
January 10, 2015 at 6:26 am 33752
Thanks for the offer!
I’m actually trying to teach myself programming so I try to do as much as I can myself. Even if it is just entering code that people give me or that I find online.
Do I just put the codes that you gave me into the child theme functions.php? Or would I have to enter in new code? I’m not too sure about how I would be able to comment out the “customer/seller” fields (lines 393-404) in the registration page through customizing the child theme.
How do you stop the original code from overriding the new child theme code?
January 11, 2015 at 11:53 am 33807
I think giving instruction is not easy for this. But i can provide you some step to do this. Hope it will help you.
You have use remove_action in your child theme’s function.php . You have to remove the action of that function which contains those code for this registration filed. First of all in the child theme function.php – you have to use remove_action then you have to use a new add_action then you have to create a new function then in this function you can do whatever you want to do to customize. You can also read this to know more how to modify parent file by child theme- http://code.tutsplus.com/tutorials/how-to-modify-the-parent-theme-behavior-within-the-child-theme–wp-31006.
Thank you 🙂
January 21, 2015 at 1:27 am 34652
Was trying to change the fields that you said. Should I also change the second line?
$role = isset( $_POST[‘role’] ) ? $_POST[‘role’] : ‘customer’;
Should I change
Also, if I comment out lines 393-404, will that cause any trouble later on? It seems from the code that Dokan needs that info for Seller info. If I comment that out, will it be missing seller info (first name, last name, address, etc)?
Is there a way that I can have all this information as a part of registration, but above the rest of the registration fields?
Thanks again for all the help, Nayem.
January 21, 2015 at 11:23 am 34685
You have to comment out this line
Please check after doing your customization. It will work.
Thank you 🙂
February 4, 2015 at 8:42 am 35683
February 4, 2015 at 10:20 am 35685
I am very glad to know that. I am marking this topic as resolved.
Thank you 🙂
February 5, 2015 at 8:36 am 35805
I tried to to use the Child theme again and see if I could remove the registration field and then add in new ones like you said.
In my functions.php of my child theme I typed in the following (to try to first remove the function):
remove_action( ‘woocommerce_register_form_start’, ‘dokan_seller_reg_form_fields’ );
This didn’t work.
Can you tell me what I did wrong?
February 5, 2015 at 10:55 am 35837
1. You have to remove this action-
Please check and let me know. Thank you 🙂
June 4, 2015 at 1:00 am 46054
Najem , how are you , I , like Gabriel , I want you on record , only to be directly to vendors and not as it now appears , could help to add functions to file child?
And you can add city field?
I want that when people enter , they see only the products and shops in the city they choose
June 4, 2015 at 3:56 pm 46111
We are working on a feature – Radius search. Customer will be able to search nearby seller from their own location. This feature will be available in near future release. Please keep patience.