WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Shopping overview for the cart in the header (1 post)

  1. rikardo85
    Member
    Posted 1 year ago #

    Hello,

    I am currently using some code (see below) to display the cart in the header. Once you add a product to the cart, the header automatically updates, which is fine.

    Below the cart I would like to display a quick overview for a couple of products along with the quantity, total price and a link to the checkout and basket

    Is there any functions to do this like:
    <?php echo $woocommerce->cart->get_cart_total(); ?>

    The total code I am using is

    <?php global $woocommerce; ?>
    
    <a class="cart-contents" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>">
    <?php echo sprintf(_n('%d item in basket', '%d items in basket', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?></a>
    
    <?php echo $woocommerce->cart->get_cart_total(); ?>

    Thanks

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic