Banner Logo

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

Restricting some vendors shipping

Theme and Plugin Support

Resolved
Viewing 11 reply threads
  • Author
    Posts
    • #125773
      odedtalmon
      Participant

      Hello,
      Is it possible to disallow some vendor’s shipping options?
      I would like to show a specific shipping option to some vendors, the shipping option will come from Woocommerce.

      Thanks

    • #125790

      Hello @Odedtalmon, thank you for reaching out to us.

      By default, WCMp allows all the default WooCommerce shipping methods to all vendors. But can you please explain the flow a bit more, so we can help you out?

    • #125801
      odedtalmon
      Participant

      Hey Moumita,
      The client is going through a process of opening their own warehouse to store products. The website is selling physical and digital books.
      Since the client will have a warehouse they would like to show the website’s shipping method always besides a few selected vendors that they allow to have their own shipping methods.

      I couldn’t figure out how to disable the additional shipping block of each vendor in the cart page.
      Moreover, I think it would be easier if there was a field “allow_vendor_shipping” for example that would help with this functionality.

      I hope this makes more sense now, if you have any questions let me know.

      Thanks!

    • #125827
      odedtalmon
      Participant

      Hello again, this issue is a bit urgent for us, I would really appreciate a quick response from the team.
      Thank you!

    • #125838

      Hi @odedtalmon, do you want this option “I think it would be easier if there was a field “allow_vendor_shipping” for example that would help with this functionality.”, per vendor?

      Some screenshot to explain your requirement would be very helpfull.

    • #125840
      odedtalmon
      Participant

      Hey,
      Screenshot_13.jpg show that field, it’s a global field, would be nice to have that per vendor where I could just completely disable shipping for a specific vendor.

      I assume that field doesn’t exists, what is the best way to disable shipping for a specific vendor?

      Screenshot_14.jpg shows an example of an order from 5 different Vendors, we would like to show only 1 shipping method (the woocommerce flat rate shipping method) because the client has a warehouse that takes care of all the shipping, vendors just have to open an account on the website and not worry about shipping/stock.

      Thanks

    • #125903

      Hi,
      As per your requirement you have to do custom code. Using below filter you can remove shipping for a particular vendor.

      apply_filters('is_wcmp_vendor_shipping_enable', $is_enable, $this->id);
      Copy

      Regards,

    • #126113
      odedtalmon
      Participant

      Hello,
      That works, it does disable the vendor shipping.

      Now, for those vendors not in the disabled shipping list I want to disable the rates depending if the vendor has shipping methods set up or not.
      How can I get all shipping methods for vendor?

      Thanks

    • #126132

      Hi,
      WCMp use below function to get all vendor shipping methods,

      wcmp_get_shipping_zone()
      Copy

      Kindly checkout templates/vendor-dashboard/vendor-shipping.php

      Regards,

    • #126145
      odedtalmon
      Participant

      Hey,
      That function returns the following:

      [10-Aug-2021 16:38:47 UTC] $vendor_all_shipping_zones: Array
      (
          [1] => Array
              (
                  [id] => 1
                  [zone_name] => ישראל
                  [zone_order] => 0
                  [zone_locations] => Array
                      (
                          [0] => stdClass Object
                              (
                                  [code] => IL
                                  [type] => country
                              )
      
                      )
      
                  [meta_data] => Array
                      (
                      )
      
                  [zone_id] => 1
                  [formatted_zone_location] => ישראל
                  [shipping_methods] => Array
                      (
                      )
      
              )
      
      )
      Copy

      shipping_methods is empty even though that vendor has 2 shipping methods.

      I also tried

      $vendor_shipping_data = get_user_meta($package['vendor_id'], 'vendor_shipping_data', true);
      Copy

      and $vendor_shipping_data comes back empty.

      What should I do?

    • #126185

      Hi,
      using below function you will get all the data. Please check the image – https://scrnli.com/OWyNzSoEhJ0hRw
      Kindly tell us what you actually want using some Screenshots,

      Regards,

    • #126193
      odedtalmon
      Participant

      Hello again,
      No need, I got it working now, thank you very much for you help!!!

Viewing 11 reply threads

The topic ‘Restricting some vendors shipping’ is closed to new replies.