If I disable cart fragment in woocommerce, the message in the mini-cart “no products in the cart, please visit store” is not displayed. Is there a way to display the message even when the cart fragment is turned off, the reason is better performance for users who did not add the product to the cart. For this to work I use the Disable Cart Fragments plugin. For most themes, this feature works and a message in mini cart is displayed, but unfortunately it doesn’t work for this theme, it could speed up page loading and put less load on the server. I have used this feature so far on all themes, even on a theme I made myself from scratch. The specified message should be displayed in the cart when the cookie “woocommerce_items_in_cart” is diferent from 1. I tried to change in woocommerce/cart/mini-cart.php insted <?php if ( ! WC()->cart->is_empty() ) : ?> new code I used in my custom theme <?php if (sizeof(WC()->cart->get_cart()) > 0) : ?> but it does not work, message is not shown, its just empty (no message and no go to store button)
Attachments:
You must be
logged in to view attached files.