Home Forums WoodMart support forum Yith Compare Conflict with Woodmart

Yith Compare Conflict with Woodmart

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #326059

    Brande
    Participant

    I’m using Woodmart theme on my site (details shared privately). I tested the plugin YITH WooCommerce Compare Premium on Hello Elementor theme and it worked fine. When I activated the child theme of Woodmart (minimalism), the YITH Compare premium plugin stopped working the way it is expected to work.

    The problem I’m facing is this:

    When I add a few products to compare, it allows me the first time to add upto four products (following the restriction set in the plugin). I can see the comparison table on the Compare page. But when I try to remove an item or clear all items, it redirects me to the shop page. The items previously added to compare remain within the table and wouldn’t allow me to make another comparison.

    This happens despite the Compare and Wishlist function within Woodmart theme having been disabled prior to activating YITH Compare.

    It appears to be a conflict caused by some script Woodmart is using to enable the compare features within the theme that wouldn’t go away by just disabling the compare function in the theme settings.

    I have ruled out all other possible issues by keeping only the barebones plugins. Even the products I have added are dummy.

    I also followed and implemented the resolution suggested here by you: https://xtemos.com/forums/topic/yith-compare-premium-integration/#post-209651 . The problem still persists.

    I bought the Woodmart theme for several valid reasons, and also because I liked the Wishlist and compare features. But while using it, I realised that there was no way to limit the number of products that could be added, which could lead to a person adding ten or twenty products to compare at once. Also, it doesn’t allow me to restrict the comparison within a category. That’s why I had to choose YITH Compare. I want to keep both the Woodmart theme and YITH plugin.

    Please resolve this issue.

    #326116

    Hello,

    When you add Compare/Wishlist plugins, you need to disable the same functionality in the Theme Settings > Shop > Compare/ Wishlist. Please disable and check again. You say it worked on the parent theme and stopped working on the child, most likely your customization influences. If it works on the parent theme you should search the reason for the customization you add.

    If you have any questions please feel free to contact us.

    Best Regards

    #326121

    Brande
    Participant

    1. I had mentioned in my ticket that I had first disabled the Compare and Wishlist features within Woodmart before enabling YITH Conmpare Premium plugin. I had followed that logical step but the problem is present (unable to remove products added to compare)
    2. It’s not an issue with parent/child themes of Woodmart, or my customisations within Woodmart theme. There’s hardly any customisation I have done other than disabling Woodmart Compare and Wishlist features. There’s no chance of conflict with other plugins either, as I’m keeping only the most essential ones.

    3. I said YITH Compare premium plugin worked fine when using HELLO ELEMENTOR theme. It doesn’t function properly when using either Woodmart parent theme or child theme (cannot remove products added to compare).Choosing Woodmart parent over the child theme doesn’t help resolve the issue. I have tried that, too.

    Unfortunately, your reply is not helpful at all, as it ignored the facts that I had originally stated in my ticket. I had searched the forum and implemented all possible solutions before I posted my ticket. Please look into it and help me resolve it.

    #326276

    Hello,

    Please add this code to the functions.php of the child theme:

    function woodmart_is_new_label_needed( $product_id ) {
    	$product = wc_get_product( $product_id );
    
    	if ( ! $product_id || ! $product ) {
    		return false;
    	}
    
    	$date         = get_post_meta( $product_id, '_woodmart_new_label_date', true );
    	$new          = get_post_meta( $product_id, '_woodmart_new_label', true );
    	$newness_days = woodmart_get_opt( 'new_label_days_after_create' );
    	$created      = strtotime( $product->get_date_created() );
    
    	if ( $new ) {
    		return true;
    	}
    
    	if ( $date && time() <= strtotime( $date ) ) {
    		return true;
    	}
    
    	if ( $newness_days && ( time() - ( 60 * 60 * 24 * $newness_days ) ) < $created ) {
    		return true;
    	}
    
    	return false;
    }

    Best Regards

    #326307

    Brande
    Participant

    I did as you suggested. It works perfectly fine now. Thank you very much. That’s great support.

    #326308

    We are always happy to help you, write to us when you have any difficulties or issues with our theme.

    We would be grateful for 5 stars rate on http://themeforest.net/downloads in case you are satisfied with our theme and customer service

    Thank you in advance

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

The topic ‘Yith Compare Conflict with Woodmart’ is closed to new replies.