Select specific categories for vendor

MultivendorX Pro

Resolved
Viewing 18 reply threads
  • Author
    Posts
    • #192388
      Rishi Thakker
      Participant

      I want to show specific selected categories that vendors can choose while uploading or updating products. How can I do that?

    • #192420

      Hi Rishi, thanks for the query.

      By default vendor can select categories added by the admin. You just need to go to admin dashboard >> MultiVendorX >> Settings >> General , from here enable the Category Pyramid Guide option https://prnt.sc/c8wJ3B6I80z6

      Once the admin enables this option from admin dashboard, the vendor will get the categories added by the admin before adding a new product from his dashboard https://prnt.sc/ydN8yBRQ91-P

      But if you are looking for some specific flow, can you please explain that?

    • #192435
      Rishi Thakker
      Participant

      I have many categories on my site but I don’t want to allow vendors can select some categories. Vendors can only select those categories that I can allow like (Ableton Vocal Preset Packs, CUBASE VOCAL PRESET PACKS, and Drum Kits) from this https://www.screenpresso.com/=WK6ng

    • #192443

      Hi, There is no such setting in MultiVendorX using which the admin can restrict some categories for the vendors.
      But with the Marketplace Membership module you can create a membership plan for vendors under which you as an admin can select allowed categories for the vendor. That means if a vendor buys that membership plan he will only be able to add products under those allowed categories.

      You can go through our knowledgebase doc for details on the marketplace membership module https://multivendorx.com/docs/knowledgebase/marketplace-memberhsip/
      But if you still want to add the restriction in mutivendorx, then you have to do custom code and add this restriction.

    • #192447
      Rishi Thakker
      Participant

      There is any filter or hook available in your plugin for the restriction category?

    • #192496

      Hi,
      Kindly add below code to your function.php to hide some categories from your vendor add product page.

      add_filter( 'mvx_vendor_product_classify_first_level_categories', 'mvx_vendor_product_classify_first_level_categories_backup');
      function mvx_vendor_product_classify_first_level_categories_backup($cat_array) {
         $cat_array['exclude'] = array(15); // add categorie id here saparated by comma
      return $cat_array;
      }
      Copy

      Regards,

    • #192424
      Rishi Thakker
      Participant

      I have many categories on my site but I don’t want to allow vendors can select some categories https://www.screenpresso.com/=WK6ng
      Vendors can only select those categories that I can allow like (Ableton Vocal Preset Packs, CUBASE VOCAL PRESET PACKS, and Drum Kits) from this https://www.screenpresso.com/=WK6ng

    • #192549
      Rishi Thakker
      Participant

      I added that code to my function.php file but it doesn’t work because the category from this [https://www.screenpresso.com/=WGE2e, https://www.screenpresso.com/=9x74f%5D function is displayed on the vendor dashboard and there is no mention of the filter you gave me to exclude categories for vendors.

    • #192551
      Rishi Thakker
      Participant

      I added that code to my function.php file but it doesn’t work because the category from this [https://www.screenpresso.com/=WGE2e , https://www.screenpresso.com/=9x74f%5D function is displayed on the vendor dashboard and there is no mention of the filter you gave me to exclude categories for the vendor.

    • #192550
      Rishi Thakker
      Participant

      I added that code to my function.php file but it doesn’t work because the category from this [https://www.screenpresso.com/=WGE2e, https://www.screenpresso.com/=9x74f%5D function is displayed on the vendor dashboard and there is no mention of the filter you gave me to exclude categories for the vendors.

    • #192548
      Rishi Thakker
      Participant

      I added that code to my function.php file but it doesn’t work because the category from this [https://www.screenpresso.com/=WGE2e, https://www.screenpresso.com/=9x74f%5D function is displayed on the vendor dashboard and there is no mention of the filter you gave me to exclude categories.

    • #192547
      Rishi Thakker
      Participant

      I added that code to my function.php file but it doesn’t work because the category from this [ https://www.screenpresso.com/=WGE2e, https://www.screenpresso.com/=9x74f ] function is displayed on the vendor dashboard and there is no mention of the filter you gave me to exclude categories.

    • #192601

      Hi,
      for edit product page add custom code using below filter –

      apply_filters( "mvx_get_product_terms_product_cat_query_args", array(
                  'taxonomy'   => $taxonomy,
                  'hide_empty' => false,
                  'orderby'    => 'name',
                  'parent'     => 0,
                  'fields'     => 'id=>name',
                  ) );
      Copy

      Regards,

    • #192602
      Rishi Thakker
      Participant

      I want to show this product category those id’s are 301, 150 and 151.
      how can I add that id to this filter?

    • #192603

      Hi,
      Add below code and add your all cat id in the array separated by comma,

      add_filter( "mvx_get_product_terms_product_cat_query_args", 'mvx_get_product_terms_product_cat_query_args_callback');
      function mvx_get_product_terms_product_cat_query_args_callback($args) {
          $args['include'] = array(15); //add all cat id here
      return $args;
      }
      Copy

      Checkout the image – https://prnt.sc/5lcsYncyT5Kv (working in our end)
      Regards,

    • #192585
      Rishi Thakker
      Participant

      I added that code to my function.php file but it doesn’t work because the category from this https://www.screenpresso.com/=WGE2e , https://www.screenpresso.com/=9x74f function is displayed on the vendor dashboard and there is no mention of the filter you gave me to exclude categories.

    • #192586
      Rishi Thakker
      Participant

      I added that code to my function.php file but it doesn’t work because the category from this https://www.screenpresso.com/=WGE2e , https://www.screenpresso.com/=9x74f function is displayed on the vendor dashboard and there is no mention of the filter you gave me to exclude categories for the vendors.

    • #196468

      Its been long and we have not heard back from you. Earlier we somehow missed your thread. Can you please let us know if your query is resolved or not.

    • #207703

      We presume your query is solved now. We are closing this thread. If you need help or face issue in future please create a new support ticket.

Viewing 18 reply threads

The topic ‘Select specific categories for vendor’ is closed to new replies.