Home Forums WoodMart support forum Features Requests Reply To: Features Requests

#84990

Jakob40004000
Participant

You guys solved the problem by adding this CSS:

function woodmart_compare_btn() {
if( ! class_exists( ‘YITH_Woocompare’ ) ) return;

if( get_option(‘yith_woocompare_compare_button_in_products_list’) != ‘yes’ ) return;

echo ‘<div class=”product-compare-button”>’;
global $product;
$product_id = $product->get_id();

// return if product doesn’t exist
if ( empty( $product_id ) || apply_filters( ‘yith_woocompare_remove_compare_link_by_cat’, false, $product_id ) ) {
echo ‘</div>’;
return;
}

$is_button = ! isset( $button_or_link ) || ! $button_or_link ? get_option( ‘yith_woocompare_is_button’ ) : $button_or_link;

if ( ! isset( $button_text ) || $button_text == ‘default’ ) {
$button_text = get_option( ‘yith_woocompare_button_text’, esc_html__( ‘Compare’, ‘woodmart’ ) );
}

printf( ‘%s‘, woodmart_compare_add_product_url( $product_id ), ‘compare’ . ( $is_button == ‘button’ ? ‘ button’ : ” ), $product_id, $button_text );

echo ‘</div>’;
}

Next problem however, was that YITH Badge management and YITH Compage (Both premium, no problem when using free) were conflicting and causing the “Remove” not to function.

This can be solved (YITH Support) by doing this:

Please consider making the Premium version functional in future update without all this custom CSS stuff 🙂 I would think alot of people would like to use both plugins in theis premium version..

The solution was:

I fixed the issue adding following CSS code in Appearance -> Customize -> Additional CSS

table.compare-list .remove {
z-index: 100;
position: relative;
}

.yith-wcbm-badge-image {
z-index: 50;
}

Please consider a full compability with both premium plugins in future updates