Tested Trending Bestseller Perfect rating

Product Quantity for WooCommerce

(3 customer reviews)

From: $19.99 / year

Manage product quantity with Product Quantity for WooCommerce plugin, beautifully.

Clear

Description

Product Quantity for WooCommerce plugin lets you manage product quantities for order (i.e. cart) in WooCommerce.

You can set minimum and/or maximum product quantities in three different ways:

  • Cart total quantity – will check minimum and/or maximum quantity for all products in cart (i.e. sum of all quantities).
  • Per item quantity – will check minimum and/or maximum quantity for each product in cart. This value is applied to all products (i.e. same minimum and/or maximum quantity for each item).
  • Per item quantity on per product basis – similar to “Per item quantity”, but lets you set different minimum and/or maximum quantity for every product. Works with variable products (i.e. different quantities can be set for each variation).

Additionally you can control quantity step – for all products or on per product basis.

Product Quantity for WooCommerce plugin also includes these features:

  • enabling decimal quantities in WooCommerce,
  • replacing standard WooCommerce quantity number input with dropdown,
  • setting exact (i.e. fixed) allowed or disallowed quantities (as comma separated list),
  • validating and (optionally) correcting quantities on add to cart button click,
  • forcing initial quantity on single product page and/or archives to either min or max quantity,
  • setting quantity input style,
  • customizing messages your customer sees,
  • enabling/disabling cart notices,
  • optionally stopping customer from reaching the checkout page on wrong quantities,
  • adding product quantity info on single product and/or archive pages.

Product Quantity Options

Plugin settings are located in “WooCommerce > Settings > Product Quantity”.

Product Quantity for WooCommerce
Enabled/disables the plugin. May help if you want to configure plugin’s settings, before applying it on frontend.
Default: yes

General Options

Product Quantity for WooCommerce - General Options

Decimal quantities
If enabled you will be able to enter decimal quantities in step, min, max etc. quantity options.
Default: no
"Add to cart" validation
Possible values: Do not validate; Validate and add notices; Validate and auto-correct quantities.
Default: Do not validate
"Add to cart" validation: Step auto-correct
Ignored unless “Validate and auto-correct quantities” option is selected above. Possible values: Round; Round up; Round down.
Default: Round
Cart notices
Enables/disables customer notices on the cart page.
Default: no
Block checkout page
Stops customer from reaching the checkout page on wrong quantities. Customer will be redirected to the cart page.
Default: no

Force Quantity Options

Product Quantity for WooCommerce - Force Quantity Options

Force initial quantity on single product page
Possible values: Do not force; Force to min quantity; Force to max quantity.
Default: Do not force
Force initial quantity on archives
Possible values: Do not force; Force to min quantity; Force to max quantity.
Default: Do not force
Force minimum quantity
Will force all minimum quantities to 1. This includes cart items, grouped products etc. Ignored if “Minimum quantity” section is enabled.
Default: no

Variable Products Options

Product Quantity for WooCommerce - Variable Products Options

Load all variations
For compatibility with some other plugins, e.g. with “YITH WooCommerce Quick View” plugin.
Default: no
On variation change
Possible values: Do nothing; Reset to min quantity; Reset to max quantity.
Default: Do nothing
Sum variations
Default: no

Minimum Quantity Options

Settings are located in “WooCommerce > Settings > Product Quantity > Minimum Quantity”.

Product Quantity for WooCommerce - Minimum Quantity Options

Minimum quantity
Enables/disables minimum quantity for products.
Default: no
Cart total minimum quantity
This will set minimum total cart quantity. Set to zero to disable.
Default: 0
Cart total minimum quantity: Message
Message to be displayed to customer when minimum cart total quantity is not reached. Replaced values: %min_cart_total_quantity%, %cart_total_quantity%.
Default:
Minimum allowed order quantity is %min_cart_total_quantity%. Your current order quantity is %cart_total_quantity%.
Per item minimum quantity: All products
This will set minimum per item quantity (for all products). Set to zero to disable.
Default: 0
Per item minimum quantity: Per product
This will add “Product Quantity” meta box to each product’s edit page.
Default: no

Product Quantity for WooCommerce - Per product minimum quantity

Per item minimum quantity: Message
Message to be displayed to customer when minimum per item quantity is not reached. Replaced values: %product_title%, %min_per_item_quantity%, %item_quantity%.
Default:
Minimum allowed quantity for %product_title% is %min_per_item_quantity%. Your current item quantity is %item_quantity%.

Maximum Quantity Options

Settings are located in “WooCommerce > Settings > Product Quantity > Maximum Quantity”.

Product Quantity for WooCommerce - Maximum Quantity Options

Maximum quantity
Enables/disables maximum quantity for products.
Default: no
Cart total maximum quantity
This will set maximum total cart quantity. Set to zero to disable.
Default: 0
Cart total maximum quantity: Message
Message to be displayed to customer when maximum cart total quantity is exceeded. Replaced values: %max_cart_total_quantity%, %cart_total_quantity%.
Default:
Maximum allowed order quantity is %max_cart_total_quantity%. Your current order quantity is %cart_total_quantity%.
Per item maximum quantity: All products
This will set maximum per item quantity (for all products). Set to zero to disable.
Default: 0
Per item maximum quantity: Per product
This will add “Product Quantity” meta box to each product’s edit page.
Default: no

Product Quantity for WooCommerce - Per product maximum quantity

Per item maximum quantity: Message
Message to be displayed to customer when maximum per item quantity is exceeded. Replaced values: %product_title%, %max_per_item_quantity%, %item_quantity%.
Default:
Maximum allowed quantity for %product_title% is %max_per_item_quantity%. Your current item quantity is %item_quantity%.

Quantity Step Options

Settings are located in “WooCommerce > Settings > Product Quantity > Quantity Step”.

Product Quantity for WooCommerce - Quantity Step Options

Quantity step
Enables/disables quantity step for products.
Default: no
Cart total quantity
This will set step for total cart quantity. Set to zero to disable.
Default: 0
Cart total quantity: Message
Message to be displayed to customer when cart total quantity step is wrong. Replaced values: %step_cart_total_quantity%, %cart_total_quantity%.
Default:
Quantity total cart step is %step_cart_total_quantity%. Your current order quantity is %cart_total_quantity%.
Per item quantity step: All products
This will set quantity step for all products. Set to zero to disable.
Default: 0
Per item quantity step: Per product
This will add “Product Quantity” meta box to each product’s edit page.
Default: no
Per item quantity step: Message
Message to be displayed to customer when quantity step is incorrect. Replaced values: %product_title%, %quantity_step%, %quantity%.
Default:
Quantity step for %product_title% is %quantity_step%. Your current quantity is %quantity%.

Fixed Quantity Options

“Fixed (i.e. Exact) Quantity” settings are located in “WooCommerce > Settings > Product Quantity > Fixed Quantity”.

Product Quantity for WooCommerce - Fixed Quantity Options

Allowed quantity: Enable section
Enables/disables “Allowed quantity” section.
Default: no
Allowed quantity: All products
Allowed quantities as comma separated list, e.g.: 3,7,9. You can also use ranges here, e.g.: [10-500|5] (i.e. from 10 to 500 with step 5). Ignored if empty.
Default: None
Allowed quantity: Per product
This will add meta box to each product’s edit page.
Default: no
Allowed quantity: Message
Message to be displayed to customer on wrong allowed quantities. Replaced values: %product_title%, %allowed_quantity%, %quantity%.
Default:
Allowed quantity for %product_title% is %allowed_quantity%. Your current quantity is %quantity%.
Disallowed quantity: Enable section
Enables/disables “Disallowed quantity” section.
Default: no
Disallowed quantity: All products
Disallowed quantities as comma separated list, e.g.: 3,7,9. You can also use ranges here, e.g.: [10-500|5] (i.e. from 10 to 500 with step 5). Ignored if empty.
Default: None
Disallowed quantity: Per product
This will add meta box to each product’s edit page.
Default: no
Disallowed quantity: Message
Message to be displayed to customer on wrong disallowed quantities. Replaced values: %product_title%, %disallowed_quantity%, %quantity%.
Default:
Disallowed quantity for %product_title% is %disallowed_quantity%. Your current quantity is %quantity%.

Quantity Dropdown Options

Settings are located in “WooCommerce > Settings > Product Quantity > Quantity Dropdown”. Will replace standard WooCommerce quantity number input with dropdown. Please note that maximum quantity value must be set for the product (either via “Maximum Quantity” section or e.g. by setting maximum available product stock quantity or with “Max value fallback” option below).

Product Quantity for WooCommerce - Quantity Dropdown Options

Quantity as dropdown
Enables/disables “Quantity as dropdown” section.
Default: no
Max value fallback
Will be used if no maximum quantity is set for the product and always for variable products. Ignored if set to zero.
Default: 0
Dropdown label template: Singular
Replaced value: %qty%. For example try %qty% item
Default: %qty%
Dropdown label template: Plural
Replaced value: %qty%. For example try %qty% items
Default: %qty%
Labels per product
This will add “Product Quantity” meta box to each product’s edit page.
Default: no

Quantity Dropdown – Frontend

Before After
Product Quantity for WooCommerce - Quantity Dropdown - Frontend - Before Product Quantity for WooCommerce - Quantity Dropdown - Frontend - After

Price Display by Quantity Options

Settings are located in “WooCommerce > Settings > Product Quantity > Price Display by Quantity”. With this section you can display product price for different quantities in real time (i.e. price is automatically updated when customer changes product’s quantity). Please note that this section will only work for simple type products. Please note that this section is not designed to change product prices – if you need to change product’s price depending on quantity in cart, we suggest using our Wholesale Pricing for WooCommerce plugin.

Product Quantity for WooCommerce - Price Display by Quantity Options

Price display by quantity
Enables/disables “Price display by quantity” section.
Default: no
Template
You can use HTML here. Placeholders: %price%, %qty%.
Default:
%price% for %qty% pcs.

Quantity Info Options

Settings are located in “WooCommerce > Settings > Product Quantity > Quantity Info”. This section allows you to output product’s quantity info on frontend.

Product Quantity for WooCommerce - Quantity Info Options

Single product page
Adds quantity info on single product page.
Default: no
Single product page: Content
You can use HTML and/or shortcodes here. Available shortcodes: [alg_wc_pq_min_product_qty], [alg_wc_pq_max_product_qty], [alg_wc_pq_product_qty_step].
Default:
<p>[alg_wc_pq_min_product_qty before="Minimum quantity is <strong>" after="</strong><br>"][alg_wc_pq_max_product_qty before="Maximum quantity is <strong>" after="</strong><br>"][alg_wc_pq_product_qty_step before="Step is <strong>" after="</strong><br>"]</p>
Archives
Adds quantity info on archives.
Default: no
Archives: Content
You can use HTML and/or shortcodes here. Available shortcodes: [alg_wc_pq_min_product_qty], [alg_wc_pq_max_product_qty], [alg_wc_pq_product_qty_step].
Default:
<p>[alg_wc_pq_min_product_qty before="Minimum quantity is <strong>" after="</strong><br>"][alg_wc_pq_max_product_qty before="Maximum quantity is <strong>" after="</strong><br>"][alg_wc_pq_product_qty_step before="Step is <strong>" after="</strong><br>"]</p>

Quantity Info Frontend Example

Product Quantity for WooCommerce - Quantity Info - Frontend

Styling Options

Settings are located in “WooCommerce > Settings > Product Quantity > Styling”.

Product Quantity for WooCommerce - Styling Options

Quantity input style
Ignored if empty. E.g.: width: 100px !important; max-width: 100px !important;
Default: None

Admin Options

Settings are located in “WooCommerce > Settings > Product Quantity > Admin”.

Product Quantity for WooCommerce - Admin Options

Admin columns
Will add quantity columns to admin products list.
Default: no
Columns
Leave blank to add all available columns. Possible values: Min Qty; Max Qty; Qty Step.
Default: None

Advanced Options

Settings are located in “WooCommerce > Settings > Product Quantity > Advanced”.

Product Quantity for WooCommerce - Advanced Options

JS Check Options: Force on change: Min/max quantity
Forces JavaScript check for min/max quantity (on change).
Default: no
JS Check Options: Force on change: Quantity step
Forces JavaScript check for quantity step (on change).
Default: no
JS Check Options: Force periodically: Min/max quantity
Forces JavaScript check for min/max quantity (periodically).
Default: no
JS Check Options: Force periodically: Quantity step
Forces JavaScript check for quantity step (periodically).
Default: no
JS Check Options: Force periodically: Period (ms)
Default: 1000
Order Item Meta Options: Save quantity in order item meta
Default: no
Order Item Meta Options: Save quantity in order item meta: Meta key
Default: _alg_wc_pq_qty
Rounding Options: Round on add to cart
Makes sense only if “Decimal quantities” option is enabled. Possible values: Do not round; Round; Round up; Round down.
Default: Do not round
Rounding Options: Round with JavaScript
Possible values: Do not round; Round; Round up; Round down.
Default: Do not round
Cart Options: Hide "Update cart" button
Default: no

3 reviews for Product Quantity for WooCommerce

  1. Daryl Auclair (verified owner)

    The Product Quantity plugin is the best WooCommerce plugin I have found for customizing minimum and maximum quantities as well as setting step increments. I sell fabric by the yard in my woocommerce store, and I have tried EVERY plugin I could find that would allow me to sell decimal quantities through Woocommerce. There are not many options, and the other ones were very complex and did not provide an easy to use interface for my customers. This plugin on the other hand, the customer doesn’t even know its there, it integrates right in with the WooCommerce cart. Tom the developer keeps adding new features all the time, and best of all, he listens to his customers and provides excellent support when you need it. I highly recommend supporting the developer and purchasing the Pro version of this plugin.

  2. Toby (verified owner)

    Best Quantity Plugin Ever. For sure. It solves problems all other Plugins aren´t able to think about. This is worth every penny. And the best on this Plugin is the awsome support. These guys know WordPress / Woocommerce like no one else and help you with every problem occuring on your very own shop including this plugin. They are super fast and super friendly. I would reccomend them to you! Stop Searching. Buy this Plugin in Pro Version!!!

  3. rokas

    Excellent, easy to set up and use, just perfect!

Add a review

Your email address will not be published. Required fields are marked *

96 thoughts on "Product Quantity for WooCommerce"

  1. I have the pro version of this plugin and a lifetime, unlimited site licence. The problem is that I can make any changes to the plugin settings. After I click ‘Save Settings’ The screen refreshes but non of the changes are retained.

    Not Sure what to do.

  2. Hi, I’ve just purchased the pro version of this plugin but it doesn’t do what I want. I want to set minimum cart quantity to 12, which works fine, but I then need to be able to sell other things tickets singularly, but it doesn’t give me this option… ideally, I can exclude a category from the minimum quantity. Would that be possible? If so, how?

  3. I want started with as example 3 and then 6 and then 9 etc…. but when I set in the Step Quantity then the list is started with 1 instead off 3. How can i fixed this?

    Regards Wendy

  4. When i set the minimum QTY the error message does not show up if they select less than the minimum, although it automatically applies the correct minimum qty to cart. I would prefer if customers were shown the error message if they go below the minimum qty. Is there a way to fix this?

  5. I use plugin “Product Quantity” together with “Wholesale Pricing”. I enabled section “Price Display by Quantity” .
    Situation: I have a single product, price $10.
    In the product edit screen, section Wholesale Pricing, I added a quantity level: “if more than 60, unit price is $9.
    What happens: when I go to the product detail in the frontend, price is $10 for 1pc. (correct) / when I change quantity to 50, price changes to $500 for 50 (correct), BUT when I change quantity to 100, price changes to $1000 (it should be $900, using the NEW discount price). Can you please help?

    1. Correction: The calculation afterwards in the checkout screen is correct, but the dynamically recalculated price DISPLAY in the product detail screen is wrong.

  6. Hi, the problem still reigns, although I set the minimum quantity for all products as 3 I still see 1 as the first option of quantity dropdown. Whatever you set there is always 1 amount at the top of the dropdown list. How to set min. 3 for all products and can see only 3 ? and at the same time i want to set some larger products must be able to buy only 1.

  7. Cannot seem to get this to work, I want only specific fixed quantities to show and thought that would be possible via the Fixed Quality option, I set it per product to only allow 1,2,4,6,8 – still shows all qualities. No message appears… nothing. Please Advise ASAP – on a deadline here

  8. Hi, I still see the amount 1 in the dropdown box instead of 3 even I set 3 as a minimun amount for the product. Where is my mistake?

    Settings:
    General:
    Product Quantity for WooCommerce ENABLED
    Force Quantity Options DON’T FORCE
    – Force minimum quantity: DISABLED

    Minimum Quantity Options: Section ENABLED
    Per Item Minimum Quantity Options
    – All Products: 0
    – Per Product ENABED

    1. minimum value won’t update when archive page loaded:

      even the minimum amount is 3 the value which is about to send is still 1. so even the amount looks 3 at the product box when you click ‘add to cart’ it sends you to the product’s page with an error of the amount you try to add.

  9. In the Pro version, can the Quantity Dropdown Options be enabled only at a specific product, instead of all products?

  10. Hi i purchase this plugin and i can’t use exact quantity allowed, i added 250, 500, 1000 in the product edit page, but it’s still allow from 1 quantity

  11. I purchased the pro version, and how can i upgrade using this?where i can put the licence key?

  12. Hi what does the free version of the plugin do? I can’t seem to get it to work
    Thanks

  13. im not understanding one thing and need help bought the whole package unlimited and lifetime

    the pluging seem to be giving me all the option i need but i must have missed somethinG some where to set it up right

    i have certain product that i need to make the customer buy it in INcrememantal of likE 5 or 10 …. IT LIKE 2$ but you need to buy 5 so total as to become 10$ automatically sorry for my written english

    plz help

  14. Hi, I’m trying your quantity for woocommerce free plugin before purchase it (I need min, max & step function in a per product basis).
    it works fine but, as soon as I activate the Decimal Quantity feature I’m no more able to do add to cart… i receive a: Respect the requested format – quantity (in Italian)!
    the test to reproduce the error:
    activate the plugin
    activate min and setted to 1
    activate the max and setted to 4
    activate the step and setted to 1
    ==> it works
    activate Decimal Quantity
    ==> error…
    I already tried to put 1,0 – 4,0 and 1,0 rispectvely… no lack!
    it seems there is something else checking the qty format…

    please help!
    regards,
    R.

  15. HI, I am trying to add my quantities with pricing.

    for example, if a person chooses 25 business cards then it adds £1.50
    50 business cards add £3

    How do I do this?

    Thanks

  16. I use WP All Import to update my WooCommerce products from CSV. Is there a way I can import the ‘Per Product’ settings like ‘Minimum Quantity’ through my css import rather than manually setting the values using the product meta boxes? I checked but could not see any WooCommerce post meta/custom fields that I could utilize.

    Please let me know if this is possible, thanks!

    1. Hi Daryl,

      This is definitely possible. To be honest, I’m not very familiar with WP All Import plugin, but generally, you would need to set to import your data to one of these meta fields:

      _alg_wc_pq_min
      _alg_wc_pq_max
      _alg_wc_pq_step
      _alg_wc_pq_exact_qty_allowed
      _alg_wc_pq_exact_qty_disallowed
    2. This is perfect, thanks Tom! I could not figure out how to view the hidden custom fields. WP All Import has a really easy to use interface to import these.

  17. Hi, can I set fixed quantity based on the product? For example, Product A I only want to sell quantities of 250, 500, 1000 and 2000. Product B quantity 10, 20, 30 and 50.

    Would this be possible?

    Stan

    1. Hi Stan,

      What you need is:

      1. Go to “WooCommerce > Settings > Product Quantity > Fixed Quantity”.

      2. Enable “Allowed quantity” section there.

      3. Enable “Per product” option in the “Allowed Quantity” section.

      4. Now go to the admin edit page of your Product A and there in “Product Quantity” meta box, you should find “Exact quantity allowed” option. Set that to 250,500,1000,2000. Similarly for Product B to 10,20,30,50.

      Hope that helps and please let me know if you have any questions or if something is not working as expected.

    2. Thanks for the reply, Tom.

      I bought your plugin and followed your instructions but it didn’t work.

      Screenshot: https://prnt.sc/oc344w

      I still manage to add a quantity of 1 into the cart.

      I also enabled your quantity dropdown option but the quantity box is still the same. I’m using Storefront theme.

    3. Do I need to install the Free version of your plugin for the Pro version to work? Nothing seems to work in the plugin. I also tried the minimum quantity and I didn’t see any option in the product to set the minimum quantity.

    4. Hi Stan,

      If you wish, you can share an admin account (my email is [email protected]), so I could log in and help you set up the plugin.

      A couple of notes:

      1. “… I still manage to add a quantity of 1 into the cart…”
      > Please try setting “Add to cart” validation option to “Validate and add notices” in “WooCommerce > Settings > Product Quantity > General”. This will restrict to correct quantities right away on add to cart button click (instead of just notices on the cart and checkout pages).

      2. “… quantity dropdown…”
      > Please make sure that product has a maximum quantity set (it’s needed as dropdown can’t have an unlimited number of values, so maximum must be set). You can use Max value fallback option in “WooCommerce > Settings > Product Quantity > Quantity Dropdown” – it will be used for all products which don’t have a maximum quantity set.

      3. “… Do I need to install the Free version…”
      > No, Free version is not needed, if Pro is installed.

      4. “… I didn’t see any option in the product to set the minimum quantity…”
      > If you want to set min quantity on per product basis – please make sure that you have enabled Per product option in “WooCommerce > Settings > Product Quantity > Minimum Quantity > Per Item Minimum Quantity”.

    5. Everything works well now, Tom. Thanks for your help!

    6. Hi Stan,

      Sure, no problem, happy to help 🙂

      P.S. If you like the plugin, please consider leaving me a rating.

  18. Activated but nothing?? Lots of settings. What is the minimum setting I need to get this working?
    Thanks

    1. Hi Remi,

      That depends on what you actually need (e.g min quantity, max quantity, quantity step etc.). For example, let’s say you need to set min quantity for all products to 5, then:

      1. Go to “WooCommerce > Settings > Product Quantity > Minimum Quantity”.

      2. Check “Enable section” option there.

      3. Set “Per item quantity – All products” to 5 and save settings.

      So now your customers need to add at least 5 pieces of product to the cart to place an order.

      If you could tell me what are your requirements, I could give you the exact instructions on how to achieve it. Also, if you wish, you can share an admin account to your server, so I could log in and help you with the settings (my email is [email protected]).

      Hope that helps.

  19. Hi Tom,
    Our client would like to allow buyers to mix/match from their product line and limit purchase amounts of their total cart items in increments of 6. I see the products can be limited, but what about the total cart amount? I can’t find this capability in the free version, but will glady purchase pro if it can do it. I like the way this plugin works! Thank you!

    1. Hi,

      Sorry for a late reply. Unfortunately “cart total quantity step” option is not available in the plugin at the moment (only min and max cart total quantity is available), however, we have recently got very similar request from one of our users, so I’m going to implement it in next plugin update (which is planned to be released this Friday).

    2. Hi Vince,

      As promised, we’ve just released new plugin version 1.7.0, where I’ve added “Cart Total Quantity Step Options” section to “WooCommerce > Settings > Product Quantity > Quantity Step”. Could you please take a look and let me know if it’s working as expected?

      And if you like the plugin, please consider leaving me a rating.

  20. Hello Tom,
    I will be purchasing your plugin to allow decimal quantities in my WooCommerce shop. The free version is working great so far. However, once the WooCommerce order is sent to ShipStation (which I use to manage all of my shipments) the quantity is rounded up (example: a qty of 4.75 gets rounded up to 5).

    I have investigated and this appears to be a limitation by Shipstation as they do not support decimal quantities (bummer on them). I believe that I would be able to work around their limitation by adding WooCommerce “Order Item Meta” (for example: “Item quantity: x.xx”) which gets pulled into Shipstation’s XML import under the “[Item Options]” data field. Then I could display it on my packing lists in Shipstation and not need to worry about ShipStation’s lack of decimal quantity support.

    Is this something you could possibly add to the next version of the plugin? I do not have much experience writing custom code for WooCommerce and feel that even if I was able to customize your plugin successfully, my changes would be lost upon the next plugin update. Thank you so much for your time and for your excellent plugin.

    1. Hi Daryl,

      Sorry for such a late reply. We’ve just released new plugin version 1.7.0, where I’ve added new “Save quantity in order item meta” option to “WooCommerce > Settings > Product Quantity > Advanced”. You can also set your own custom meta key there. I believe this is what you need, however, while adding this code to the plugin I’ve noticed that quantity should be already saved in order items meta by default, with _qty meta key.

      Hope that helps.

    2. Hi Tom, thank you so much for including my request in the update. I am happy to report that my decimal quantities are now working in ShipStation! I had to set the meta key to: “Length (yd)” and it started working right away. You are a lifesaver, thank you so much, I am checking out your other plugins now too!

    3. Hi Daryl,

      Happy to hear it helped. Let me know if you need anything else.

      And if you like the plugin, please consider leaving me a rating.

    4. I have a Woocommerce Product with only .75qty left in stock. The minimum order quantity is set to .75 and the customer can add .75 to cart successfully. However, on the Cart page the Quantity column is blank. There is no Input button and I can see using developer tools that there is only a hidden Input field: . Can this be changed so that the cart will display .75 qty to the user as text instead of just a blank space? I can share a screenshot if you need it, thanks!

    5. Hi Daryl,

      Yes, a screenshot would definitely help (you can send it to me to [email protected]). Not sure if I understood it correctly though – is cart not showing *all* decimal quantities properly, or is it only with 0.75, and for example, 1.5 shows normally?

  21. Hi, We require discount (price) groups, so we prefill for example ;
    Product Price Group 1
    20 @ £1.21 each
    30 @ £1.20 each
    40 @ £1.19 each
    Product Price Group 2
    20 @ £1.15 each
    30 @ £1.14 each
    40 @ £1.13 each
    and allocate that price group to a product. Is this possible?
    Thank you for your help.

    1. Hi Andrew,

      Unfortunately, currently the plugin doesn’t have such options. Generally, our plugin deals with product quantities and not pricing. I would suggest trying out our other plugin – Wholesale Pricing for WooCommerce.

      Hope that helps.

  22. Hello, I wish to display the quantity on the product listing. So I installed the function below that works but my “value” of “quantity” can you tell me how to run the plugin with this function? Thank you in advance and good day.

    /**
     * Add quantity field on the shop page.
     */
    function ace_shop_page_add_quantity_field() {
    	/** @var WC_Product $product */
    	$product = wc_get_product( get_the_ID() );
    	if ( ! $product->is_sold_individually() && 'variable' != $product->get_type() && $product->is_purchasable() ) {
    		woocommerce_quantity_input( array( 'min_value' => 1, 'max_value' => $product->backorders_allowed() ? '' : $product->get_stock_quantity() ) );
    	}
    }
    add_action( 'woocommerce_after_shop_loop_item', 'ace_shop_page_add_quantity_field', 12 );
    /**
     * Add required JavaScript.
     */
    function ace_shop_page_quantity_add_to_cart_handler() {
    	wc_enqueue_js( '
    		$(".woocommerce .products").on("click", ".quantity input", function() {
    			return false;
    		});
    		$(".woocommerce .products").on("change input", ".quantity .qty", function() {
    			var add_to_cart_button = $(this).parents( ".product" ).find(".add_to_cart_button");
    			// For AJAX add-to-cart actions
    			add_to_cart_button.data("quantity", $(this).val());
    			// For non-AJAX add-to-cart actions
    			add_to_cart_button.attr("href", "?add-to-cart=" + add_to_cart_button.attr("data-product_id") + "&quantity=" + $(this).val());
    		});
    		// Trigger on Enter press
    		$(".woocommerce .products").on("keypress", ".quantity .qty", function(e) {
    			if ((e.which||e.keyCode) === 13) {
    				$( this ).parents(".product").find(".add_to_cart_button").trigger("click");
    			}
    		});
    	' );
    }
    add_action( 'init', 'ace_shop_page_quantity_add_to_cart_handler' );
    
    1. Hi,

      I will have to test this, but generally, this should get you product quantities from the plugin:

      $product_id = $product->get_id();
      $default    = 1;
      $min_qty    = alg_wc_pq()->core->get_product_qty_min_max( $product_id, $default, 'min' );
      $max_qty    = alg_wc_pq()->core->get_product_qty_min_max( $product_id, $default, 'max' );
      $qty_step   = alg_wc_pq()->core->get_product_qty_step( $product_id, $default );
      

      Also – have you considered just replacing product’s add to cart form on archives with form from the single product page (in this case I believe you won’t need to add the code you’ve posted):

      remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
      add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 10 );
      

      Please let me know if this doesn’t help.

  23. Is it possible to configure quantity options with this plugin? For example, I am selling clothing and certain products come in quantities of 12,25,50,75,100,200,300. I was wondering if this plugin will override the default WooCommerce quantity selector and restrict quantity options to only the ones stated above.

    I have purchased this plugin, I just can’t seem to get my configurations to show.

    Thanks

    1. Hi Dylan,

      I believe what you need is “Fixed Quantity” section (in “WooCommerce > Settings > Product Quantity”). There is “Allowed quantity” subsection there. As you are going to set it for certain products only (i.e. not for all products at once), you also need to enable “Per product” meta box there and then set allowed quantities on each product’s admin edit page.

      Hope that helps and please let me know if you have any questions. Also, if you wish, you can share an admin account to your site so I could log in and help you set up the plugin. My private email is [email protected].

  24. hi Tom, i was wondering if we can contact you in order to make some custom changes in the plugin, of course paid. I am really interested into adding a Per User Role scenario for the exact functionalities your plugin has. Minimum – Maximum quantities and Step setting per product is perfect, but i need them to change per user role. There are some plugins in the market that do this as you have noticed, but i am really interested into working with you as i see your support is excellent. Note: I know my way around code, so if it too complicated to build the functionality for all user roles, and your advice is to manually assign meta boxes for the proper fields in product edit page, for each user role with snippets, we can do that, also paid if you want of course. Really looking forward for your answer. Cheers!

    1. Hi Nick,

      Sorry for a late reply. Please give me a couple of days to check if I could add it in the next plugin version.

    2. Hi Nick,

      We’ve just released new plugin version 1.6.1, where I have added new filters, so you could modify quantities by user role. Please take a look at the example in the Developers section.

      I planning on adding “quantities by user role” options later to the plugin itself, not sure how soon though.

      Anyway please let me know if something is not working as expected or if you have any questions. And if you like the plugin, please consider leaving us a rating.

  25. Are you planning to add an option to autoupdate the price of the product based in the price per unit? May be in the price field or as additions information I.E.: Current price: 2,35 €.

    Thanks for this fantastic plugin.

    1. Hi Fernando,

      Sorry for a late reply. Do you mean that you need the price to update in real time when customer changes quantity in the input box?

    2. Yes. May be the price itself or and additional text behind or after the quantity.

    3. Hi Fernando,

      We’ve just released new plugin version 1.6.1. After the update you will find new “Price by quantity” options (in “WooCommerce > Settings > Product Quantity > General”). I will be adding more options later (like choosing if you want to replace the price or add it as new text before or after the price), but basically it’s already working. Please check it out and let me know what you think. And if you like the plugin, please consider leaving us a rating.

  26. Hi Tom,
    I’m using this plugin and it’s perfect, but now I have a problem. For example, if I set the minimum quantity as 3, then I add a product, when I activate the option Inventory/Sold individually, so it will conflict with the minimum quantity. How to solve this problem? Thank you.

    1. Hi Rex,

      I have just tested it on my server and you are correct – when product is set to be “sold individually” and if the minimum quantity for all products is set for example to 3, then the plugin will display “wrong quantity” message. Will be fixing that in next plugin version, thanks for reporting. Meanwhile, you could use “Per product” minimum quantity instead of “All products”, however, I do understand that this solution can be unacceptable, especially if you have a lot of products in your shop…

    2. Hello Tom,
      Very thanks for your reply quickly. As you said, I have many products. I’m looking forward to the next update version.
      Anyway, thanks for your doing everything.
      Regards
      Rex

    3. Hi Rex,

      Hopefully I’ve managed to fix it in v1.6.1. Please check it out and let me know if something is still not working as expected.

      And if you like the plugin, please consider leaving us a rating.

  27. Hi,
    i have this plugin combined with a plugin for creating product bundles. Whenever i set a minimum quantity for a single products, this quantity is also applied on the products included in a bundle, which shouldn’t be the case. Is there a solution to this, so the minium quantity only applies to the products being bought seperately?

  28. i just install the plugin . and i cannot find where i can force display of minimum quantity in the archive and on the single product page.

    its still show “1” as default even id the minimum is 0.5.

    1. Hi,

      Sorry for a late reply. I’ve just checked and you are correct – for some reason it’s not forcing to a minimum quantity below 1. I’ve just tried setting minimum quantity to 1.5 and it’s working properly, but when I set it to 0.5 it’s not… Will be checking that asap.

    2. Hi again,

      After some testing I’ve figured out that setting “Force initial quantity on single product page” option to “Force to min quantity” in plugin’s “General Options” (in “WooCommerce > Settings > Product Quantity”) seems to be solving the issue. Please let me know if there are still any problems.

    3. Hi Tom,

      yes its look like its working but only on product single page, not on shop page.

      hope you can find easy fix for this issue:)

    4. Hi,

      Sorry for a late reply. Already fixed that in our development version, so it will be fixed in the next plugin release.

    5. Hi,

      As promised, we’ve just released new plugin version 1.6.0. After the update, you will find new “Force initial quantity on archives” option in plugin’s settings. Please let me know if it’s not working as expected.

      P.S. If you like the plugin, please consider leaving us a rating.

    6. hi ,

      i installed the last version on my site and still no change, its only working on product page.

      you can see here : (all set to 0.5 as minimum)

      http://super-click.co.il/product-category/%d7%a4%d7%99%d7%a8%d7%95%d7%aa/?v=88588bacf0da

    7. Hi,

      That’s strange… I have just rechecked it on my server and it seems to be working fine (with 0.5 set as minimum quantity for all products). Are you sure you are setting the new “Force initial quantity on archives” option to “Force to min quantity” (and not the old one “Force initial quantity on single product page” instead)?

      I’ve also tried opening the link to your site but got “The connection has timed out” error.

      Also if you wish you can create/share an admin account to your site, so I could log in and check what’s going on. My private email is [email protected].

    8. Hi Tom

      im sending you a login info to the domain.

      but before that, did you check on your end if ist work when you set products individually? and not global.

      perhaps this is the problem?

    9. Hi,

      I’ve just tested and unfortunately it’s still the same – even if I set minimum quantity on per product basis (i.e. individually) – “Force initial quantity on archives > Force to min quantity” option seems to be working fine on my server.

      P.S. Not sure if you have already sent me the login details, but I haven’t received it.

  29. Does this plugin allow you to set the quantity label on a per product basis?

    I need Quantity to say “Number of Children” but only on 3 or 4 products.

  30. Extending Karolinas idea of a per-category-basis I’d also suggest to have both “per item” and “per item and per product” run parallel where “per item” sets the standard quantity multiplier and “per item and per product” the product specific exceptions.

    Instead of editing each single product on changes in my quantity policy, I could then adapt most of the products’ quantities on a “per item” basis in one step and only care about exceptions on a per product quantity editing step. “Per item and per product” might be triggered when the meta box is not left empty or not zero (or both).

    1. Hi,

      I’m not sure if I understood it correctly, but I believe that plugin is already working as you’ve described. That is – if you set “Per item quantity – All products” option, then “Per item quantity – Per product” option works exactly as you’ve described, i.e. if it’s empty then “Per item quantity – All products” option value is used as a fallback.

  31. Hello! I think about buy PRO version.
    Can you tell me whether in the extended version I can set the minimum order quantity for a specific category, but not for individual products? It’s very important for me.

    1. Hi Karolina,

      Unfortunately this is not possible at the moment, however, this seems like a useful feature – will be adding it in next update.

  32. I installed the plug in an I noticed that the minimum quantity doesn’t refresh when you change the variation product from a higher quantity to a variation with a lower quantity. You can try in the product I am testing the plug in.

    1. Hi Renzo,

      Could you please try enabling “Force JS check” checkboxes in plugin settings (“Advanced Options” subsection at the bottom of settings page).

    2. I have them checked and is not refreshing.

    3. Hi, did you find out what could be the problem ?

    4. Hi Renzo,

      Sorry for not replying earlier. Yes, I can see the problem – already fixing this and I’m almost finished. Will get back to you as soon as possible.

    5. Perfect, Thank you

    6. Hi Renzo,

      We’ve just released new plugin version 1.5.0. After you update, please go to plugin settings (in “WooCommerce > Settings > Product Quantity”) and there in “General Options” section you will find new “On variation change (variable products)” option. Please set that to “Reset to min quantity”. Please let me know if it’s not working as expected.

  33. I will install it an try it. One more question. We are in the fresh cut flower business and we sale to wholesalers and retailers by the box. There are 4 kind of boxes with different capacities but the price is by the stem. so we can sell 1 HBX that fits 250 stems or 2 HBX with 500 stems or a QBX with 125 stems. Is there a plugin or this plug in handle 2 types of quantities ? So in the cart appears Like this sample:

    Qty Box Type Description Qty Price Total Amount
    1 HBX Color Rose 50 cms 500 $0.25 $125

  34. Can I use this plugin in variable products ?

    1. Hi Renzo,

      Yes, plugin is compatible with variable products. I.e. you can set all options (minimum quantity, maximum quantity, quantity step) for each variation separately.

      Hope that helps. Please let me know if you have any questions.

    2. Is only available in the full version. I am not going to be able to try it.

    3. Unfortunately yes – as all “per product” options are available in Pro only, you won’t be able to test it in free version. However – as there is “30 days no questions asked” refund policy on WPFactory, we will issue a refund if something is not working as expected (or alternatively I could try to fix it if you’d wish).

    4. Is not possible to get a 30 day trial version ?

  35. Hello,
    Unfortunatelly this plugin is not compatible with the Flatsome theme. When I set decimal quantities 0,1 and I try it out, it will produce 1,100001 –> 1,200002 –> 1,300003 etc..

    1. Hi,

      Will be checking that asap. One question though – do you have any of Force JS check options enabled in plugin’s “Advanced Options” settings section (i.e. at the bottom of the page in “WooCommerce > Settings > Product Quantity”)? If you have – please try temporary disabling them to see if issue is still there.

    2. Hi,
      No, I dont.

    3. Hi,

      Sorry for a late reply. I’ve just checked and you are correct – Flatsome theme has issues with decimal quantities. The problem is in their custom plus and minus quantity buttons. They added custom JS code to handle it. For now the only “solution” I was able to come up with is to hide Flatsome’s plus and minus quantity buttons by adding custom CSS:

      input[type="button"].button.minus,
      input[type="button"].button.plus {
          display: none !important;
      }

      Ideally if we could bring back standard HTML number input spinners it would be working fine, however I didn’t manage to do it – will be trying further – unfortunately I’m not a big expert in CSS.

    4. Hi, we also use Flatsome. At which moment this issue pops up? I havn’t noticed it yet. Even when I use plus and minus to alter quantity everything works fine for me.

      Thank you!

  36. Hello…this plugin is working great for what I need it to do on my website…the cart totals are correct and are allowing customers to buy in steps of .5 units….however when you click the Proceed To PayPal button after confirming your cart total is correct…the information being fed to PayPal does NOT include the cost for those incremental units. So while the shopping cart shows 1.5 units in cart and the math is correct on the cart for what they owe…..when they hit the Proceed to PayPal button the information funneling to PayPal is as though there was only 1 unit in the cart. Is there a way to correct this? Thanks so much!

    1. Hi Laura,

      I’ve just re-checked it on my test server, but unfortunately couldn’t reproduce the issue. After adding 1.5 to the cart, the quantity in PayPal also shows 1.5, so it seems to be working fine here. I even tried to complete all the order to the end and it still shows 1.5 in my PayPal payment receipt. I’m using standard PayPal gateway (in sandbox mode) that comes with WooCommerce. Maybe you could send me the screenshot of the issue? Also – if possible maybe I could login to your server’s admin to check what’s going on? My private email is [email protected]

  37. Can this plug allow you to customize the quantities of a product that a customer can add to their cart? For example, I want a customer to be able to add 1, 2, or 4 of an item, but not 3.

    1. Hi Adam,

      Unfortunately I don’t think it’s possible at the moment. You could set minimum quantity to 2, step to 2 and maximum quantity to 4, but that would make quantity of 1 invalid. I could try to add this to the plugin, but I’m not sure how would admin set allowed quantities… I mean would listing all valid quantities as comma separated text (I mean by admin) would be good enough, e.g.: 1,2,4? And do you need this on per product basis (i.e. different for each product) or these quantities would be applied to all your shop’s products?

    2. Hi,

      We’ve just released new plugin version 1.5.0. After you update, you will find new “Exact Quantity” options section (in “WooCommerce > Settings > Product Quantity”). This should do exactly what you’ve described, i.e. set allowed or disallowed quantities as a comma-separated list, e.g. 3,7,11.

      Please let me know if something is not working as expected.

  38. I can’t configure a quantity like 0.96 on the steps, why?

    Kind regards.

    1. If anyone else has similar question – “Decimal quantities” option was added in plugin version 1.3.0.

Leave a Reply

Your email address will not be published. Required fields are marked *

Changelog

1.7.3 - 17/09/2019

  • Dev - Price Display by Quantity - "Position" option added.
  • Dev - Advanced - "Disable plugin by URL" option added.
  • WC tested up to: 3.7.

1.7.2 - 11/07/2019

  • Dev - General - Cart notices - "Cart notice type" option added.

1.7.1 - 10/07/2019

  • Fix - Price Display by Quantity - JavaScript error fixed.

1.7.0 - 05/07/2019

  • Dev - General - "Add to cart" validation - "Step auto-correct" options added.
  • Dev - General - Variable Products - "Load all variations" option added.
  • Dev - General - Variable Products - "Sum variations" option added.
  • Dev - Quantity Step - "Cart Total Quantity" options added.
  • Fix - Fixed Quantity - Now counting product's quantity already in cart when validating or correcting on "add to cart".
  • Dev - Fixed Quantity - Dropdown compatibility added.
  • Dev - Fixed Quantity - Settings now accept ranges (e.g. [10-500|5]).
  • Dev - Quantity Dropdown - Dropdown label template - "Labels per product" options added.
  • Dev - Price Display by Quantity - Renamed from "Price by Quantity".
  • Dev - Price Display by Quantity - Link to pricing plugin added.
  • Dev - Advanced - "Order Item Meta" section (and "Save quantity in order item meta" options) added.
  • Dev - Advanced - "Hide 'Update cart' button" option added.
  • Dev - "Main variable product" options added to meta box.
  • Dev - Quantity input template updated to the template from WooCommerce v3.6.0.
  • Dev - "General" settings section split into separate sections ("Quantity Dropdown", "Price Display by Quantity", "Quantity Info", "Styling", "Admin", "Advanced").
  • Dev - Admin settings restyled and descriptions updated.
  • Dev - alg_wc_pq_cart_total_quantity filter added for cart total quantity.
  • Dev - Code refactoring (qty-info, scripts, messenger classes added etc.).

1.6.3 - 15/05/2019

  • Dev - Fallback method added for checking if WooCommerce plugin is active (fixes the issue in case if WooCommerce is installed not in the default woocommerce directory).

1.6.2 - 14/05/2019

  • Dev - "Rounding Options" options added.
  • Dev - Quantity Dropdown - "Max value fallback" option added (and dropdown can now also be enabled for variable products).
  • Dev - Advanced Options - Force JS check (periodically) - "Period (ms)" option added.
  • Dev - Price by Quantity - change event added (e.g. fixes the issue with plus/minus quantity buttons in "OceanWP" theme).
  • Dev - Code refactoring (alg-wc-pq-force-step-check.js and alg-wc-pq-force-min-max-check.js files added).
  • Tested up to: 5.2.

1.6.1 - 04/05/2019

  • Fix - Returning default min/max quantity for products with "Sold individually" option enabled.
  • Dev - "Price by Quantity" options added.
  • Dev - Admin Options - "Admin columns" options added.
  • Dev - alg_wc_pq_get_product_qty_step, alg_wc_pq_get_product_qty_min, alg_wc_pq_get_product_qty_max filters added.
  • WC tested up to: 3.6.

1.6.0 - 12/04/2019

  • Fix - Variable products - Reset step on variation change fixed.
  • Dev - "Quantity Info" options added.
  • Dev - "Quantity Dropdown" options added.
  • Dev - General Options - "Force initial quantity on archives" option added.
  • Dev - Code refactoring.
  • Dev - "Exact Quantity" renamed to "Exact (i.e. Fixed) Quantity".
  • Dev - Settings split into sections ("General", "Minimum Quantity", "Maximum Quantity", "Quantity Step", "Fixed Quantity").

