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

Allow category to be source or target when matching in Sales and Discounts #984

Closed
nfourtythree opened this issue Aug 28, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@nfourtythree
Copy link
Contributor

At the moment they both require the category to be a field on the product. There are use cases where they might be in a related products field on the Category.

Current matches (https://github.com/craftcms/commerce/blob/develop/src/services/Discounts.php#L377) and (https://github.com/craftcms/commerce/blob/develop/src/services/Sales.php#L363).

We should also look to potentially combine these checks to reduce the code replication.

This will likely be a breaking change for some users as it might discount/apply sales to unexpected products.

@nfourtythree nfourtythree added the 💡 enhancement Ideas and suggestions label Aug 28, 2019
@nfourtythree nfourtythree added this to the 2.2 milestone Aug 28, 2019
@nfourtythree nfourtythree self-assigned this Aug 28, 2019
@nfourtythree
Copy link
Contributor Author

Fixed in 4a568ea

@nfourtythree
Copy link
Contributor Author

Due to this being a significant breaking change, this functionality is being moved to the 3.0 release

@nfourtythree
Copy link
Contributor Author

This functionality is now on the 3.0 development branch and will be included in the next 3.0 pre-release.

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

No branches or pull requests

1 participant