• 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

    • This topic was modified 1 month, 1 week ago by leozee888.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author ELEXtensions

    (@elextensions)

    Hello @leozee888 ,

    Thank you for reaching out to us. We have thoroughly checked the feasibility of resolving the compatibility conflict between the Min Max Control plugin and our Request a Quote plugin. However, we found that the plugin Min Max Control manages the quantity conditions and stores data in a way that is specific to each user. Due to this, it is not possible for us to directly resolve the compatibility issue from our end.

    We recommend contacting the support team of the Min-Max Control plugin to assist with this matter. Please share the following details with them:

    Our plugin uses jQuery to fetch product quantities. They may need to review how our quote button interacts with their quantity settings and compare it with the WooCommerce cart button. We suggest that they utilize our plugin’s quote button hooks to apply the minimum, maximum, and step conditions when products are added to the quote form.

    Path – plugin/assets/js/components/quote_list/add_to_quote.js
               plugin_folder/view/quote/add_to_quote.php

    We hope this is helpful. Please feel free to reach out if you have any other questions.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.