Home › Forums › WoodMart support forum › Cart fragtment
Cart fragtment
- This topic has 3 replies, 2 voices, and was last updated 2 years, 10 months ago by Elise Noromit.
-
AuthorPosts
-
January 15, 2022 at 11:08 am #345574
andrijamicicParticipantIf 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.January 16, 2022 at 9:52 pm #345768
Elise NoromitMemberHello,
The shopping cart is the Woocommerce functionality and the WoodMart theme does not influence that.
Please make the full backup of your site and check the issue on the Storefront theme to detect if our theme causes the problem. Storefront is a free theme developed by WooСommerce.Best Regards
January 30, 2022 at 11:35 pm #349016
andrijamicicParticipantIt is really true that StoreFront doesn’t support it either.
Additional bug that I also noticed is that the fragment stops working when pressed back into the browser, and does not work on some older phones until the product is added to the cart.
It is strange that on the simple site I made everything works, I did not use woocommerce template system for minicart, but completely custom cart template.
January 31, 2022 at 11:48 am #349116
Elise NoromitMemberHello,
If you see the same problem on the Storefront, it means the WoodMart theme does not cause the issue. By default, when there is no product in the cart, there is the message to visit the shop.
Best Regards
-
AuthorPosts
Tagged: minicart
- You must be logged in to create new topics. Login / Register