Comments Rob started the conversationJune 6, 2024 at 12:02pmI want anĀ item 3210 to be excluded from the Minimum Order Value Rule so that customers can order item 3210 without having to reach the MOQ of 100,- minimum order value.Hope that makes sense! 2,283WebWizards repliedJune 8, 2024 at 4:45pmHello Rob,I believe you can use the following PHP code snippet for that: add_filter('b2bking_minmax_order_total_calculation_basis', function($value){ $cart = WC()->cart->get_cart(); $product_id_to_exclude = 1234; $has_another_item = false; foreach ($cart as $cart_item_key => $cart_item) { if ($cart_item['product_id'] == $product_id_to_exclude || $cart_item['variation_id'] == $product_id_to_exclude) { // this item } else { $has_another_item = true; } } if ( ! $has_another_item ){ $value = 99999999; } return $value; }, 10, 1);Replace 1234 with the ID of the product.It should allow ordering that product regardless of MOQ.Kind regards,Thomas1 Like Sign in to reply ...
I want anĀ item 3210 to be excluded from the Minimum Order Value Rule so that customers can order item 3210 without having to reach the MOQ of 100,- minimum order value.
Hope that makes sense!
Hello Rob,
I believe you can use the following PHP code snippet for that:
Replace 1234 with the ID of the product.
It should allow ordering that product regardless of MOQ.
Kind regards,
Thomas