Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Default check "Catalogue"
- This topic has 19 replies, 3 voices, and was last updated 4 years, 9 months ago by
Guigs.
- AuthorPosts
- May 18, 2020 at 1:53 pm #132481
Guigs
ParticipantHello,
I have used the following code to disable the Downloadable and Virtual options from the vendors store manager :function disable_virtual_downloadable_support( $general_fields ) { if ( isset( $general_fields['is_virtual'] ) ) unset( $general_fields['is_virtual'] ); if ( isset( $general_fields['is_downloadable'] ) ) unset( $general_fields['is_downloadable'] ); return $general_fields; } add_filter( 'wcfm_product_manage_fields_general', 'disable_virtual_downloadable_support' );
Is there a way to default check the box “Catalog” now? I need to make my platform the easiest way to use possible…
Thanks!
- May 18, 2020 at 3:07 pm #132541
Sushobhan
KeymasterHi,
To disable virtual and downloadable from vendor dashboard go to your WCFM admin dashboard >> Capability, and from there disable both Virtual and Downloadable under Types section. See here- https://imgur.com/s78BLE2 **No need to do it using code**
Also to enable Catalog by default, add the following snippet-add_filter( 'wcfm_product_manage_fields_general', function($general_fields, $product_id) { $is_catalog = ( get_post_meta( $product_id, '_catalog', true ) == 'no' ) ? 'no' : 'yes'; if(isset($general_fields['is_catalog'])) { $general_fields['is_catalog']['dfvalue'] = $is_catalog; } return $general_fields; }, 101, 5 );
Add this code to your child theme’s functions.php
In case you do not have a child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
Let me know how this goes.
Thanks! - May 19, 2020 at 1:33 pm #132984
Guigs
ParticipantThank you very much it works!
I don’t have these options letting me disable Virtual and Downloadable so I’ll use the code…
Thanks!
- May 19, 2020 at 2:45 pm #133007
Sushobhan
KeymasterHi,
I don’t have these options letting me disable Virtual and Downloadable so I’ll use the code…
Are you using WCFM Groups & Staffs addon, in that case, these options are getting overridden by group capability settings. Otherwise, it should work. I can debug it further if you want.
Just let me know.
Thank You! - May 20, 2020 at 1:45 pm #133464
Guigs
ParticipantHi, no I am not using this addon…
Could my problem be linked to this ?
https://wclovers.com/forums/topic/how-to-completely-delete-wp-hide-security-enhancer/ - May 20, 2020 at 4:12 pm #133514
Guigs
Participant(Apparently no)
- May 21, 2020 at 1:13 pm #133840
web-3134
ParticipantHello,
is it possible to set catalog mode only for a specific membership and normal (sell available) to others? - May 25, 2020 at 2:05 am #134861
Guigs
ParticipantHello,
Is there a way to simply disable the 3 boxes, including catalog?Thank you…
- May 25, 2020 at 6:07 pm #135031
Sushobhan
KeymasterHi @web-3134,
Correct me if I’m wrong, you want to keep the Catalog checkbox as it is and only makes it enabled by default for a particular membership. If I’m right, then use the following snippet for this-add_filter( 'wcfm_product_manage_fields_general', function($general_fields, $product_id) { if ( wcfm_get_membership() == 26 ) { // replace 26 with the actual membership id $is_catalog = ( get_post_meta( $product_id, '_catalog', true ) == 'no' ) ? 'no' : 'yes'; if ( isset( $general_fields['is_catalog'] ) ) { $general_fields['is_catalog']['dfvalue'] = $is_catalog; } } return $general_fields; }, 101, 5 );
Add this code to your child theme’s functions.php
In case you do not have a child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
Let me know how this goes.
Thanks!
n.b.- To get membership id of a plan, go to Memberships page and edit that membership, the number at the end of the URL is the membership id.- May 25, 2020 at 8:46 pm #135090
web-3134
ParticipantHi @Sushobhan,
that is exactly what I needed, now I can set “catalog mode” as default for Base Membership and let “normal mode” for all other memberships.
Thank you!
- May 25, 2020 at 9:09 pm #135110
Sushobhan
KeymasterYou are always welcome 🙂
Let me know if there’s anything else we can help you with.
Can we ask for a favor? Would you mind taking a few minutes to review our plugin (if you haven’t already) at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers.
- May 25, 2020 at 6:09 pm #135032
- May 25, 2020 at 6:43 pm #135047
Guigs
ParticipantHi Sushobhan, I actually never found a code allowing me to disable the three of them, but the other ones worked.
Would you be able to give me the one I need? - May 25, 2020 at 7:54 pm #135076
Sushobhan
KeymasterHi,
Kindly replace the code you were using to hide Virtual and Downloadable checkbox with the following, it will hide all 3 checkboxes Virtual, Downloadable, and Catalog-function disable_virtual_downloadable_support( $general_fields ) { if ( isset( $general_fields['is_virtual'] ) ) unset( $general_fields['is_virtual'] ); if ( isset( $general_fields['is_downloadable'] ) ) unset( $general_fields['is_downloadable'] ); if ( isset( $general_fields['is_catalog'] ) ) unset( $general_fields['is_catalog'] ); return $general_fields; } add_filter( 'wcfm_product_manage_fields_general', 'disable_virtual_downloadable_support' );
Thank You!
- May 26, 2020 at 12:53 am #135175
Guigs
ParticipantThank you but it hasn’t worked… :/
I disabled the other snippets I was using (disabling Virtual and Downloadable, default checking Catalog), added this code in a new snippet, but it didn’t work.
Now I’ve got the catalog box only, unchecked. - May 26, 2020 at 8:38 am #135271
Sushobhan
KeymasterHi,
Sorry about that, I forget to mention the priority in my last code. Please use the following, its all the same just with the added priority of ‘101’ (anything above 100 will work in this case)-function disable_virtual_downloadable_support( $general_fields ) { if ( isset( $general_fields['is_virtual'] ) ) unset( $general_fields['is_virtual'] ); if ( isset( $general_fields['is_downloadable'] ) ) unset( $general_fields['is_downloadable'] ); if ( isset( $general_fields['is_catalog'] ) ) unset( $general_fields['is_catalog'] ); return $general_fields; } add_filter( 'wcfm_product_manage_fields_general', 'disable_virtual_downloadable_support', 101 );
Thank You and Sorry again for the inconvenience.
- May 26, 2020 at 2:03 pm #135337
Guigs
ParticipantThank you so much ! 🙂
- May 26, 2020 at 3:47 pm #135363
Sushobhan
KeymasterYou are always welcome 🙂
Let me know if there’s anything else we can help you with.
Can we ask for a favor? Would you mind taking a few minutes to review our plugin (if you haven’t already) at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers. - May 26, 2020 at 4:46 pm #135377
Guigs
ParticipantThank you, I promise I will (review).
If there’s a way for you to help me with this matter, it would be amazing : https://wclovers.com/forums/topic/how-to-dissociate-payment-type-and-delivery-pick-up-and-let-the-vendors-choose
- May 28, 2020 at 8:44 pm #136213
Guigs
ParticipantOh I’ve got an issue… I though disabling “Catalog” for all products would erase the “Catalog Mode” menu when vendors add a new product.
Is there a way to make this menu disappear?
- AuthorPosts
- You must be logged in to reply to this topic.