Issue with Min/Max Quantity Steps Not Reflecting in “Request a Quote” Form
-
Hi!
I’m using the Min Max Control plugin from CodeAstrology Team to enforce minimum order quantities and step quantities for each product in my WooCommerce store. This is because we are a wholesaler. of For example, if a product is sold in boxes of 100 units, each step when increasing the quantity is 100 units. This works perfectly on the product pages and in the cart.
However, I’m experiencing an issue with your Request a Quote plugin. When adding products to the quote list, the form ignores these minimum order quantities and steps. No matter what quantities are set for the product, only 1 unit is added to the quote list.
Ideally, I need the Request a Quote plugin to respect the minimum quantities and steps set by the Min Max Control plugin. Specifically, when users add a product to the quote list, the minimum quantity should be the default value and the quantity should increase or decrease according to the step value.
I’ve already tried adding custom filters to modify the behavior, but unfortunately, this hasn’t resolved the issue. Could you provide guidance on how to achieve this or let me know if there’s a compatibility update planned to address this situation?
I’ve tried it with code, but it doesn’t work:add_filter( 'elex_quote_item_quantity', 'set_min_max_quantity_for_quote', 10, 2 );
function set_min_max_quantity_for_quote( $quantity, $product_id ) {
$product = wc_get_product( $product_id );
if ( $product->managing_stock() ) {
// Haal de min en max waardes op
$min_quantity = get_post_meta( $product_id, '_wc_min_qty', true );
$step_quantity = get_post_meta( $product_id, '_wc_step_qty', true );
// Stel de juiste hoeveelheid in op basis van de min en step
if ( $min_quantity && $step_quantity ) {
$quantity = max( $quantity, $min_quantity );
$quantity = round($quantity / $step_quantity) * $step_quantity;
}
}
return $quantity;
}Thank you for your support!
Best regards,
Leo
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.