woocommerce how to empty cart

Description

This is Woocommerce Empty Cart extension which helps to make cart empty.

Screenshots

  • WooCommerce Backend Settings "General" page.
  • This is Front-End Empty Cart Page. By Clicking on that you can clean your cart.

Installation

1.Download the Netaxept Payment Gateway plugin zip file and extract to the /wp-content/plugins/ directory.
2.Activate the plugin through the ‘Plugins’ menu in WordPress Admin.

1.Download the Netaxept Payment Gateway plugin zip file and extract to the /wp-content/plugins/ directory.
2.Activate the plugin through the ‘Plugins’ menu in WordPress Admin.

Is it woo commerce supported?

Yes. It is a woo commerce plugin.

Do I need to install woocommerce plugin?

Yes, you should install woocommerce plugin first.

Nederlands

Deze plugin is meer dan 2 jaar niet meer bijgewerkt. Mogelijk wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

Woocommerce Empty Cart Button

Omschrijving

This is a fairly basic plugin and adds a empty cart button to woocommerce cart page.

Supports Multiple languages.

Spanish translation included in plugin.

Schermafdrukken

  • Empty Cart Button in Action

Installatie

  1. Download the Woocommerce Empty Cart Button plugin file
  2. Unzip the file into a folder to your computer
  3. Upload the /woocommerce-empty-cart-button/ folder to the /wp-content/plugins/ folder on your site
  4. Visit the plugins page in WordPress Admin to activate the Woocommerce Empty Cart Button plugin

Woocommerce by deafult does not have empty cart button on cart page, this plugin shows the empty cart button on cart page.

How to assign custom css design to empty cart button ?

Empty cart button have “emptycart” class assigned with it, so user can easily assign new style to empty cart button using css.

Does this plugin works with any language ?

Yes in version 1.1 we have added language support. You need to create .mo file for the language you want and need to place it in languages folder of plugin.

Bijdragers & ontwikkelaars

“Woocommerce Empty Cart Button” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

How to Check if the WooCommerce Cart is Empty

We had an interesting question the other day from a user who wanted to know if it’s possible to do something only when the WooCommerce cart is empty. WooCommerce core includes several handy methods that can help you out with this, but lots of tutorials show a cart-empty check with the $woocommerce global. However, this is only necessary if working with WooCommerce 2.0 or earlier. You can instead use the WC() global function to cut this down a bit with WooCommerce 2.1 or newer.

We can do our check by using the WC() global function and getting the cart contents count. While there are several ways we could check this, I prefer this method since it returns as an integer, so we simply need to check if it’s equal to zero to determine if the cart is empty.

That’s all you need to check if the WooCommerce cart is empty in your own snippet or plugin.

Let’s take a look at a real use-case. Suppose you want to show a notice in your store if the cart is empty – perhaps this could encourage a promotion or inform customers of coupon codes. It also works really well as a companion to our WooCommerce Cart Notices extension, as this displays notices if items are in the cart.

We’ll create a notice that will only display if there are no products in the cart, and you can determine where you’d like to display the notice (based on which actions you choose to add it to).

Adding the first action will add this to the empty cart template:

While adding the second action will then display this throughout the rest of the WooCommerce pages, such as the shop archives and product pages.

Our notice will display while the WooCommerce cart is empty, then disappear once an item has been added to the cart (which is a great time to let Cart Notices take over!).

Like it? Share the love:

Published by Beka Rice

Beka leads product direction for SkyVerge, focusing on new features for our plugins and Jilt. She spends a lot of time on research and interviews, but likes to write so she has an excuse to spend more time jamming out to anything from The Clash to Lady Gaga.

Leave a Reply

Your email address will not be published. Required fields are marked *