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

[CatalogPromotions] Start and end date #13179

Merged

Conversation

Zales0123
Copy link
Member

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets
License MIT

This is the first step for delayed Catalog Promotions processing 🚀

API:
Zrzut ekranu 2021-10-7 o 11 16 58

UI:
Zrzut ekranu 2021-10-7 o 11 17 35

@Zales0123 Zales0123 added Feature New feature proposals. API APIs related issues and PRs. labels Oct 7, 2021
@Zales0123 Zales0123 requested a review from a team as a code owner October 7, 2021 09:25
@probot-autolabeler probot-autolabeler bot added the Admin AdminBundle related issues and PRs. label Oct 7, 2021
@Zales0123 Zales0123 force-pushed the add-start-and-end-date-to-catalog-promotion branch from c8adc95 to 1c5d8c6 Compare October 7, 2021 11:39
@GSadee GSadee merged commit f99fab4 into Sylius:master Oct 8, 2021
@GSadee
Copy link
Member

GSadee commented Oct 8, 2021

Thanks, Mateusz! 🥇

GSadee added a commit that referenced this pull request Oct 11, 2021
…processing (Zales0123)

This PR was merged into the 1.11-dev branch.

Discussion
----------

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

Based on the work from [this PR](#13179), we can start taking into account catalog promotion dates during their processing. Initially, I assumed that all `CatalogPromotionInterface $catalogPromotion` arguments passed to `CatalogPromotionProcessor::process` will be already eligible (as we only use this processor in the `AllCatalogPromotionsProcessor` service. If in the future, we will need filtration other than on CPs collection (e.g. on a single catalog promotion), we can extend the filter's functionality 🖖 

Note: I wanted to use a calendar service that is already used in Behat... but it's implemented in the ShippingBundle 💃 probably we would need to extract it somewhere to make it available for all other date-/time-based functionalities.

Commits
-------

376e496 [Behat] Describe CP time ranges with Behat scenarios
b0035a0 Create Catalog Promotions provider and use it
c98ae01 First version of iterable criterias for CPs
cb1deb9 Implement DateRange criteria for CatalogPromotions filtration
d328e8f Change Criteria to operate on QueryBuilder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs. API APIs related issues and PRs. Feature New feature proposals.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants