Main product categories

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!

Viewing 4 reply threads
  • Author
    Posts
    • #97039
      sdel_nevo
      Participant

      Hi Guys

      is it possible to prevent vendors from adding products into top-level categories?

      for example

      main category sub-category
      stationary Cards

      is it possible to stop products being added to “Stationary”

      Steve

    • #97238
      WCFM Forum
      Member

      Hi,

      Please add this code to your site for the purpose-

      add_action( 'after_wcfm_products_manage', function() {
      	?>
      	<script>
      	jQuery(document).ready(function($) {
      		setTimeout(function() {
      			$('#product_cats_checklist').children('.product_cats_checklist_item').each(function() {
      				if( $(this).children('.product_taxonomy_sub_checklist').length > 0 ) {
      					$(this).children('.checklist_type_product_cat').addClass('wcfm_custom_hide');
      				}
      			});
      		}, 1000);
      	});
      	</script>
      	<?php 
      }, 50 );

      Thank You

    • #97255
      sdel_nevo
      Participant

      Hi Guys

      OMG this is fantastic, thank you so much

      it’s going to help out brilliantly

      Steve

    • #97258
      sdel_nevo
      Participant

      Hi Guys

      the only issue I have found after adding this is

      i have set Categories are required” when adding products

      if no category is entered, the warning is not displayed in red after adding this code

      but the product is placed into draft mode 🙂 and not published

      is it possible with this code added

      to also show the error when no category has been selected

      really sorry to be a pain

      Steve

      Attachments:
      You must be logged in to view attached files.
    • #97374
      sdel_nevo
      Participant

      Hi Guys

      sorry what I meant to say in the post above is

      if no category selected, please replace the “Product successfully saved” message

      with the red warning, category required

      steve

Viewing 4 reply threads
  • The topic ‘Main product categories’ is closed to new replies.