Home Forums WoodMart support forum Cart fragtment

Cart fragtment

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #345574

    andrijamicic
    Participant

    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.
    #345768

    Hello,

    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

    #349016

    andrijamicic
    Participant

    It 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.

    #349116

    Hello,

    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

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)