Home Forums Theme Support Dokan Dokan Product Edit Allows Blank Values – Including Title

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  Nayem 4 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #42118

    RevolvedMedia
    Member
    Post count: 43

    The product edit form will submit successfully even if the user clears all form inputs.

    Product name, Price, Description etc.

    No error message or feedback. Does not include the Dokan_Template_Shortcodes::$errors in the template (like in new-product.php)

    #42120

    Nayem
    Moderator
    Post count: 6480

    Hello,

    I have checked and found the issue. I will notify to our developer about this.

    Thank you ๐Ÿ™‚

    #42146

    Nayem
    Moderator
    Post count: 6480

    Hello,

    After checking this again i found that WooCommerce is managing this system like this. If you want then you can check from your backend.

    Thanks.

    #42180

    RevolvedMedia
    Member
    Post count: 43

    Since the dokan product edit form is a front-end public form; I think it is important for Dokan to include verification of the fields during editing.

    Woocommerce management is done from a single store owner point of view. It is highly unlikely that a store manager would intentionally submit empty fields, and would quickly realize the mistake.

    Where as Dokan is branching off of woocommerce to allow a multi-vendor store front. This becomes a public usage system; we can not assume that every member/user will be diligent in doing things perfect (and not require notification) or to not intentionally attempt to deface a site or perform malicious acts.

    From a usability stand point as well; if the title is not submitted and saved, the product list will show products without titles (seller dashboard). Therefore in the event the member has direct publish privilege: the site could end up with multiple items without titles. This would lead to confusion for both seller and consumers. A hundred blank products would not only be a nuisance but a potential public embarrassment for the site in general.

    Dokan has taken the time to create validation for new product submit. Here is a little snippet:

    dokan/classes/template-shortcodes.php

    function handle_all_submit()

    $post_title = trim( $_POST[‘post_title'] );
    if ( empty( $post_title ) ) {
    $errors[] = __( ‘Please enter product title', ‘dokan' );
    }

    Although missing verification or feedback for most of the fields – you can see here that the title is being checked within Dokan.

    I would think it should be a priority to extend this function to verify the edit $_POST data as well, or a variation of this function. (along with the default fields for new products, title, content, price etc).

    I would hate to have to put the time into this, as I expected form validation. I think form verification is extremely important and should not be taken lightly. I'm not trying to be too critical here or offend but I do want to stress that this is something I would assume all purchasers of dokan would expect.

    I'll write my own form verification cause we need it.

    I do see that the new product form does not verify most fields either – and includes no notification or feedback to the user. (And loses the data on a failed submit –> the main content <-- should I open a new bug report for this?). This could easily lead to member confusion and frustration, leading to the loss of a potential seller and loss of revenue for the site. Anyway this is just my two cents on the topic and thought you should be aware; as well as notes to help improve the dokan product for us all. (and maybe save some time coding all this myself) Dokan is a very important product for me, I had planned to write a multi-vendor system for wordpress for a very long time. The blunt of the work is done in Dokan, so I have sort of a personal commitment and expectations that other may or may not share. Please know that I am very happy with the product and am just pointing out features or processes that I would expect to find in my own code.

    #42232

    Nayem
    Moderator
    Post count: 6480

    Hello,

    Thank you very much for pointing us those important thing. I will discuss with our developer team about this whole thing. I will post here again after the discussion with the developer team about this validation matter.

    Thanks.

    #42319

    Nayem
    Moderator
    Post count: 6480

    Hello,

    In our next update we will fix all those thing in the add product and edit product section.

    Thanks.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Dokan Product Edit Allows Blank Values – Including Title’ is closed to new replies.