Title: Minimum Quantities
Last modified: February 20, 2019

---

# Minimum Quantities

 *  [Mike-bd](https://wordpress.org/support/users/mikekharisma/)
 * (@mikekharisma)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/minimum-quantities-2/)
 * Hi
    I’m using your plugin which is great, but I have one major issue.
 * I have a minimum order quantity on check out, but the bundled products counts
   as only one item in check out instead of the number of items in the bundle.
 * I really need the number of items I have in a bundle to be counted in the basket
   quantity??
 * Many Thanks
    Mike

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/minimum-quantities-2/#post-11230535)
 * Hi Mike,
 * no, I’m sorry but you want it’s not possible because the bundle, like you write
   before, is a single product.
 * However, I think you can use the hook `woocommerce_cart_contents_count` to reach
   your goal.
    First of all you need to remove the customization added by our bunlde
   plugin and then with the same hook remove the bundle and use only the bundle 
   item in cart.
 * Please, try to add this snippet of PHP code at the end of fucntions.php file 
   located in the main root of your theme:
 *     ```
       if ( !is_admin() && function_exists( 'YITH_WCPB_Frontend' ) && !function_exists( 'yith_wcbp_customization_remove_bundles_from_cart_count' ) ) {
           remove_filter( 'woocommerce_cart_contents_count', array( YITH_WCPB_Frontend(), 'woocommerce_cart_contents_count' ), 10 );
           add_filter( 'woocommerce_cart_contents_count', 'yith_wcbp_customization_remove_bundles_from_cart_count', 10, 1 );
   
           function yith_wcbp_customization_remove_bundles_from_cart_count( $count ) {
               $cart_contents = WC()->cart->cart_contents;
   
               $bundle_count = 0;
               foreach ( $cart_contents as $cart_item_key => $cart_item ) {
                   if ( !empty( $cart_item[ 'cartstamp' ] ) ) {
                       $bundle_count += $cart_item[ 'quantity' ];
                   }
               }
   
               return intval( $count - $bundle_count );
           }
       }
       ```
   
 * Let me know
 *  Thread Starter [Mike-bd](https://wordpress.org/support/users/mikekharisma/)
 * (@mikekharisma)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/minimum-quantities-2/#post-11231784)
 * Works like a dream!! 🙂 Many many thanks.
    Mike
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/minimum-quantities-2/#post-11257991)
 * 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Minimum Quantities’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-product-bundles/assets/icon.svg?rev=3042023)
 * [YITH WooCommerce Product Bundles](https://wordpress.org/plugins/yith-woocommerce-product-bundles/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-product-bundles/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-product-bundles/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-product-bundles/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-product-bundles/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-product-bundles/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/minimum-quantities-2/#post-11257991)
 * Status: not resolved