WCMp Advanced Frontend Manager
Tagged: hide fields
-
AuthorPosts
-
-
February 22, 2022 at 4:58 PM #134726Tim KerremansParticipant
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
-
February 22, 2022 at 7:36 PM #134738MVX Support NinjaKeymaster
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,
-
February 22, 2022 at 7:41 PM #134739Tim KerremansParticipant
Hi,
Thanks for the quick reply. What lines need to be removed / added in these templates?
Thanks again.
-
February 23, 2022 at 6:19 PM #134769MVX Support NinjaKeymaster
Hi,
Kindly download the zip file unzip this and add to your active theme folder.Regards,
-
February 23, 2022 at 11:05 PM #134783Tim KerremansParticipant
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;
} -
February 24, 2022 at 5:35 PM #134825MVX Support NinjaKeymaster
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; }
CopyRegards,
-
-
AuthorPosts
The topic ‘Hide some fields in variations tab’ is closed to new replies.