Disable Vendor adding sku

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Tagged: 

Viewing 11 reply threads
  • Author
    Posts
    • #20142
      maarouf79
      Participant

      I wan’t disable for vendor adding or change sku (it’s in inventory tab)
      ///SKU refers to a Stock-keeping unit, a unique identifier for each distinct product and service that can be purchased.///

      I used before this code in my child function.php But it’s not working anymore:

      function append_sku_string( $link, $post ) {
      $post_meta = get_post_meta( $post->ID, ‘_sku’, true );
      if ( ‘product’ == get_post_type( $post ) ) {
      $link = $link . ‘#’ .$post_meta;
      return $link;
      }
      }
      add_filter( ‘post_type_link’, ‘append_sku_string’, 1, 2 );

    • #20146
      WCFM Forum
      Keymaster

      Hi,

      This code is not at all for WCFM.

      Please know me your requirement, I will give you code for the purpose.

      Thank You

    • #20151
      maarouf79
      Participant

      Cool thx,
      1. disable add SKU for all except admin
      2. Disable Enable reviews in Tab Advanced
      3. Disable the meta box Brand Categories
      4. i use a plugin called WooCommerce Advanced Product Quantities. I wan’t have it in Vendor Dashboard

      5. And if it’s possible, allow vendor only change order status to processing, shipped and completed.

    • #20156
      WCFM Forum
      Keymaster

      Hi,

      I will send you code for those very soon.

      “WooCommerce Advanced Product Quantities” this plugin is out dated, not compatible with WC 3.0, so be careful before using.

      Thank You

    • #20163
      maarouf79
      Participant

      Ok thank you. I have removed the WooCommerce Advanced Product Quantities and have installed WooCommerce Min/Max Quantities.
      I will translate your Plugin in German on wordpress.org

    • #20172
      WCFM Forum
      Keymaster

      Hi,

      Really thanks for the translation contribution.

      Between, here is your codes –

      1. Hiding SKU –

      function wcfm_cspm_product_fields_stock( $stock_fields, $product_id, $product_type ) {
      	if( wcfm_is_vendor() && isset( $stock_fields['sku'] ) ) {
      		$stock_fields['sku']['class'] = 'wcfm_custom_hide';
      		$stock_fields['sku']['label_class'] = 'wcfm_custom_hide';
      	}
      	return $stock_fields;
      }
      add_filter( 'wcfm_product_fields_stock', 'wcfm_cspm_product_fields_stock', 50, 3 );

      2. Enable Review Hide –

      function wcfm_custom_product_manage_fields_advanced( $advanced_fields ) {
      	if( wcfm_is_vendor() && isset( $advanced_fields['enable_reviews'] ) ) {
      		$advanced_fields['enable_reviews']['dfvalue'] = 'enable'; 
      		$advanced_fields['enable_reviews']['class'] = ' wcfm_custom_hide';
      		$advanced_fields['enable_reviews']['label_class'] = ' wcfm_custom_hide';
      	}
      	return $advanced_fields;
      }
      add_filter( 'wcfm_product_manage_fields_advanced', 'wcfm_custom_product_manage_fields_advanced', 50 );

      3. Disable the meta box Brand Categories
      add_filter( 'wcfm_is_allow_custom_taxonomy', '__return_false' );

      4. Great, you have switched the plugin

      5. Use this filter for the purpose – “wcfm_allowed_order_status”

      Thank You

    • #20236
      maarouf79
      Participant
      This reply has been marked as private.
    • #20246
      Bingal
      Keymaster

      Fantastic 🙂

      Really thanks for your kind cooperation and support.

      Team WC Lovers

    • #20316
      maarouf79
      Participant

      Sorry my bad,
      I use a Plugin called WooCommerce Product SKU Generator. This Plugin create automatly sku Numbers for every new created Product. I wanted that to work on WCFM and disable Vendors to change the created sku in Frontend or in Quick Edit. That’s why i needed a code.
      But it looks like the Plugin not works with WCFM. I’m not sure, but i think it was working before the last WCFM update.

    • #20329
      Bingal
      Keymaster

      OK, so you want to generate SKU automatically.

      Just relax, we will add support of this in WCFM next update.

      Thank You and please keep a bit patience.

    • #20339
      maarouf79
      Participant
      This reply has been marked as private.
    • #20448
      Bingal
      Keymaster

      Hi,

      Really thanks for valuable suggestions. Let me clarify few of them for you –

      1. add automatic sku number (disable change sku no for vendor) – will add third party support for this in next WCFM update.

      2. disable some custom order status for vendor (example: vendor can only change order status from pending to complete or shipped ) – I have already shared you filter for this, it’s possible to achieve easily

      3. ORDER NOTES, show order status changes by name (example: vendor max market id #xxxxx as from pending to shipped) – Yeah, will add that in next update as well

      4. minimum maximum qty function – Are you using any plugin for the purpose as well? WCfM already has a support for such a plugin

      5. disable short description for vendor or set short description text to only 50 letters
      (reason: vendor can create a big short discription and add video and images and break the product page) – It’s possible to short description in a same way as I did for SKU

      6. For me, i love that Knowledgebase. But i’m not able to put some html text inside. Disable html editor for vendor yes
      but not for me administrator. – Capability is not for Admin, how this can disabled in your case? I will test this and know you.

      7. Nice woul’d be if i can select which vendor are able to puplish and change article. (Enable vendor maxshop to create an article) – Not getting this clearly, you can add restriction over Article publish capability, if you want to do the same for vendor wise then WCFM – groups and Staffs required.

      8. WooCommerce Pre-Orders is a famous plugin for Woocommerce. I miss the intergration in WCFM. – WCFM manual order system is not there, when we will bring this Pre-orders also be supported.

      9. My biggest dream is to see a function to disable vendor adding products in main category. – Ummm .. possible to achieve using JavaScript

      10. disable #wpadminbar (on the top) for vendors – Use Hide Admin Bar for the purpose. WCFM Membership create vendors with by default disabling this.

      Thank You

Viewing 11 reply threads
  • The topic ‘Disable Vendor adding sku’ is closed to new replies.