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

WP SITES

2893

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Custom Cart Total For Set Number of Items In Specific Product Category – WooCommerce

This PHP code enables you to set a total fixed price if a set quantity of products are purchased from a specific category in WooCommerce.

In this example, we set the product quantity at 4 items in the shoes category and the cart total is modified to a price set at $150 rather than the normal subtotal of $179.96.

You can easily set :

  • any price for the cart total
  • any product category
  • any total quantity

Demo Video

Shows the total price set to a custom value when a set number of products is added from a specific category on the cart page. When the quantity is above or below the set count or the products are not from the set category, the price is not modified and original price is displayed.

Installation

There’s only 1 step :

Copy & paste the PHP code to the end of your child themes functions file or custom functionality plugin.

Download Folder

Related Code Snippets

  • Custom Cart Total for Subtotals in Specific Categories

WooCommerce

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis & WooCommerce.

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Contact
  • Terms
  • Genesis WP Tags
  • WooCommerce
 

Loading Comments...
 

You must be logged in to post a comment.