Submit form add product

WCMp Core

Resolved
Viewing 9 reply threads
  • Author
    Posts
    • #147394
      louKyLouk
      Participant

      Hi,
      I would like to know where is the executed code when a vendor hit “publish” on the add product page ?
      I need to change a little bit the flow, but I wasn’t able to find it on the source code.

      Thanks

    • #147421
      louKyLouk
      Participant

      Hi, I have seen an answer but it seems she disappears. But In order to explain me better, I already know where is located the source code of the add product page, in wp-content/plugins/dc-woocommerce-multi-vendor/templates/vendor-dashboard/product-manager/edit-product.php. But here my question is, where is the executed code ? (Like where is executed and read the form by PHP, when vendors click “publish” ?). How is treated the data by the form submited ?

    • #147426

      @louKyLouk, can you please explain exactly what type os flow are you looking for, do you want to save some product-related data?

    • #147429
      louKyLouk
      Participant

      Hi, I finnaly found where is executed the POST form for add a product, in wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-vendor-dashboard.php

      I am doing my changements actually.
      As you can see in the attached screenshot (the original error when a vendor publish a product without title for exemple), I was looking for manage my own errors, as regular price is required (currently no). So now I made it mandatory. And now the same error in the screenshot appear but with the regular price required message.

    • #147450

      @louKyLouk, can you share some screenshot to explain the issue.

    • #147495
      louKyLouk
      Participant

      Hi indeed I forgot the screenshot, here you can find the actual error from add product without title, content and excerpt (first what are those : content and excerpt, this is not explicit for any vendor, why not replace the “excerpt” word by “short description”). Here the error is talking about the “content, title and excerpt”. Indeed they are all empty, but if I publish with either “excerpt” (short description) filled up, and with “title” and “content” empty. The right flow will be : no product added, error showing “title and content empty”, but currently the product is added, with no title, no price, no content, just the short description.

      Now, I don’t have any issue, my solution is, your error management is not how I needed it. For exemple if a vendor publish a product without price it will be added. What I need was, if a vendor publish a product without a price, an error appear about the price itself and nothing published.I’ll send you to the next post a screenshot of what I did by myslef for managing correctly the errors.

      I added my own code into “wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-vendor-dashboard.php”

    • #147498
      louKyLouk
      Participant

      Here attached what I did.
      If you want me to show you the code I added, I can.

    • #147565

      @louKyLouk, our team will look into this. We will try to handle this in our next update.

    • #148046

      @louKyLouk, we have added this request to our development plan. But sharing any ETA on this will be difficult.

      You can track the progress of this issue from here https://github.com/multivendorx/MultiVendorX/issues/269

    • #193372

      Hi,
      We haven’t heard back from you for a while. So, we presume this issue is resolved. So, we are closing this thread, if you need any further help, please open a new thread.

Viewing 9 reply threads

The topic ‘Submit form add product’ is closed to new replies.