• Resolved gearya

    (@gearya)


    Hello,

    I am using Advanced Custom Fields to create product custom fields. I want when a vendor creates a product using Dokan for it to include the custom fields created. I have found various postings from searching, but nothing very informative for a new to WordPress user. Can someone explain what and where i would need to edit to add in the new custom fields created? An example would be a custom field called “UPC”. It is a required field and works great inside the standard WooCommerce add product. However, it doesn’t show up at all inside the Dokan Vendor create product form. I would like to add this and make it required. Can someone please help me? Thanks in advance….

    James

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @gearya,

    I am so sorry to say that Dokan is not officially integrated with the ACF plugin. In order to add a custom field on the add product and edit product form, you will need to modify the code. If you want the ACF plugin to work, you will need to integrate the plugin with Dokan.

    Unfortunately, we are unable to share custom code for your requirement cut I can help you with file location :

    wp-content/plugins/dokan-lite/templates/products/new-product-single.php

    /wp-content/plugins/dokan-lite/templates/products/new-product.php

    I hope this helps.

    Best Regards ??

    • This reply was modified 5 years, 5 months ago by roshni07.
    Thread Starter gearya

    (@gearya)

    Can you please tell me what plugin for custom fields Dokan IS integrated with? I am looking through the forum here and see this same question asked over and over about adding custom fields to Dokan. A quick answer here to reference about where a plugin is located that would achieve this would not only help me, but most likely help others in the future as well.

    Hello @gearya,

    I am so sorry to say that right now there is not third-party plugin integration for custom fields on Dokan. The following details may help you.

    You need to modify the Dokan product upload template and then you have to add an extra field by overriding the template. After adding the input filed you have to save the value of the field. On that place you have to use do_action( ‘dokan_new_product_added’, $product_id, $post_data ); this hook to save the field data.

    When you will edit the product that time you have to use do_action( ‘dokan_product_updated’, $post_id ); to re-save. As it is a custom development-related support for that reason, I am not authorized to provide more instruction.

    Hopefully, this will help you out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding Product Custom Field to Dokan Vendor Product Page’ is closed to new replies.