From b0408930e1a6c86a0880b372dff3fd2c9b21a60c Mon Sep 17 00:00:00 2001 From: Vladimir Voronin Date: Mon, 20 Jul 2020 17:03:55 +0300 Subject: [PATCH] Fix frontend and mail sending on the suite-nonsplit --- application/app_files/Mailer.nonsplit.patch | 43 +++++++++++++++++++ .../frontend-build-config-nonsplit.json.j2 | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 application/app_files/Mailer.nonsplit.patch diff --git a/application/app_files/Mailer.nonsplit.patch b/application/app_files/Mailer.nonsplit.patch new file mode 100644 index 0000000..3718b0b --- /dev/null +++ b/application/app_files/Mailer.nonsplit.patch @@ -0,0 +1,43 @@ +--- ./src/Pyz/Zed/Mail/MailDependencyProvider.php 2020-07-15 10:36:13.198516641 +0000 ++++ ./src/Pyz/Zed/Mail/MailDependencyProvider.php.old 2020-07-15 10:20:29.023345911 +0000 +@@ -30,10 +30,6 @@ + use Spryker\Zed\Oms\Communication\Plugin\Mail\OrderConfirmationMailTypePlugin; + use Spryker\Zed\Oms\Communication\Plugin\Mail\OrderShippedMailTypePlugin; + use Spryker\Zed\SalesInvoice\Communication\Plugin\Mail\OrderInvoiceMailTypePlugin; +-use Spryker\Zed\Mail\Dependency\Mailer\MailToMailerBridge; +-use Swift_Mailer; +-use Swift_Message; +-use Swift_SmtpTransport; + + class MailDependencyProvider extends SprykerMailDependencyProvider + { +@@ -42,29 +38,6 @@ + * + * @return \Spryker\Zed\Kernel\Container + */ +- +- protected function addMailer(Container $container) +- { +- $container[static::MAILER] = function () { +- $message = new Swift_Message(); +- $transport = new Swift_SmtpTransport( +- $this->getConfig()->getSmtpHost(), +- $this->getConfig()->getSmtpPort() +- ); +- $transport->setHost(getenv('SMTP_HOST')); +- $transport->setPort(getenv('SMTP_PORT')); +- $transport->setUsername(getenv('SMTP_USER')); +- $transport->setPassword(getenv('SMTP_PASS')); +- $transport->setEncryption("ssl"); +- +- $mailer = new Swift_Mailer($transport); +- +- return new MailToMailerBridge($message, $mailer); +- }; +- +- return $container; +- } +- + public function provideBusinessLayerDependencies(Container $container) + { + $container = parent::provideBusinessLayerDependencies($container); \ No newline at end of file diff --git a/spryker/frontend-build-config-nonsplit.json.j2 b/spryker/frontend-build-config-nonsplit.json.j2 index 799cc85..7d269dc 100644 --- a/spryker/frontend-build-config-nonsplit.json.j2 +++ b/spryker/frontend-build-config-nonsplit.json.j2 @@ -1,5 +1,5 @@ { - "path": "assets/%theme%%namespace%", + "path": "assets/%SPRYKER_BUILD_HASH%/%theme%", "namespaces": [ {% for store in stores %} {