• Hello,

    There is a mild incompatibility with the official extension Woocommerce Composite Products.

    When min or max options are set in a composite component, these values are used to validate the cart (and prevent adding to cart), but they are not reported in the input field like they are usually when Quantity Field on Shop Page isn’t enabled.

    This leads to :

    1. possibility to enter invalid number
    2. error with no explanation and composite product not added to cart

    I think the problem stands in line 58 : there should be a way to determine when it’s normal display and when it’s WCCP display.

    Though I’m not sure how WCCP would allow that.

    Thanks in advance.

    FTR, in DEBUG mode, the error messages are :

    
    Notice: Array to string conversion in .../wp-includes/kses.php on line 1685
    Warning: preg_match() expects parameter 2 to be string, array given in .../wp-includes/class-wp-block-parser.php on line 417
    Warning: strlen() expects parameter 1 to be string, array given in .../wp-includes/class-wp-block-parser.php on line 489
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wooassist

    (@wooassist)

    @nxmndr we will look into this

    Thread Starter nxmndr

    (@nxmndr)

    What I did in the meantime :

    let obj = {
      resetCompositeQtyToOne: function () {
        jQuery('.composite_component .input-text.qty.text').val(1)
      }
    }
    // trigger on composite step change event
    jQuery('.composite_data').on('wc-composite-initializing', function(event, composite) {
      composite.actions.add_action('component_selection_changed', obj.resetCompositeQtyToOne, 1000, obj)
    });
    Thread Starter nxmndr

    (@nxmndr)

    Hi,

    Same problem with Product Bundles. Any news ? Do you know of plugins similar to yours ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug with Composite Products min/max quantity’ is closed to new replies.