Adding an Empty Cart button to the cart page

If you have the type of store where people are constantly comparing prices, adding products to their cart, removing them, and then starting all over again, it might be worth your while to add in an Empty Cart button.

WooThemes keeps WooCommerce as light as possible. An empty cart button is useful to some stores but it takes up valuable space in other stores. For that reason, it isn't included in WooCommerce. As with many other enhancements, there is a free plugin that can do this for us.

How to do it…

Adding the empty cart button is really simple. To get started, we need to add a plugin. Work through the following steps:

  1. In the WordPress admin, click on the Plugins menu and click on Add New.
  2. Look for the Woocommerce Empty Cart Button plugin.
  3. Install and activate the plugin.

And this is all we have to do. This plugin does just one thing and does it well. There aren't any settings. The plugin adds the Empty Cart button and that's it.

How to do it…

How it works…

This plugin adds some extra HTML to the list of products on the cart page. The plugin also contains a function that listens for a button push and then empties the cart.

There's more...

If you want to style the Empty Cart button, it already has a class assigned to it. You can use the emptycart class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset