• Resolved Caridor

    (@shaar7)


    Hello,

    Kindly I need to add more fields to the product edit page for the vendor dashboard but I don’t want it to appear to customers.

    For example, need to add a field for note for himself.

    how i can do it or if there PHP code to add.

    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @shaar7

    If you want to add a new field to the product upload form (popup/non-popup) then you can use the below-mentioned hook.
    add_action( 'dokan_new_product_after_product_tags','your_custom_function',10 );
    After that, you will need to use another hook that is mentioned below to save the data in order to edit and update it further.

     add_action( 'dokan_new_product_added','function_to_save_product_meta', 10, 2 );
     add_action( 'dokan_product_updated', 'function_to_save_product_meta', 10, 2 );

    To show the data in the product edit page, use the hook mentioned below.
    add_action('dokan_product_edit_after_product_tags','function_to_show_on_edit_page',20,2);
    FInally, if you want to view the data in the single product page then you can use the below-mentioned hook.
    add_action('woocommerce_single_product_summary','function_to_show_data',12);
    As you are not interested in showing the data to the customer then you will not need to use the last hook.`

    Thread Starter Caridor

    (@shaar7)

    Thanks alot for your assistance but sorry doesn’t work. there is anything missing i need to do ?

    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @shaar7

    I have searched for a third-party blog for you that may help you to achieve your goal. You can have a look at this third-party blog and see if it helps.

    Thread Starter Caridor

    (@shaar7)

    thank you @jahidulhassan working :).

    I appreciate your help and assistance.

    thank you a lot bro !

    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘add field to product’ is closed to new replies.