Bug > Compare button x2 in related products and custom style don’t work

This topic has 23 replies, 3 voices, and was last updated 1 years, 11 months ago ago by MJJONE

  • Avatar: MJJONE
    MJJONE
    Participant
    October 14, 2022 at 07:26

    Hello,

    the compare button show up 2 times in Related products and the custom style don’t work.

    Check out the screenshots.
    https://1drv.ms/u/s!Aif1PELO0ACstY8jn-bj3KpFCZWCsA?e=kf6Fx6
    https://1drv.ms/u/s!Aif1PELO0ACstY8i2HhZ-Pk3r_Ow8A?e=hdvbxR
    Best,
    Richard

    22 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 14, 2022 at 07:35

    Hello,

    Please provide temporary wp-admin and FTP access, so we can take a closer look.

    Regards

    Avatar: MJJONE
    MJJONE
    Participant
    October 14, 2022 at 10:37

    Here it is.
    Thx.
    Best

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 14, 2022 at 10:48

    Hello,

    Update the theme and Core plugin to latest versions –
    https://www.8theme.com/documentation/xstore/theme-installation/theme-update/
    https://www.8theme.com/documentation/xstore/plugins/plugins-update/
    Then provide FTP access. If you do not know how to create FTP contact with your hosting provider, they will help you.

    Regards

    Avatar: MJJONE
    MJJONE
    Participant
    October 14, 2022 at 11:38

    I have updated but still same bug… Compare button show twice.

    Best,
    Richard

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 14, 2022 at 12:01

    Hello @MJJONE

    Yes, and we still need FTP access to your site to be able to help you.

    Regards

    Avatar: MJJONE
    MJJONE
    Participant
    October 14, 2022 at 12:18

    Oh sorry i though that the update fixed the issue…
    Here it is

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 14, 2022 at 12:26

    Thanks for the fast reply. I’ve passed this problem to our dev team. I will let you know once get an answer. Please be patient and do not change access.

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 14, 2022 at 16:23

    Fixed. Please check now.

    Regards

    Avatar: MJJONE
    MJJONE
    Participant
    October 14, 2022 at 16:33

    That’s great thx.

    But what about custom design for COMPARE button works only for product page and not for other cases like related products or category pages ?

    Best

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 14, 2022 at 16:42

    You’re welcome!

    This is not a bug, but a predefined behavior, because the Custom design option is a part of the Single product Builder > Compare element, it affects only the product page

    Regards

    Avatar: MJJONE
    MJJONE
    Participant
    January 20, 2023 at 07:48

    Hello that bug is still present in the latest release of the theme.

    How to fix it by myself ?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 20, 2023 at 09:36

    Hello, MJJONE

    We apologize, but could you please clarify which bug you are referring to? Thank you in advance.

    Best regards,
    8theme team

    Avatar: MJJONE
    MJJONE
    Participant
    January 20, 2023 at 09:46

    the compare button show up 2 times in Related products

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 20, 2023 at 14:49

    Hello, MJJONE

    Please add the below code to Theme Options > Custom CSS:

    .product-details .compare + .compare {
        display: none !important;
    }

    Check how it works then.

    Waiting for your reply.

    King Regards,
    8theme team

    Avatar: MJJONE
    MJJONE
    Participant
    January 20, 2023 at 14:57

    I though there was another way to fix the bux.

    Your css not good for me.

    For me the correct working css is that one :
    .related-products .content-product .compare + .compare {
    display: none !important;
    }

    thx
    best

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 20, 2023 at 15:01

    Hello, MJJONE

    We are pleased that you have resolved the issue.
    Thank you for informing us.

    King Regards,
    8theme team

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    January 20, 2023 at 15:02

    Hello @MJJONE,

    We are pleased to hear that you were able to resolve your issue with your own custom CSS. You are certainly very skilled!

    Do you require any further assistance from us? Please do not hesitate to let us know.

    Best Regards,
    8Theme’s Team

    Avatar: MJJONE
    MJJONE
    Participant
    January 20, 2023 at 15:08

    I’m not very skilled as you.

    But why not a php fix for that bug in new theme release ?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 20, 2023 at 17:09

    Hello @MJJONE,

    Ok, let’s describe the details from the code side. YITH Compare plugin has its own PHP class which is used for main actions. As you may see from the next screenshot -> https://prnt.sc/4qOwu7lZ3PgO YITH_Woocompare_Frontend class does not have a method for getting the instance of itself so any other theme/plugin could ask the main YITH_Woocompare_Frontend class for calling its functions in the places where someone needs. But according to the situation, YITH Compare plugin not providing such methods, we are calling that YITH_Woocompare_Frontend class one more time inside our files -> https://prnt.sc/L3fxOpOOnozXand call the next function of this class -> add_compare_link(). It is done to show compare button in our Single Product builder. But calling that class make a trigger of __contstruct main function of YITH_Woocompare_Frontend class where they add their buttons on each action ‘woocommerce_after_shop_loop_item’ -> https://prnt.sc/lFFSJtJi4KRd so that is why you have double compare buttons. To prevent the such situation we recommend you use our Built-in Compare or use the custom CSS we shared before.
    We hope, our ‘coding knowledge information’ was useful.

    King Regards,
    8theme team

    Avatar: MJJONE
    MJJONE
    Participant
    January 20, 2023 at 18:59

    Ouch too much code for me 🙂

    It was just a question … but why not a condition like that :

    if YITH_Woocompare is ON in related product section then add the css code i have added or another css code according the style template set for displaying products.

    I do not know very much in coding :p

    Best,

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 21, 2023 at 12:55

    Hello, MJJONE,

    We provided that CSS solution for you and it was the most real solution for this time we have. You asked us why it is so, and we described to you in detail why it is as it is. Many of our customers already use built-in Compare & built-in Wishlist so they don’t need those CSS lines to load (every byte will increase in kilobyte sometimes).

    King Regards,
    8theme team

    Avatar: MJJONE
    MJJONE
    Participant
    January 24, 2023 at 18:35

    Perfect.

    Thx

  • Viewing 23 results - 1 through 23 (of 23 total)

The issue related to '‘Bug > Compare button x2 in related products and custom style don’t work’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.