-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[API] Order confirmation email sending #11754
Conversation
src/Sylius/Bundle/CoreBundle/Resources/views/Email/Blocks/OrderConfirmation/_content.html.twig
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,28 @@ | |||
{% block body %} | |||
{% autoescape false %} | |||
{% set logo = channel.hostname is not null ? 'http://' ~ channel.hostname ~ asset('assets/shop/img/logo.png') : absolute_url(asset('assets/shop/img/logo.png')) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logo is taken from shop namespace, I'm not sure if it is coupling CoreBundle with ShopBundle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just an asset. Perhaps we should move some image to CoreBundle as well, but it should allow the application to be run without the Shop bundle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may not render a logo if shop is not enabled.
src/Sylius/Bundle/CoreBundle/Tests/Mailer/OrderEmailManagerTest.php
Outdated
Show resolved
Hide resolved
@@ -25,7 +25,7 @@ | |||
"require": { | |||
"php": "^7.3", | |||
"api-platform/core": "^2.5", | |||
"sylius/core-bundle": "^1.7", | |||
"sylius/core-bundle": "dev-master", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try composer replace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be part of separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SirDomin can you try to remove this line?
src/Sylius/Bundle/AdminBundle/Resources/views/Email/orderConfirmation.html.twig
Show resolved
Hide resolved
45f570a
to
5650bb6
Compare
0f2a51d
to
045e812
Compare
This PR extracted mailing from Shop to Core. This move allowed us to use the same email code and twig files in both Shop, Admin, and API context. Templates are moved, but in order to provide backward compatibility, files where they were used before, are left and include content from the core. To finish this PR, we should:
|
045e812
to
b2cf1f0
Compare
cac900e
to
34d7283
Compare
34d7283
to
0a838f2
Compare
0a838f2
to
6598363
Compare
/** | ||
* @Given I have proceeded through checkout process in the :localeCode locale with email :email | ||
*/ | ||
public function iHaveProceededThroughCheckoutProcessInTheLocaleWithEmail(string $localeCode, string $email) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function iHaveProceededThroughCheckoutProcessInTheLocaleWithEmail(string $localeCode, string $email) | |
public function iHaveProceededThroughCheckoutProcessInTheLocaleWithEmail(string $localeCode, string $email): void |
Thank you, Łukasz! 🥇 |
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? | not sure | Related tickets | refactoring the way we handle emails implemented in #11754 | License | MIT <!-- - Bug fixes must be submitted against the 1.7 or 1.8 branch (the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- c0d8f32 [API] Order confirmation email sending 85b296b [Core] Extract mailer sender from ShopBundle a73d321 fix composer.json api platform, tests for api mailing added 24ac912 command added 18818a7 mailing is handled with commands da13fb2 pr fix, behat + spec fixed b10b272 pr-fix 0def0d8 introduce event bus
This PR introduce mailing refactor, which should be continued in the future. Bigger description and ADR in progress.