Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › Product Vendors › Disable Vendor adding sku
Tagged: remove sku
- This topic has 11 replies, 3 voices, and was last updated 6 years, 8 months ago by Bingal.
- AuthorPosts
- March 11, 2018 at 3:43 pm #20142maarouf79Participant
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 ); - March 11, 2018 at 4:10 pm #20146WCFM ForumMember
Hi,
This code is not at all for WCFM.
Please know me your requirement, I will give you code for the purpose.
Thank You
- March 11, 2018 at 4:57 pm #20151maarouf79Participant
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 Dashboard5. And if it’s possible, allow vendor only change order status to processing, shipped and completed.
- March 11, 2018 at 6:50 pm #20156WCFM ForumMember
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
- March 11, 2018 at 7:27 pm #20163maarouf79Participant
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 - March 11, 2018 at 11:15 pm #20172WCFM ForumMember
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
- March 12, 2018 at 7:29 pm #20236maarouf79ParticipantThis reply has been marked as private.
- March 13, 2018 at 8:52 am #20246BingalMember
Fantastic 🙂
Really thanks for your kind cooperation and support.
Team WC Lovers
- March 14, 2018 at 2:06 am #20316maarouf79Participant
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. - March 14, 2018 at 5:01 pm #20329BingalMember
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.
- March 14, 2018 at 9:32 pm #20339maarouf79ParticipantThis reply has been marked as private.
- March 17, 2018 at 9:06 am #20448BingalMember
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 SKU6. 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
- AuthorPosts
- The topic ‘Disable Vendor adding sku’ is closed to new replies.