-
AuthorPosts
-
April 30, 2019 at 12:46 pm #1095735
Hey guys,
After upgrading to Woocommerce 3.6.2 and upgrading the Theme to 4.5.6 I need help with 2 issues:
1. I have now the ‘Add to Cart’ button showing on category pages and product grid element. I have tried other straight forward things on the theme setup as per https://kriesi.at/support/topic/disable-add-to-cart-button-on-shop-category-pages-display-on-product-page/ and that didn’t work.
2. On category and product grid element it is now showing the oldest product first where as before we had it configured to sort by most recent.
These issues only happened after the upgrade.
I have added the website in the private section, please help.
Many thanks.
May 1, 2019 at 1:50 pm #1096175Anyone there to help please? Thanks.
May 1, 2019 at 5:28 pm #1096208Hi,
Thank you for using Enfold.
Can you please create a WP admin account so we can check the backend please.
Also provide links to the pages that cause the problem.
Best regards,
GünterMay 1, 2019 at 6:17 pm #1096230Hi Günter,
I have added the info on private, thanks for your help and look forward.May 2, 2019 at 11:28 am #1096432Hi,
ad 2) WC seems to have changed something with the default sort order.
The safest way would be to open the element, look for option WooCommerce Sorting Order and select “descending” – that makes you independent from any WC implementation.
You also can replace in file enfold\config-woocommerce\config.php line 2416:
$order = ! empty( $orderby_value[1] ) ? $orderby_value[1] : 'ASC';
with
$order = ! empty( $orderby_value[1] ) ? $orderby_value[1] : 'DESC';
We will add this to the next update.
ad 1)
We use the default WC template woocommerce\templates\content-product.php to display the products.
Did you make any changes that might have been lost with the update?
As far as I remember the “Add to cart” button was always visible.Best regards,
GünterMay 2, 2019 at 10:35 pm #1096592Hi Günter,
ad 2) – Yes, I tried editing the element and that didn’t work either as per links below:
*LINKS IN PRIVATE*You will see the links above the config is correct. However, what I have noticed is that if I change the config under Dashboard -> Appearance -> Customize -> WooCommerce -> Product Catalog -> and select SORT BY PRICE (DESC), it actually corrects the order to show the most recent first. Please login and you will see what I mean. Therefore, I can only think there’s a bug. Please review this under my system and advise.
ad 1) – Here’s a link to the Enfold theme showing the category without the ‘Add to Cart’ button https://kriesi.at/themes/enfold-shop/product-category/men/ – this is how we have always had it and it’s only now since the update that this has changed.
Thanks for your attention and please advise.
Regards.
May 3, 2019 at 12:44 pm #1096887Hi,
I updated the file enfold\config-woocommerce\config.php line 2416 – Sorting now works as expeted.
Concerning the button:
This is not caused by Enfold.
Enfold adds its button in enfold\config-woocommerce\config.php line 351:
add_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button', 16);
If you replace this line with
// add_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button', 16);
which removes execution of our function and the button is still there – means our function is not called.
There must be some modification – but I cannot say what and where.
Try to disable all plugins – or do you have any custom templates?
I’m also running WC 3.6.2 and Enfold 4.5.6 and it works fine on my install.
Best regards,
GünterMay 3, 2019 at 1:27 pm #1096896the only thing I can address is the custom CSS below, could any of this be causing such a problem? I have no other modifications or custom templates. What do you think?
.av-main-nav > li > a {
font-weight: normal;
}.menu_header .container {
height: 30px;
}.main_color .toggler {
background: #ffebee;
color: #666666;
}.main_color .toggler:hover {
color: white;
background: #ffebee;
}.toggler, .main_color .toggler.activeTitle {
background: #ffebee;
color: #f8f8f8;
}.main_color .toggle_content {
background: #f8f8f8;
}.toggle_icon .vert_icon, .toggle_icon .hor_icon, span.toggle_icon {
border-color: #666666;
}.main_color .toggler, .main_color .toggler.activeTitle:hover {
background: #ffebee !important;
color: #666666 !important;
}.js_active .toggler { border: none !important; }
#top div .avia-gallery .avia-gallery-big {
border: none;
padding: 0;
}.image-overlay { display: none !important; }
.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close, div.avia-popup button.mfp-arrow:before { color: #000000; }
.mfp-zoom-in.mfp-ready.mfp-bg, .mfp-zoom-in.mfp-ready .mfp-preloader {
opacity: 1;
}
.mfp-zoom-in.mfp-ready.mfp-bg, .mfp-zoom-in.mfp-ready .mfp-preloader {
background-color: #ffffff;
}.header-scrolled #header_meta { display: none; }
#footer .container {
max-width: 100%;
}.product-sorting .sort-param-order ul > li:nth-child(3) {
display: none;
}.av_promobox {
background-color: red!important;
}.main_color .pagination span {color: #dd5575 !important;}
.main_color .pagination .current, .main_color .pagination a {background: #f0d1d9 !important;}.main_color .variations_form {
background-color: #ffebee;
border-color: #ffebee;
}.main_color a { color: #b34b5c; }
.alternate_color a { color: #b34b5c; }@media only screen and (max-width:767px) {
.responsive #top .cart_dropdown {
z-index: 100 !important;
}
}.main_color a, .alternate_color a {
text-decoration: none !important ;
}May 3, 2019 at 2:44 pm #1096916Hi,
No, not a CSS problem. CSS is not causing things in php.
The problem is that our hook for the filter “woocommerce_after_shop_loop_item” is not called.
Did you already try to disable plugins?
As a workaround we can try to hide the buttons with CSS.
Best regards,
GünterMay 4, 2019 at 4:45 pm #1097248Yes, after disabling all plugins the ‘add to cart button’ disappeared from the category pages when the plugin ‘Woocommerce Minimum and Maximum Quantity’ was disabled, found the culprit.
Thanks for resolving the issue with the ‘Sort by Most Recent’ in categories, of great help indeed and please close the case.
Best Regards.
May 5, 2019 at 10:19 am #1097373 -
AuthorPosts
- The topic ‘Unable to disable 'add to cart',button on category pages after upgrade.’ is closed to new replies.