WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Show "your cart is empty" on shopping cart widget (3 posts)

  1. dominik01
    Member
    Posted 7 months ago #

    Hi in options of shopping cart widget there is option to hide a shopping cart if it is empty. However I dont want to hide it but I want to make some text like "Your cart is empty" appear. Now it just says your shopping cart without any message.
    I didnt find anything in options so I tried some php modification but I didnt solve it by myself.

    Please help
    Thanks

    http://wordpress.org/plugins/woocommerce/

  2. elina-cristina
    Member
    Posted 7 months ago #

    You can make it by editing the widget cart php file. Go to plugins > woocommerce > classes > widgets. Open class-wc-widget-cart.php file.
    Go to line 70 or so and find this part of code and place your message just like shown below:

    // Insert cart widget placeholder - code in smtcommerce.js will update this on page load
    echo '<div class="widget_shopping_cart_content">EMPTY CART OR WATEVER MESSAGE YOU WANT</div>';
  3. stof77
    Member
    Posted 7 months ago #

    Sorry to the jump into this topic, but as I have the exact same problem with the cart widget, I just tested succesfully your solution,

    so thank you elina-cristina, though I found it strange that there is not a default message for the empty cart, or maybe there is and for any reason, it wasn't working (using a french version of WP btw) ?

Reply

You must log in to post.

About this Plugin

About this Topic