Custom Mini Cart With Quantity for WooCommerce

$75.00
Quick Demo

The code in this download creates a shortcode you can use to display a mini cart in any widget area, hook or file. The mini cart :

  • Updates automatically when the quantity is changed.
  • By default displays the product thumbnail, product name, quantity and subtotal.
  • Includes buttons for the cart and checkout pages.

Basically, the code creates a custom cart widget for WooCommerce for users not using the cart block.

Demo Video

Shows products added to the cart displaying using the [[custom_cart]] shortcode in the primary sidebar with the quantity and sub total automatically updated when increased or decreased.

Installation

There’s 3 steps :

  1. Upload the files named new-cart-totals.php and custom-cart.php to your child theme folder.
  2. Copy and paste the PHP code ( without the opening PHP tag ) to the end of your child themes functions file.
  3. Copy and past the CSS to the end of your child themes style sheet and clear caching.

Usage

There’s 3 options :

  1. You can use the shortcode in any widget area
  2. Hook the shortcode in using any action hook
  3. Add the shortcode to any template

Example for template usage :

echo do_shortcode('[custom_cart]');

Example for action hook usage in functions file :

add_action('your_action_hook', 'hook_block' );
function hook_block() {

     echo do_shortcode('[custom_cart]');

}

These solutions may also help :