1.5.0 - 31/01/2019

  • Fix - Stop customer from reaching the checkout page - "WC_Cart::get_cart_url is deprecated..." message fixed.
  • Dev - "Exact Quantity" section added.
  • Dev - General Options - "On variation change (variable products)" option added.
  • Dev - Code refactoring (alg-wc-pq-variable.js etc.).

1.4.1 - 17/01/2019

  • Fix - Step check - Min quantity default value changed to 0 (was 1).
  • Fix - Admin settings - Per product meta boxes - Step option fixed; checking if max/min sections are enabled.
  • Fix - Force minimum quantity - Description fixed.

1.4.0 - 14/01/2019

  • Dev - "Force JS check" options enabled for decimal quantities.
  • Dev - "Add to cart validation" option added.
  • Dev - "Quantity step message" option added.
  • Dev - "Force cart items minimum quantity" option added.
  • Dev - Force JS check - Quantity step - Now value is changed to nearest correct value (instead of always higher correct value).
  • Dev - Code refactoring.
  • Dev - Admin settings restyled and descriptions updated.

1.3.0 - 28/12/2018

  • Dev - "Decimal quantities" option added.
  • Dev - "Force initial quantity on single product page" option added.
  • Dev - "Quantity input style" option added.
  • Dev - Minor admin settings restyling.
  • Dev - Code refactoring.

