Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Product Category Required is breaking after recent update.
- This topic has 6 replies, 2 voices, and was last updated 5 years, 7 months ago by wwsAdmin.
- AuthorPosts
- March 24, 2019 at 2:46 pm #54335wwsAdminParticipant
Hello Team,
Product category is required and it was working pretty awesome till last few update.
I have added custom code shared by you to disable parent category selection :
function wcfm_pm_custom_script( $end_point ) { switch( $end_point ) { case 'wcfm-products-manage': ?> <script> jQuery(document).ready(function($) { $('#product_cats_checklist').children('.product_cats_checklist_item').each(function() { //if( $(this).children('.product_taxonomy_sub_checklist').length > 0 ) { $(this).children('label').children('input').addClass('wcfm_custom_hide'); // } }); $( "#wp-excerpt-media-buttons" ).remove(); $( "#wp-excerpt-editor-tools" ).remove(); $( "#wp-description-media-buttons" ).remove(); $( "#wp-description-editor-tools" ).remove(); //$('#product_cats_checklist').children('.product_cats_checklist_item.checklist_item_15').remove(); }); </script> <?php break; } } add_action( 'after_wcfm_load_views', 'wcfm_pm_custom_script' );
But now it is allowing product to be submitted without category selection. Not showing in err message.
Same goes for Excerpt and Description, while submitting it is not showing it is required.
Thanks,
ShubhamAttachments:
You must be logged in to view attached files. - March 26, 2019 at 2:03 pm #54566WCFM ForumMember
Hi,
Is this code written by us? I don’t think so!
Thank you
- March 26, 2019 at 6:32 pm #54638wwsAdminParticipant
Hi,
I guess i copied from here : https://wclovers.com/forums/topic/completely-hide-restricted-categories-from-vendors-add-product-page/
- March 28, 2019 at 10:00 am #54919WCFM ForumMember
Ahh … that code is almost 1 year old and no more valid for recent WCFM.
Between, what is your requirement.
I will give you updated code!
Thank You
- April 14, 2019 at 2:36 pm #57701wwsAdminParticipant
Ohh..
Requirement is same.
Subcategories should be enabled or selected. Main categories cannot be selected by vendors.
I would like to prevent the vendor from choosing Main Category, forcing them to choose one or more of the subcategories insteadThanks.
- April 15, 2019 at 7:15 am #57835WCFM ForumMember
Hi,
Please add this CSS to your site for the purpose –
#wcfm-main-contentainer .product_cats_checklist_item input[type="checkbox"].wcfm-checkbox {display:none;} #wcfm-main-contentainer .product_cats_checklist_item .product_taxonomy_sub_checklist input[type="checkbox"].wcfm-checkbox {display:inline-block;}
Thank You
- April 17, 2019 at 6:08 pm #58326wwsAdminParticipant
Thanks,
It worked 🙂
- AuthorPosts
- The topic ‘Product Category Required is breaking after recent update.’ is closed to new replies.