Home Forums WoodMart support forum Wrong Quantity in the quantity input when click load more products Reply To: Wrong Quantity in the quantity input when click load more products

#553246

Hung Pham
Keymaster

Hi ohmytech.pl,

1. Actually the plugin you used is a third-party plugin and we have not tested such plugins officially with WoodMart theme so we are not able to suggest you on it.

2. Try to add the following PHP code snippet to the child theme functions.php file to fix this

if ( ! function_exists( 'woodmart_product_quantity' ) ) {
	function woodmart_product_quantity( $product ) {
		if ( ! $product->is_sold_individually() && ( 'variable' !== $product->get_type() || 'variation_form' === woodmart_get_opt( 'quick_shop_variable_type' ) ) && $product->is_purchasable() && $product->is_in_stock() && ! woodmart_get_opt( 'catalog_mode' ) ) {
			woodmart_enqueue_js_script( 'grid-quantity' );
			woocommerce_quantity_input(
				array(
					'min_value' => 12,
					'max_value' => $product->backorders_allowed() ? '' : $product->get_stock_quantity(),
				)
			);
		}
	}
}

Regards,