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

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Checkout
  • Cart
  • Videos

Minimum Quantity Per Product in WooCommerce

$75.00

Demo Video
Category: WooCommerce Tags: 'woocommerce_admin_process_product_object, woocommerce_available_variation, woocommerce_check_cart_items, woocommerce_product_options_general_product_data, woocommerce_save_product_variation', woocommerce_variation_options_pricing
  • Description

This code enables the store owner to set a minimum number of items to be purchased for any simple or variable product in WooCommerce. If the customer order is below the minimum quantity :

  • A error message is displayed on the cart page.
  • The Proceed to Checkout button is removed until order quantities are increased to the minimum amount.

Cart Page Minimum Order Required Error Message

This code forces the buyer to order the minimum amount otherwise they cannot proceed to checkout.

Demo Video

Shows the Minimum Quantity text field added to both simple products and variable products. When the quantity added to cart to below the minimum, a notice is displayed on the cart page forcing a minimum order amount and removing the proceed to checkout button until the quantity is increased.

Installation

Install the zip folder as a new plugin or copy and paste the PHP code from the functions file to the end of your child themes functions file or custom functionality plugin.

Configuration

Simple Products – Minimum Quantity Limits

To configure quantity limits for a simple product:

  1. Edit the product.
  2. Navigate to the Product Data – Simple Product > General tab.
  3. Set the Minimum Quantity.

Edit Simple Product Quantity Limit

Min Qty — Minimum required quantity for this product per order.

Variable Products – Minimum Quantity Limits

To configure quantity limits for a product variation :

  1. Navigate to Product Data > Variable Product > Variations.
  2. Locate the variation you need to edit and expand its settings.
  3. Set the Minimum quantity.

Edit Variable Product Minimum Quantity

Minimum Quantity — Minimum required quantity for this variable product.

Primary Sidebar

Cart

Code written by Brad Dalton specialist for WooCommerce with more than 10 years of experience.

Advertise · WPEngine · Genesis · Log in

  • Code Snippets
  • Tutorials
  • Videos
  • Account
  • Checkout
  • Cart
 

Loading Comments...
 

You must be logged in to post a comment.