Product Category Required is breaking after recent update.

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Ultimate Product Category Required is breaking after recent update.

Viewing 6 reply threads
  • Author
    Posts
    • #54335
      wwsAdmin
      Participant

      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,
      Shubham

      Attachments:
      You must be logged in to view attached files.
    • #54566
      WCFM Forum
      Keymaster

      Hi,

      Is this code written by us? I don’t think so!

      Thank you

    • #54638
      wwsAdmin
      Participant
    • #54919
      WCFM Forum
      Keymaster

      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

    • #57701
      wwsAdmin
      Participant

      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 instead

      Thanks.

    • #57835
      WCFM Forum
      Keymaster

      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

    • #58326
      wwsAdmin
      Participant

      Thanks,

      It worked 🙂

Viewing 6 reply threads
  • The topic ‘Product Category Required is breaking after recent update.’ is closed to new replies.