Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards

How to create orders as vendor?

WCMp Advanced Frontend Manager

Tagged: 

Resolved
Viewing 19 reply threads
  • Author
    Posts
    • #137887
      Anonymous
      Inactive

      Hello,

      We would like to allow our vendors to create orders for a specific type of product and do not charge any fee for that. The problems we are facing are:

      1. There is no “Add order” o “New order” in the vendor dashboard. As administrator, I have this button. However, as a vendor I do not see it.
      2. How could we configure or program it to remove the fee if the user that creates the order has role dc_vendor or if the order is created from the backend?

      Thank you for your help and support!!

    • #137894

      Hi Joe, thanks for getting in touch with us.

      Our replies are inline :

      – 1. There is no “Add order” o “New order” in the vendor dashboard. As an administrator, I have this button. However, as a vendor, I do not see it.
      >> Currently vendor can’t add any order. Only the admin can add this.

      However, we do have a plan in the future, where vendors can add orders.
      But sharing any eta on this is difficult.

      2. How could we configure or program it to remove the fee if the user that creates the order has role dc_vendor or if the order is created from the backend?

      >> Can you please share a screenshot explaining which field you want to remove? So we can assit you accordingly.

    • #137921
      Anonymous
      Inactive

      Hello,

      Thank you for your answer.

      Regarding to your explanations:

      1. Ok. I have another plugin already that allows me to create the order from the frontend.

      2. The situation I am trying to solve is that my marketplace is for stores that buy in their shops as well as online through our marketplace. What we need is that if I am a vendor, and a client wants to buy in my shop, I would like to create the order without any fee. In order to do so, as a vendor I would like to login in the marketplace, and then I buy the product from the frontend without any fee.I have set “pay later” just for vendors. So, I would like to configure or create teh code to check the user role. It is is “dc_vendor” then WCMP should not apply any comiission fee (comission fee = 0).

      Is it a little bit clearer now? I know that is a little bit weird, but does make sense for my clients and our purposes.

      So, please, could you help us?

      Thank you again for your help and your great work!!!

    • #137934

      @Jose Moar, generally when any product is sold we will create the commission.

      Now as you want to create a checking that is a vendor is buying from their own, then there will not be any commission. For this you have to do custom code and add this flow.

      Do you have any developers for this, so we can assist them with developing this.

    • #137982
      Anonymous
      Inactive

      Hello,

      I am a developer. I would be very glad if you can assist me with this. There shouldn’t be any problem for me to follow your instructions since I already have some experience with WordPress, its themes and plugins. I guess that I will have to add a hook in functions.php for this.

      Thank you again for your support.

    • #137999

      Hi,
      First, you have to Override this template by copying it to yourtheme/dc-product-vendor/vendor-dashboard/vendor-orders/vendor-order-details.php. Then add a custom button. Then when you trigger that button you have to create an order. You will get an idea to create an order here — https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/master/classes/class-wcmp-order.php#L275
      Thanks

    • #138075
      Anonymous
      Inactive
      This reply has been marked as private.
    • #138105

      Hi,
      Then Override this template by copying it to yourtheme/dc-product-vendor/vendor-dashboard/vendor-orders.php. Then add your button within the form method so you can use data by $_POST. Then apply for your work.
      Thanks

    • #138117
      Anonymous
      Inactive
      This reply has been marked as private.
    • #138147

      Hi,
      I think you are using some API calls. You may face the issue due to API uses permission. You need to debug that function. first, follow these steps explain here – https://multivendorx.com/support-forum/topic/how-to-create-orders-as-vendor/#post-138105. Then check by adding a print value. If this print works. Then you can do your customization.
      Thanks

    • #138116
      Anonymous
      Inactive
      This reply has been marked as private.
    • #138113
      Anonymous
      Inactive
      This reply has been marked as private.
    • #138220
      Anonymous
      Inactive
      This reply has been marked as private.
    • #138223
      Anonymous
      Inactive

      hello, it looks like this was not sent. Here is my message again:

      Unfortunately, I am still stacked with this matter 🙁

      I added the “Add order” button in my-child-theme/dc-product-vendor/vendor-dashboard/vendor-orders.php. I created the button like this:

      $user=wp_get_current_user();
      if( in_array( ‘dc_vendor’, (array)$user->roles)){
      ?>
      <div class=”pull-right” style=”width: auto; display: inline-block; float: right;”>
      Add order
      </div>
      <?php
      }

      With this link I can access to the create order page (screenshot-2). However, this page is not usimg the template my-child-theme/dc-product-vendor/vendor-dashboard/vendor-orders/vendor-order-details.php as I expected. I have not been able to find out which template it is using, so I can override the save button in that template. The only thing I have found out is that the page in screenshot-2 is created with the public static function output( $post ), from class WC_Meta_Box_Order_Actions.

      Which should be the link in the “Add order” button to use the template my-child-theme/dc-product-vendor/vendor-dashboard/vendor-orders/vendor-order-details.php? I have tried to create the “Add order” button with the link https://mydomain.com/escritorio/vendor-orders/add-order, but I just get an empty dashboard-page (screenshot 3).

      Please, could you tell how can I access to the edit/create order page with template my-child-theme/dc-product-vendor/vendor-dashboard/vendor-orders/vendor-order-details.php? Which is the url that I must set to the button that links to that page?

      Thank you again for your work and help.

    • #138258

      @Jose Moar, our team will check and get back to you.

      Kindly provide them some time.

    • #138288

      Hi,
      you will find Hook’s reference for creating a new page here https://multivendorx.com/knowledgebase/wcmp-hooks-filters/#nav-20
      Thanks

    • #138319
      Anonymous
      Inactive

      Hello,

      Please, could you do a clear and specific example abut how to create a button with a link to vendor-order-details.php template, please? I have been already several days asking about this matter and everytime you just give me a little bit more of information. I think that with a clear example about how it can be done, I could do it.

      Thank you for your time.

    • #138341

      Hi, there is no such ready-made code for this.

      That is why you need to do this coding from scratch using your coding logic and the filters we have shared.

      If you want, you can also hire our service team to develop this module from scratch https://multivendorx.com/custom-development/

    • #140924
      Anonymous
      Inactive

      Hello,

      Finally, I managed to do it by myself.

      Thank you for all the information.

    • #140936

      You are welcome Jose 🙂

Viewing 19 reply threads

The topic ‘How to create orders as vendor?’ is closed to new replies.