How to Add Extra Field on Vendor Settings Page

As a marketplace owner, you may always try to provide the best service to your vendor with the proper functionality. If you are trying to work out of the box to make your marketplace more resourceful, then you should try to expand your default functionality. You may already know – a plugin would not complete your 100% requirement because we believe you are a good thinker and idea generator.

Dokan Multivendor Plugin always helps you to apply your own thinking. Today, we will try to show one example how you can expand things on Dokan plugin with some external code. Dokan allows a vendor to manage their own store with their own information such as address, store banner image, profile image etc.

Now, sometime you can get requests from vendors to add a new field where they would be able to insert their own website URL and they might want to show it on their store banner.

We know that website URL field is not available in the vendor settings panel. Now, you might be thinking that how you can add an extra field on the vendor settings area.

No need to worry! weDevs always try to provide external resource/code to the customers like you so that you can make your marketplace as you want.

Adding Extra Field in Vendor Settings Area

You can easily add extra field on the vendor settings area. Also, you can show the field value on the store banner. We will use some action/hook to do this entire process. It would be very easy for you. Just you have to follow my instruction.

What Would You Need to do this?

1. Dokan-lite v2.7.3 (If you are a Dokan lite user then this will also help you)
2. Install a child theme ( If you do not have any child theme then create a child theme with this plugin)

You have to do the entire process through your child theme. Ask me why? Because child theme is safe to override any plugin template file or function. When you will update your parent plugin or theme that time you would not lose your custom code.

So, if you have installed and activated your child theme then paste the below code into your child theme's `functions.php` file.

After saving the code just check your vendor dashboard/settings page. You will see that there is a new field called “Website” on the settings page.

Now, if you insert and save your website URL on the field then it will show on the vendor store page like below :

If you want to add any text then you can also do that. Just follow the example and process, you will be able to add any field or text this way.

We are always open to help you out. If you need any assistance or have further query, please comment and we promise we will get back to you.

14 Comments

  • DUNG LE

    DUNG LE

    I am using DOkan. I have problem when I add new product and save. But It is not display on the product list. So, which it is already stored in data.
    Other case, When I delete product in the product’s list, it show success’s report board. But I am reload product’s list, it also show this product while I check in the data, it already deleted.

  • Christopher

    Christopher

    It doesn’t work on my site. I tried adding the code but the vendor dashboard/setting will return a blank page.

  • Christopher

    Christopher

    It doesn’t work on my site. I tried adding the code but the vendor dashboard/setting will return a blank page.

    • Nayem

      Nayem

      Hello Christopher,

      This blog post is a sample to show how it should work with necessary filter/hook. So, if it is not working on your website then you should debug the code. I understand that some theme has changed the store header template to be compatible with their theme. So, for some user, it would not work for the first time.
      If you need any help then you can contact our support. They will help you to provide more details 🙂

      • Munzir

        Munzir

        Hello sir, when I try this code, it works fine, but this code affect the payment setting page, when I press update on payment setting page, the setting field is gone. Can you check thank you.

        • Nayem

          Nayem

          Hello Munzir,

          This is a custom code sample to show how you can add a field. Now, if it is not working that means there is something wrong. Would you please create a support ticket so that our team can assist you?

          Thanks!

  • aarush2046

    aarush2046

    Hello

    It will not show the field at the backend. If i update the code in admin-user-profile.php. Payment and social profile is stored properly. Please give me the sollution.

    Thanks

  • Kels

    Kels

    Hi,

    How do I remove Field from the vendor settings page?

    Thanks

    • Nayem

      Nayem

      Hello Kels,

      You may need to modify on dokan-lite/templates/settings/store-form.php file 🙂 For any technical help, you can create a support ticket to us. Our team will help you for sure.

  • aarush2046

    aarush2046

    Hello

    When i use this code. I am unable to update the payment method. Can you provide some other option. Your code is not working now.

    Thanks

    • Nayem

      Nayem

      Hello Arush,

      You have created a ticket already and our support staff is dealing this matter with you. Please remember that the code is a sample process with Dokan theme. If you are using a different theme then you may need to do some tweak on the code. The main focus of the code was the available filter/hook to use for adding an extra field. I hope you can debug and solve your problem 🙂

  • jorge1

    jorge1

    Hello, your code works very well, but if I want to add a field in the new product registration form?

  • Sourav Majumdar

    Sourav Majumdar

    I am not able to modify the seller-setup-wizard.php files from child theme. Please help me out here

  • Kevin

    Kevin

    I think that is a ridiculously complicated way to add a field to a page setting. It’s not how ACF, Pods, Metabox or any of the other custom field plugins do it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.