Measurement Price Calculator

WCMp Core

Measurement Price Calculator Open

Viewing 19 reply threads
  • Author
    Posts
    • #92283
      magix01
      Participant

      Hello,

      I am developer but dont know where to start, I have “WooCommerce Measurement Price Calculator” that works in vendor wp-admin but not showing in vendor dashboard, for production we will disable wp-admin and only use dashboard for vendors, however Measurement Price Calculator is not showing up on vendor dashboard when inserting new products. Is there any documentation for me to check what and where to hook and if there is better way.

      This is very popular WC plugin.

      Regards

    • #92426

      @magix01, as I can understand you need to add custom field in our add product page, for this you may check this link : https://wc-marketplace.com/tech-blog/add-new-tab-in-add-product-page/

      Now, you need to look at the code of WooCommerce Measurement Price Calculator and see how they are saving the data for that product. Now you have to save the same data (by following their method) with the vendor’s product.

    • #92702
      magix01
      Participant

      Nice one Nerdy, i have been investigating but this havent crossed my mind about duplicating plugin data 🙂

      thanks i will try and report, will post code too for future.

    • #92739

      Happy to help @magix01

    • #93018
      magix01
      Participant

      @Nerdy

      Is it possible to add custom field to dashboard settings page, i am setting up minimum order amount per vendor i have already added code to woocommerce filters, but need to add ability for vendors to input their minimum order amount so that i get that postmeta value in woo function?

      Regards

    • #93132

      Hi @magix01, this doc will help you out further: https://wc-marketplace.com/tech-blog/set-minimum-order-amount-per-vendor/

    • #93412
      magix01
      Participant

      Hi Nerdy i have managed to make this work, one suggestion i have for the dev team is to add more hooks in default settings not just before and after, that way we can add fields directly in main fields. Because of that i had to use js to move them up like this:

      jQuery(“#clone”).detach().insertAfter(‘.wcmp_form1 .form-group:nth-child(2)’);

      I have one more question tho, i added fees to order like this:

      $delivery_name = ‘test’
      $fee = 10;
      $woocommerce->cart->add_fee( $delivery_name, $fee, true, ” );

      It works when someone makes an order it displays the fee in woocommerce cart, but when vendor gets an order there is just total and no fee there, is there way to add that fee to vendor orders dashboard?

      Regards

    • #93500
      magix01
      Participant

      Here is what i mean to clarify it better:

      Woocommerce frontend checkout cart, fee is there:

      Vendor dashboard orders, fee not shown:

      Any way to add the fee or atleast display it to vendor? Thanks

    • #93503
      magix01
      Participant

      For some reason i cant link images directly from imgur to clarify this i have attached two images, one is showing woocommerce frontend fees that are added and other is vendor dashboard backend where there are no fees, any way to show this to vendor? Thanks

    • #93552
      sumit singh
      Moderator

      Hi, usethe following hook to add Fee in vendor dashboard order :-

      do_action('wcmp_vendor_order_totals_after_tax', $order->get_id())
      Copy
    • #93568
      magix01
      Participant

      I tried but it doesnt calculate with the total, i guess ill just leave it like that for vendors as info then 🙂

    • #93619

      @magix01, we presumed the WooCommerce is calculating the fess, you just need to display that fees in vendor’s order page details?

    • #93708
      magix01
      Participant

      Yes woocommerce calculates fee with my logic based on cart items, so it is fully integrated when user checkout they see the fee and in emails too except vendor dashboard totals.

    • #93769

      @magix01, in order to display the fess, you have to use our filter and add your own code to display that inside order details page.

    • #93846
      magix01
      Participant

      What is the filter name, i tried looking at your files in views folder and all i could find are do_action’s?

    • #93879

      Hi @magix01, the hook is

      do_action('wcmp_vendor_order_totals_after_tax', $order->get_id())
      Copy

      You can check our code here – https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/a42823c16c52bc5a582e2f0cff8730718ca7f242/templates/vendor-dashboard/vendor-orders/views/html-order-items.php#L213

    • #93497
      magix01
      Participant

      Here is what i mean:

      Woocommerce order cart with fee:

      frontend woo

      Vendor dashboard order total, fee not shown:

      no fee shown

      Any way to make it show here to or atleast to pull data to display it to vendor somehow. Thanks

    • #93499
      magix01
      Participant

      Here is what i mean to clarify it better:

      Woocommerce frontend checkout cart, fee is there:

      Vendor dashboard orders, fee not shown:

      Any way to add the fee or atleast display it to vendor? Thanks

    • #93501
      magix01
      Participant

      Here is what i mean to clarify it better:

      Woocommerce frontend checkout cart, fee is there:

      https://i.imgur.com/3zOFqsL.png

      Vendor dashboard orders, fee not shown:

      https://i.imgur.com/a7c2gkl.png

      Any way to add the fee or atleast display it to vendor? Thanks

    • #95671
      sumit singh
      Moderator

      Hi, You just need to fetch the custom fee using the respective order id and then use the following hook to display the fee.

      do_action('wcmp_vendor_order_totals_after_tax', $order->get_id())
      Copy

      You can also check how we display the order data in vendor dashboard – https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/blob/a42823c16c52bc5a582e2f0cff8730718ca7f242/templates/vendor-dashboard/vendor-orders/views/html-order-items.php#L213

Viewing 19 reply threads

Please LOGIN to reply to this topic

COVID-19 Outbreak: WCMp team is supporting business affected by coronavirus

Read the Message Buy at Slashed Price