Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set negative product's quantity #9139

Closed
DaniloEmpire opened this issue Apr 5, 2017 · 16 comments

Comments

@DaniloEmpire
Copy link
Contributor

commented Apr 5, 2017

Hi all,
I'm trying to set a negative value to the product's quantity, but I can't save the product.

Preconditions

  1. Magento version 2.1.4
  2. Set config: Stores->Settings->Configuration->Catalog->Inventory->Stock Options->Display Out of Stock Products = Yes
  3. Set config: Stores->Settings->Configuration->Catalog->Inventory->Product Stock Options->Backorders = Allow *

Steps to reproduce

  1. Create or edit a simple product
  2. Set Quantity with a negative value (ex: -200)
  3. Save

Expected result

  1. Should allow to save the product

Actual result

  1. The form return an error message: "Please enter a valid number in this field".

Note

You can order (via Frontend) a quantity greater than that available; then try to edit the product (via Backend), but you can't save it with the negative quantity (see the attachment).

Thank you for your attention.

screenshot from 2017-04-05 12-25-30

@DigiWorksNL

This comment has been minimized.

Copy link

commented Apr 12, 2017

I have the same problem here in Magento version 2.1.5, today i'll try 2.1.6 in the hope the problem has been fixed

@DaniloEmpire

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2017

Ok. let us know, and please put a +1 at my post to get more visibility.

@DigiWorksNL

This comment has been minimized.

Copy link

commented Apr 12, 2017

There are similar posts related to this topic but no solution yet:

Issue #7197
and
Issue #7540

I'm going to update now to 2.1.6. I will write the results here.

@DigiWorksNL

This comment has been minimized.

Copy link

commented Apr 12, 2017

I have updated to 2.1.6 but the problem still exists.

@DigiWorksNL

This comment has been minimized.

Copy link

commented Apr 13, 2017

Today i tried a fresh install but no luck.

I can confirm that this problem doesn't exists when 'Qty Uses Decimals' is set to Yes. Then a negative QTY is allowed. This could be a workaround but setting this to Yes allows a Qty of 1.25

image

@DigiWorksNL

This comment has been minimized.

Copy link

commented Apr 24, 2017

Any updates on this problem?

@sadeeshmca

This comment has been minimized.

Copy link
Collaborator

commented May 5, 2017

We are working on this issue

@sadeeshmca

This comment has been minimized.

Copy link
Collaborator

commented May 5, 2017

We are unable to reproduce the issue in Magento 2.2. It seems to be fixed. However we are able to reproduce the issue in 2.1.5 and 2.1.6

@okorshenko

This comment has been minimized.

Copy link
Contributor

commented May 5, 2017

Please, look at these commits:
c501367
d56f71e

@redelschaap

This comment has been minimized.

Copy link
Contributor

commented May 5, 2017

@sadeeshmca Will there be a version 2.1.7 that fixes some issues present in 2.1.6 or is 2.1.6 te latest version in the 2.1 mainline?

@DigiWorksNL

This comment has been minimized.

Copy link

commented May 5, 2017

I applied the commits to the files locally on my shop. These commits fixed the issue!

@okorshenko

This comment has been minimized.

Copy link
Contributor

commented May 5, 2017

@DigiWorksNL thank you!
Magento 2 community member @sadeeshmca is working on this issue right now to deliver it into 2.1-develop branch. All fixes from 2.1-develop branch will be added to one of the nearest upcoming patch releases.

Thank you @sadeeshmca for working on this! You made some other people happier 👍

@okorshenko okorshenko self-assigned this May 8, 2017

@okorshenko

This comment has been minimized.

Copy link
Contributor

commented May 15, 2017

@sadeeshmca do you have any updates on Pull Request?

@veloraven

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2017

This issue is a duplicate of #7401
Internal ticket: MAGETWO-60599

@magento-team

This comment has been minimized.

Copy link
Contributor

commented Aug 1, 2017

Internal ticket to track issue progress: MAGETWO-69922

@orlangur

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2017

Fix will be released in 2.1.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.