Migration guide - SalesMerchantConnector
Edit on GitHubSalesMerchantConnector
is deprecated. For a plugin expanding order items with the parameters, use the SalesOms module.
Info
Keep in mind, if you use functionality from SalesMerchantConnector
, you need to install SalesOms
and MerchantSalesOrder
modules.
Estimated migration time: 1 hour.
To replace the deprecated functionality, do the following:
- Install the
SalesOms
,MerchantSalesOrder
modules by running the following command:
composer require spryker/sales-oms spryker/merchant-sales-order
- Update the transfer objects:
console transfer:generate
- Generate translator cache by running the following command to get the latest Zed translations:
console propel:install
- Update the transfer objects:
console transfer:generate
- Replace the deprecated plugin from the
SalesMerchantConnector
and add the new one fromMerchantSalesOrder
modules insrc/Pyz/Zed/Sales/SalesDependencyProvider.php
. - Change namespace from:
use Spryker\Zed\SalesMerchantConnector\Communication\Plugin\OrderItemReferenceExpanderPreSavePlugin;
to:
use Spryker\Zed\SalesOms\Communication\Plugin\OrderItemReferenceExpanderPreSavePlugin;
- Add
MerchantReferencesOrderExpanderPlugin
tosrc/Pyz/Zed/Sales/SalesDependencyProvider.php
.
namespace Pyz\Zed\Sales;
use Spryker\Zed\Sales\SalesDependencyProvider as SprykerSalesDependencyProvider;
use Spryker\Zed\MerchantSalesOrder\Communication\Plugin\Sales\MerchantReferencesOrderExpanderPlugin;
class SalesDependencyProvider extends SprykerSalesDependencyProvider
{
/**
* @return \Spryker\Zed\SalesExtension\Dependency\Plugin\OrderExpanderPluginInterface[]
*/
protected function getOrderHydrationPlugins(): array
{
return [
new MerchantReferencesOrderExpanderPlugin(),
];
}
}
Thank you!
For submitting the form