Skip to content

Max Qty Allowed: Core Magento feature removed by #18477 and causes bug #23319 #23731

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

Closed
duffner opened this issue Jul 16, 2019 · 8 comments
Closed
Assignees
Labels
Component: Inventory Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@duffner
Copy link

duffner commented Jul 16, 2019

Through ticket #18477, a core Magento feature was removed. When removing the ability to set "0" as an allowed value of Max Qty in Cart, multiple things happen.

  1. *The ability to have an "infinite" value allowed in the cart no longer exists, this forces store administrators to set some crazy value or 1,000,000 for this setting since most stores don't restrict by Max amount in cart. This has been native Magento behavior for 11 years
  2. Bug Unable to save edited product when max_sale_qty is Magento's default #23319 is now introduced because the previous default value of 0 is the core default.
  3. Minor issue, but decimal-based inventory no longer works, because sometimes an allowed value of .5 which is now no longer valid (Separate ticket for this will be created)

Preconditions (*)

  1. Magento 2.3.2 & 2.2.8

Steps to reproduce (*)

  1. Install Magento 2.3.1 or 2.2.7
  2. Create a test product
  3. Ensure Max Qty in Cart remains at the default value of "0"
  4. Attempt to save a product

Expected result (*)

  1. [Screenshots, logs or description]
  2. The product should save with "0" as the value set for "Max Quantity in Cart"

Actual result (*)

  1. [Screenshots, logs or description]
  2. Error Unable to save edited product when max_sale_qty is Magento's default #23319 is presented
  3. Product with Max Quantity of "0" cannot be saved

If a customer has an issue with this value, then they should update this value themselves instead of Magento removing this feature.

@m2-assistant
Copy link

m2-assistant bot commented Jul 16, 2019

Hi @duffner. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@duffner do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jul 16, 2019
@engcom-Bravo engcom-Bravo self-assigned this Jul 17, 2019
@m2-assistant
Copy link

m2-assistant bot commented Jul 17, 2019

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added Component: Inventory Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Jul 17, 2019
@engcom-Bravo
Copy link
Contributor

Hi, @duffner ! I can't reproduce this issue on fresh 2.3-develop branch and on 2.3.1, because this is already fixed(added validation for "max qty in cart" input).
maxqty
So i have to close this issue.
Thank for your report!

@engcom-Bravo engcom-Bravo added Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch labels Jul 17, 2019
@duffner
Copy link
Author

duffner commented Aug 21, 2019

@engcom-Bravo, maybe you don't understand.

I want infinite allowed in the shopping cart, how is this possible today?

@engcom-Bravo
Copy link
Contributor

@duffner, this GitHub issue tracker is intended for Magento Core technical issues only. Please refer to the Community Forums or the Magento Stack Exchange site for advice or general discussion about this issue. Thank You.

@hostep
Copy link
Contributor

hostep commented Aug 21, 2019

I kind of agree with @duffner here, if the number 0 previously had a special meaning of infinite then the changes done in #18481 & #18552 were not correct.

To make this consistent with the global config value, either the same validation should be applied to that field, or the new validation from above PR's should get reverted.

However, the default value for that field is set to 10.000, I just verified this both in code as in a vanilla installation.
@duffner: Is there a valid use case for shop owners wanting this field to be bigger than the default 10.000? I understand it's "just a number". But are people actually putting more than 10.000 of something in their cart? And isn't it then enough to only update the global value to a number even more crazy than 10.000?

I think it's enough to keep #23319 open as that seems to track the same problem, I'm leaving this one closed for now.

@duffner
Copy link
Author

duffner commented Aug 20, 2020

@hostep, sorry about the extremely delayed response, I have a lot of open tickets where I'm watching and this one slipped through the cracks! I agree with your statement, that since 0 had a special meaning, leave it intact. And yes, we have quite a few customers who exceed the 10k number very often, granted these are all Commerce Edition customers but I think it makes it even more valid.

I personally agree with Magento's approach on allowing "Infinite" values using "0" this has been the standard practice in Magento for over 12 years, and if this change is made, it should be made EVERYWHERE in the application. There shouldn't be a case on one field where it works differently than all other fields. If anything, there should be an "Infinite Setting, and then if that is set to false, then a dependent setting of Value". I'm sorry, but having to set some fake number, just to set a fake number seems like terrible programming.

With all this said, I have no issues changing the approach, but I have an issue with inconsistency in an application and config values that have no true value. This same change was made one-time in the early days of Magneto for "Free Shipping Threshold" within the free shipping module. I bet you will find 95% of stores, with the free shipping threshold set to "1000000000000000" so you can use Free Shipping in Coupon Codes, without giving free shipping based on the threshold of an order's value.

@hostep
Copy link
Contributor

hostep commented Aug 20, 2020

Hi @duffner

Sorry currently little time to dig into this again (it was indeed a while ago), but I'm noticing that #23319 is fixed now in Magento 2.3.4 by MC-17606.
There isn't 1 merge commit but 4 apparently:

If I understand Magento's fix correctly, it kind of fixes the issue, but not like you want probably.
Have you already tested this issue on 2.3.4 or higher and does it work more like expected or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Inventory Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

4 participants