1.2.1 - 23/10/2018

  • Dev - Min/max "Per item quantity" (for all products) moved to free version.
  • Dev - Admin settings descriptions updated.

1.2.0 - 18/10/2018

  • Fix - Cart min/max quantities fixed.
  • Dev - Advanced Options - "Force JS check" options added.
  • Dev - Raw input is now allowed in all "Message" admin options.
  • Dev - Code refactoring.
  • Dev - Minor admin settings restyling.
  • Dev - Plugin URI updated.

1.1.0 - 09/11/2017

  • Fix - Core - Checking if max/min section is enabled, when calculating product's max/min quantity.
  • Fix - Admin settings - Per product meta boxes - Checking if max/min section is enabled (not only "Per item quantity on per product basis" checkbox).
  • Fix - Core - Maximum order quantity - Upper limit bug fixed (when get_max_purchase_quantity() equals -1).
  • Dev - Core - Minimum order quantity - Upper limit (get_max_purchase_quantity()) added.
  • Dev - "Quantity Step" section added.

1.0.0 - 08/11/2017

  • Initial Release.

Frequently Asked Questions

Q. I can't find the plugin form on product edit page. Where do I put my minimum quantity for a product?

A. First you need to enable "Per item quantity - Per product" checkbox in plugin's settings (in "WooCommerce > Settings > Product Quantity > Minimum Quantity"). After that, you should see this meta box on each product's edit page.


