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

OCC-183: Check 'Maximum Order Quantity' update on Cart #353

Merged
merged 16 commits into from
Sep 22, 2023
Merged

Conversation

porgabi
Copy link
Contributor

@porgabi porgabi commented Sep 19, 2023

OCC-183

Fixes #340

@sarahelsaig sarahelsaig marked this pull request as ready for review September 20, 2023 23:39
@sarahelsaig
Copy link
Contributor

I assume the PR was left as draft by mistake.

Copy link
Contributor

@sarahelsaig sarahelsaig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just occurred to me, but can you set the min and max values on the frontend too?
ProductPart.cshtml and ShoppingCartCell_Quantity.cshtml

@porgabi

This comment was marked as resolved.

@porgabi
Copy link
Contributor Author

porgabi commented Sep 21, 2023

Ah, I suppose you mean setting the min and max attributes on the inputs.

@sarahelsaig
Copy link
Contributor

Ah, I suppose you mean setting the min and max attributes on the inputs.

Yes, for the quantity inputs.

: 0);
maxOrderQuantity = (int)(inventoryPart.MaximumOrderQuantity.Value > 0 && !inventoryPart.IgnoreInventory.Value
? inventoryPart.MaximumOrderQuantity.Value
: 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value for max shouldn't be 1. For example if I fill out the minimum but not the maximum
image
then this sets it to min="2" max="1" which is invalid.
image

It's probably fine to use int.MaxValue instead of 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check 'Maximum Order Quantity' update on Cart (OCC-183)
3 participants