fond-of-oryx/company-oms-mail-connector

3.2.0 2024-01-15 09:26 UTC

This package is auto-updated.

Last update: 2024-10-15 12:53:30 UTC


README

CI license

Provides plugins to register in OmsDependencyProvider. In our case the customer service can create orders for our b2b customer. When the cs create those orders, the order confirmation email will be send to the customer service instead of the customer.

CompanyLocaleOmsOrderMailExpanderPlugin

This plugin will add the email address from the company business unit as recipient.

CompanyEmailOmsOrderMailExpanderPlugin

This plugin will correct the locale for the mail. For example the customer service creates the order with german locale settings and the customer is from italy. The customer will normally receive the order confirmation in german. This plugin overrides the locale with the company locale and uses default as fallback.

Installation

composer require fond-of-oryx/company-oms-mail-connector

Configuration

Register oms order mail plugins in src/Pyz/Zed/Oms/OmsDependencyProvider.php

* @param \Spryker\Zed\Kernel\Container $container
*
* @return \Spryker\Zed\OmsExtension\Dependency\Plugin\OmsOrderMailExpanderPluginInterface[]
*/
protected function getOmsOrderMailExpanderPlugins(Container $container): array
{
    return [
        ...
        new CompanyLocaleOmsOrderMailExpanderPlugin(),
        new CompanyEmailOmsOrderMailExpanderPlugin(),
    ];
}```