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

Rework the order item quantity limit into a parameter #10740

Closed
itinance opened this issue Oct 6, 2019 · 2 comments · Fixed by #11370
Closed

Rework the order item quantity limit into a parameter #10740

itinance opened this issue Oct 6, 2019 · 2 comments · Fixed by #11370
Labels
Do not stale Important issues and PRs, that should not be stalled by Stale Bot DX Issues and PRs aimed at improving Developer eXperience. Feature New feature proposals. Good First Issue Bugs and feature proposals, which are relatively simple to implement for newcomers.

Comments

@itinance
Copy link
Contributor

itinance commented Oct 6, 2019

Sylius version affected: 1.5, 1.6, master

Description
Buying more than 9999 pieces of an article will be hard capped at 9999 as possible maximum value in service decoration of sylius.order_item_quantity_modifier.limiting.

Steps to reproduce

  1. Order more than 9999 pieces of an article

or

  1. look at the source code:
        <service id="sylius.order_item_quantity_modifier.limiting" class="Sylius\Component\Core\Cart\Modifier\LimitingOrderItemQuantityModifier" decorates="sylius.order_item_quantity_modifier" decoration-priority="256">
            <argument type="service" id="sylius.order_item_quantity_modifier.limiting.inner" />
            <argument>9999</argument>
        </service>

Possible Solution

Such limiting values should not be set as magic values in service definition nor in source code. They rather should be parameters out of config files.

Why is it a bad idea to limit quantities to 9999? Because
a) shop owners should be able to meet there own limitation in general
b) especially for digital products a much higher limitation will be required

@itinance itinance changed the title Remove the hard cap of 9999 as order item quantity Remove the hard cap of 9999 for order item quantity Oct 6, 2019
@lchrusciel lchrusciel added the DX Issues and PRs aimed at improving Developer eXperience. label Oct 16, 2019
@lchrusciel
Copy link
Member

Should be parametrized

@CoderMaggie CoderMaggie changed the title Remove the hard cap of 9999 for order item quantity Rework the order item quantity limit into a parameter Oct 17, 2019
@CoderMaggie CoderMaggie added Feature New feature proposals. Roadmap labels Oct 17, 2019
@stale
Copy link

stale bot commented Mar 8, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Issues and PRs with no recent activity, about to be closed soon. label Mar 8, 2020
@Zales0123 Zales0123 added Do not stale Important issues and PRs, that should not be stalled by Stale Bot Good First Issue Bugs and feature proposals, which are relatively simple to implement for newcomers. and removed Stale Issues and PRs with no recent activity, about to be closed soon. labels Mar 9, 2020
Zales0123 added a commit that referenced this issue Nov 13, 2020
This PR was merged into the 1.9-dev branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | master
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes #10740
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.6 or 1.7 branches (the lowest possible)
 - Features and deprecations must be submitted against the master branch
 - Make sure that the correct base branch is set
-->


Commits
-------

9512d65 Add information in documentation about new parameter and add this parameter i config file
63997bc Fixed documentation with use example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do not stale Important issues and PRs, that should not be stalled by Stale Bot DX Issues and PRs aimed at improving Developer eXperience. Feature New feature proposals. Good First Issue Bugs and feature proposals, which are relatively simple to implement for newcomers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants