This topic has 23 replies, 3 voices, and was last updated 1 years, 11 months ago ago by MJJONE
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
Hello,
Please provide temporary wp-admin and FTP access, so we can take a closer look.
Regards
Here it is.
Thx.
Best
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
I have updated but still same bug… Compare button show twice.
Best,
Richard
Hello @MJJONE
Yes, and we still need FTP access to your site to be able to help you.
Regards
Oh sorry i though that the update fixed the issue…
Here it is
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
Fixed. Please check now.
Regards
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
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
Hello that bug is still present in the latest release of the theme.
How to fix it by myself ?
Hello, MJJONE
We apologize, but could you please clarify which bug you are referring to? Thank you in advance.
Best regards,
8theme team
the compare button show up 2 times in Related products
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
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
Hello, MJJONE
We are pleased that you have resolved the issue.
Thank you for informing us.
King Regards,
8theme team
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
I’m not very skilled as you.
But why not a php fix for that bug in new theme release ?
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
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,
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
Perfect.
Thx
Tagged: compare, custom style, json, related products, woocommerce, wordpress
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