Q. I want to limit the quantity someone can select at a product by product basis. For one product they can purchase from 1 to 20, but no more than 20. Will your plugin do that?

A. Yes, the plugin can do that. In the free version, you will be able to set the maximum quantity to 20 for all products at once. To set maximum quantity for some products only, you will need the Pro version:

In the free version you would need to:
1. Enable section for "Maximum Quantity Options" in "WooCommerce > Settings > Product Quantity".
2. Set Per item quantity - All products option to "20".

In Pro version you would need to:
1. Enable section for "Maximum Quantity Options" in "WooCommerce > Settings > Product Quantity".
2. Enable Per item quantity - Per product option there.
3. Go to some product's admin edit page and set "Maximum quantity" to "20" in "Product Quantity" meta box.


Q. Do you have a demo website for the plugin?

A. Unfortunately we don't have a demo site yet, however, generally, you can see how it works by installing the free version - https://wordpress.org/plugins/product-quantity-for-woocommerce/. Also - as there is 30 days "no questions asked" refund policy on WPFactory, we'll be happy to issue a refund if something in plugin isn't working as expected, or, if you wish, we could try to fix it.

Free vs Pro

This plugin is a premium version of free "Product Quantity for WooCommerce" plugin.

Free VersionPro Version
Minimum cart total quantityyesyes
Minimum per item quantity - All productsyesyes
Minimum per item quantity - Per productnoyes
Maximum cart total quantityyesyes
Maximum per item quantity - All productsyesyes
Maximum per item quantity - Per productnoyes
Quantity step - All productsyesyes
Quantity step - Per productnoyes
Decimal quantitiesyesyes
Force initial quantity on single product pageyesyes
Cart noticesyesyes
Stop customer from accessing checkout on wrong quantitiesyesyes
Customizable customer messagesyesyes
Quantity input styleyesyes

Developers

Plugin has three filters, so you can modify plugin's min quantity, max quantity and quantity step with your own code: alg_wc_pq_get_product_qty_min, alg_wc_pq_get_product_qty_max and alg_wc_pq_get_product_qty_step. All filters has two parameters: filtered value and product ID.

For example, you may want to modify quantities by user role - in this case you will need to add something like this to your (child) theme's functions.php file:

add_filter( 'alg_wc_pq_get_product_qty_min', 'my_product_qty_min_by_user_role', 10, 2 );
function my_product_qty_min_by_user_role( $qty, $product_id ) {
	$current_user = wp_get_current_user();
	return ( in_array( 'administrator', $current_user->roles ) ? 5 : $qty );
}

If you need to get some product's min/max/step quantities with PHP:

$product_id = $product->get_id();
$default    = 1;
$min_qty    = alg_wc_pq()->core->get_product_qty_min_max( $product_id, $default, 'min' );
$max_qty    = alg_wc_pq()->core->get_product_qty_min_max( $product_id, $default, 'max' );
$qty_step   = alg_wc_pq()->core->get_product_qty_step( $product_id, $default );

Plugin's product quantity data is saved in product meta with these keys:

_alg_wc_pq_min
_alg_wc_pq_max
_alg_wc_pq_step
_alg_wc_pq_exact_qty_allowed
_alg_wc_pq_exact_qty_disallowed

Prices & Licenses

Single siteUnlimited sites
1 year[buy] $19.99 / year[buy] $29.99 / year
Lifetime[buy] $39.99[buy] $59.99

Installation and Updates

  • Buy the plugin 🙂
  • Download plugin's zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to "Admin Dashboard > Plugins > Add New > Upload Plugin" and browse for downloaded zip file.
  • If plugin is successfully installed - you should see it added to the Plugins list.
  • To keep WPFactory items up to date, please install WPFactory Helper plugin and enter your site key.

Refunds

We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author, we are offering 30 day money back guarantee refund policy.