This code displays the total quantity of products in 1 or more set categories along with the total subtotal price without adding products in other categories.
The code enables you to :
- Use a custom function to modify
- Use a custom function to modify the cart quantity
- Includes child/sub terms.
- Works with any taxonomy terms.
- Dynamically update the cart subtotals using ajax without the need to reload any pages.
- Add the cart content subtotals to your nav menu.
Both the total quantity and total price for products in set categories are updated dynamically on the cart page. This does not affect the subtotal on the cart page or on the checkout page as seen in the demo video.
Shows products from multiple categories added to the cart but only displaying the cart item count and sum of subtotals for products in a specific category or taxonomy term.
There’s 2 steps :
Step 1 – Swap out your category, tag or other taxonomy term slug on lines 25 and 58 of the plugin.php file.
Step 2 – Install the download folder as a new plugin or copy & paste the PHP code to the end of your child themes functions.php file or custom functionality plugin.