• Resolved alanfrys

    (@alanfrys)


    I just can add a new field in dokan add product page, but I want to this item have a check box or a drop down list as the category field. Its possible? and if the answer is yes, I need to filter products en shop page by this new field (the field will be “location” to can filter products by location).

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello @alanfrys ,

    If you are able to create new fields to add new product form then you just have to use different input types for the checkbox. You can get more ideas on how we have added the category selection from here – dokan-lite/templates/products/new-product.php see lines starting from #198.

    Now, if you want to include those new fields to be a filter for product search on the shop page, you have to make that customization based on WooCommerce’s documentation. The shop page and product query are WooCommerce’s functionality.

    However, in Dokan Pro we also have a Geolocation feature. You can check that from our site as well.

    Thank you ??

    Thread Starter alanfrys

    (@alanfrys)

    Hi @rur165 thank you for the answer.
    I tell you, I finally could put the check box in the add product page of dokan.
    I put the next code
    <form action=”../../form-result.php” method=”post” target=”_blank”>

    <p>

    Indicá tu zona de trabajo:<br>

    <label><input type=”checkbox” name=”cb-Capital Federal”> Capital Federal</label><br>

    <label><input type=”checkbox” name=”cb-BsAs G.B.A Norte”> BsAs G.B.A Norte</label><br>

    <label><input type=”checkbox” name=”cb-BsAs G.B.A Oeste”> BsAs G.B.A Oeste</label><br>

    <label><input type=”checkbox” name=”cb-BsAs G.B.A Sur”> BsAs G.B.A Sur</label><br>

    <label><input type=”checkbox” name=”cb-BsAs Interior”> BsAs Interior</label><br>

    </p>

    </form>

    With this, its appear a check box as I wanted. But now my question is, what code do I need to add so the check box information will see in the edit product page and the single product page?

    Thank you very much!

    Hello @alanfrys ,

    I believe this is the article you need to get all of your answers:
    https://nayemdevs.com/how-to-add-a-new-field-on-product-upload-form-dokan-multivendor/

    The article covers all 4 steps you are interested to complete.

    Thank you ??

    Thread Starter alanfrys

    (@alanfrys)

    Thank you @rur165 !

    The thing is, that article its for a label, and I need to be a check box. Maybe its the same, but I don’t know a lot of code so I don’t know what I need to change. Could you help me or its difficult to explain easy for here?

    Thank you for you answers!

    Thread Starter alanfrys

    (@alanfrys)

    @rur165 I make the checkbox field in the add product popup of Dokan.
    But the finally question is, how can I make to integrate this information (the selection made in the check boxes) to the rest of the pages (edit product, shop page, and single product page)

    Hello @alanfrys ,

    I understand what you are looking for but all of these can be done using proper hooks.

    For example, in the given example he used the hook dokan_product_edit_after_product_tags to add the newly added field on the edit the product page.

    This hook woocommerce_single_product_summary is for showing the information on the single product page.

    Here is a hook guideline for WooCommerce – https://docs.woocommerce.com/document/introduction-to-hooks-actions-and-filters/
    See more – https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

    You can consult with an expert if it seems confusing. Depending on your need the application of the same code will be just a little bit different. I can only share the examples and references through this forum.

    I hope the information helps you.

    Thank you ??

    I am using Dokan vendor dashboard.
    I want “Add new product” fields to be same as “Edit Product” fields.

    How can I do this? Where can I do this?

    Hello @delusha ,

    You might not be able to bring all fields from edit form to the add new form due to technical differences. If you want to add new fields then the customization should go to this file – dokan-lite/templates/products/new-product.php or tmpl-add-product-popup.php file.

    Thank you ??

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