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..

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #463902

    weedgeneral
    Participant

    how to can i add categories and tags in compare table..

    Attachments:
    You must be logged in to view attached files.
    #463928

    Hello,

    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

    #463954

    weedgeneral
    Participant

    hi 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;
    }

    #463955

    weedgeneral
    Participant

    Managing 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 🙂

    #464260

    Hello,

    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

    #464290

    weedgeneral
    Participant

    could you send me any php snippet to add the tags and categories in compare table fields

    #464304

    Hello,

    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

Viewing 7 posts - 1 through 7 (of 7 total)