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

Wrong Quantity in the quantity input when click load more products

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #552831

    ohmytech.pl
    Participant

    I am wholesale store and for each products we sell 10 or 12 pieces at once but when we load more products in the website, it shows 1 piece (for preload products it’s working fine). We have only problems when click load more products or click another tabs in the ajax product tabs

    #553042

    Hung Pham
    Keymaster

    Hi ohmytech.pl,

    Thanks for reaching to us.

    Please note that we do not give a guarantee for full theme compatibility with all existing 3rd party plugins. Sometimes, not always, you need additionally customize the theme or plugin to make them work together.

    Unfortunately, it’s not possible for the author to make the theme compatible with all the existing plugins and additional customization is outside the scope of our basic support.

    If you have any questions please feel free to contact us.

    Regards,

    #553127

    ohmytech.pl
    Participant

    By the way, do you know any min./max quantity plugins that working fine with the theme?

    #553184

    ohmytech.pl
    Participant

    I want to make some changes with the code to make the plugins compatible. I tried to find out which files should i change but i cant find the one for that. Could you help with the structure of the theme so i can make some changes in the code by myself. i just need the location of the files and which files should i change.

    #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,

Viewing 5 posts - 1 through 5 (of 5 total)