Home › Forums › WoodMart support forum › how to can i add categories and tags in compare table..
how to can i add categories and tags in compare table..
- This topic has 6 replies, 2 voices, and was last updated 11 months, 4 weeks ago by Elise Noromit.
-
AuthorPosts
-
May 2, 2023 at 7:34 pm #463902
weedgeneralParticipanthow to can i add categories and tags in compare table..
Attachments:
You must be logged in to view attached files.May 3, 2023 at 1:01 am #463928
Elise NoromitMemberHello,
Thank you very much for choosing our theme and for contacting us.
The compare functionality is based mainly on attributes. Please check this manual to see the available options: https://xtemos.com/docs-topic/compare/
Best Regards
May 3, 2023 at 5:24 am #463954
weedgeneralParticipanthi thanks for reply could you tell me how i can register categories and tags in child theme..
/**
* All available fields for Theme Settings sorter option.
*
* @param bool $new New option.
*
* @return array
*/
public function compare_available_fields( $new = false ) {
$product_attributes = array();if ( function_exists( ‘wc_get_attribute_taxonomies’ ) ) {
$product_attributes = wc_get_attribute_taxonomies();
}if ( $new ) {
$options = array(
‘description’ => array(
‘name’ => esc_html__( ‘Description’, ‘woodmart’ ),
‘value’ => ‘description’,
),
‘dimensions’ => array(
‘name’ => esc_html__( ‘Dimensions’, ‘woodmart’ ),
‘value’ => ‘dimensions’,
),
‘weight’ => array(
‘name’ => esc_html__( ‘Weight’, ‘woodmart’ ),
‘value’ => ‘weight’,
),
‘availability’ => array(
‘name’ => esc_html__( ‘Availability’, ‘woodmart’ ),
‘value’ => ‘availability’,
),
‘sku’ => array(
‘name’ => esc_html__( ‘Sku’, ‘woodmart’ ),
‘value’ => ‘sku’,
),
);if ( count( $product_attributes ) > 0 ) {
foreach ( $product_attributes as $attribute ) {
$options[ ‘pa_’ . $attribute->attribute_name ] = array(
‘name’ => wc_attribute_label( $attribute->attribute_label ),
‘value’ => ‘pa_’ . $attribute->attribute_name,
);
}
}
return $options;
}$fields = array(
‘enabled’ => array(
‘description’ => esc_html__( ‘Description’, ‘woodmart’ ),
‘sku’ => esc_html__( ‘Sku’, ‘woodmart’ ),
‘availability’ => esc_html__( ‘Availability’, ‘woodmart’ ),
),
‘disabled’ => array(
‘weight’ => esc_html__( ‘Weight’, ‘woodmart’ ),
‘dimensions’ => esc_html__( ‘Dimensions’, ‘woodmart’ ),
),
);if ( count( $product_attributes ) > 0 ) {
foreach ( $product_attributes as $attribute ) {
$fields[‘disabled’][ ‘pa_’ . $attribute->attribute_name ] = $attribute->attribute_label;
}
}return $fields;
}May 3, 2023 at 5:27 am #463955
weedgeneralParticipantManaging a large number of products can be challenging, especially when it comes to assigning attributes. Doing so can require a significant amount of extra work, which can be time-consuming and tedious… please help me how to do with child theme becuse it’s really important. thank you 🙂
May 3, 2023 at 11:38 pm #464260
Elise NoromitMemberHello,
Unfortunately, we do not provide such a service. As soon as you install and activate the child theme you can create categories, tags and you do not need to create anything.
If you have any questions please feel free to contact us.
Best Regards
May 4, 2023 at 2:59 am #464290
weedgeneralParticipantcould you send me any php snippet to add the tags and categories in compare table fields
May 4, 2023 at 3:32 am #464304
Elise NoromitMemberHello,
We do not have such a snippet. Our support does not cover such a service.
WoodMart support covers guidance through the settings and fixing the bugs related to Woodmart only, if any.
If you have any questions please feel free to contact us.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register