Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

Hide some fields in variations tab

WCMp Advanced Frontend Manager

Tagged: 

Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #134726
      Tim Kerremans
      Participant

      Hi,

      I would like to hide the fields that have been highlighted in the screenshot I attached to this message. Can you please tel me what custom CSS has to be added to make this possible?

      Thanks

    • #134738

      Hi,
      As per your requirement you have to override those two templates.

      Override wcmp-frontend_product_manager/views/products/woocommerce/html-product-data-variations.php by copying it to yourtheme/wcmp-afm/products/woocommerce/html-product-data-variations.php

      and also

      Override wcmp-frontend_product_manager/views/products/woocommerce/html-product-variations.php template can be overridden by copying it to yourtheme/wcmp-afm/products/woocommerce/html-product-variations.php

      Regards,

    • #134739
      Tim Kerremans
      Participant

      Hi,

      Thanks for the quick reply. What lines need to be removed / added in these templates?

      Thanks again.

    • #134769

      Hi,
      Kindly download the zip file unzip this and add to your active theme folder.

      Regards,

    • #134783
      Tim Kerremans
      Participant

      Thanks that worked perfectly!
      There is one other thing I can’t seem to fix, I’d like to remove irrelevant product categories for the vendors. I found a conversation on this forum from someone with the same issue so tried to apply the code to my theme but it does not work. I pasted the code below, can you tell me what’s wrong with it? I have not disabled advanced marketplace product listing as you can see in the attachment.

      add_filter( ‘wcmp_vendor_product_classify_1_level_categories’, ‘wcmp_filter_product_cat_query_args’, 99 );
      function wcmp_filter_product_cat_query_args( $args ) {
      if ( !isset( $args[‘taxonomy’] ) && $args[‘taxonomy’] != ‘product_cat’ ) return $args;
      // add your term_ids within follows array that you want to exclude from vendor product categories list
      $args[‘exclude’] = array( Automotive, Nature ); // lets assume 12 & 15 term_id want to exclude from vendor
      return $args;
      }

    • #134825

      Hi,
      To hide categories you have to add category id’s into the array. Checkout the video –

      https://gdskavr9sw.vmaker.com/record/hdfCbQSqgczmPW9U

      add_filter( 'wcmp_vendor_product_classify_1_level_categories', 'wcmp_filter_product_cat_query_args', 99 );
      function wcmp_filter_product_cat_query_args( $args ) {
          if ( !isset( $args['taxonomy'] ) && $args['taxonomy'] != 'product_cat' ) return $args;
          // add your term_ids within follows array that you want to exclude from vendor product categories list
          $args['exclude'] = array( 15, 22 ); // lets assume 12 & 15 term_id want to exclude from vendor
       return $args;
      }
      Copy

      Regards,

Viewing 5 reply threads

The topic ‘Hide some fields in variations tab’ is closed to new replies.