• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Add WooCommerce Cart Quantity & Total Price To Nav Menu

This code enables you to add both the cart quantity ( count ) and the cart total ( price ), to any WordPress nav menu. The price is also linked to the shopping cart page when clicked.

Update : Here’s a newer version which uses Dashicons

Tested on the Gallery Pro child theme:

woo-cart-total

Also tested on the Genesis Sample child theme:

genesis-sample

Note: The code varies slightly for each child theme. 2 working examples are included in this tutorial as seen in the above screenshots. May need tweaking for use in other Genesis and WordPress themes. Also note, the count for both quantity and price only update on page refresh. The ajax used on the cart page to update quantity and price do not update the nav menu figures.

The code enables you to choose which menu to filter so you can add the count and price to the primary, secondary or any other menu.

Here’s the code for logged in members:

Register for full access

Closely Related Code

  • Add WooCommerce Cart Count & Total Price To Genesis Nav Menu
  • Add WooCommerce Shopping Cart Basket To Nav Menu In Genesis

WooCommerce

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems