Product Options + Order Management feature integration
Edit on GitHubInstall Feature Core
Prerequisites
To start feature integration, overview and install the necessary features:
Name | Version |
---|---|
Product Options | 202009.0 |
Order Management | 202009.0 |
Spryker Core | 202009.0 |
1) Set up Behavior
Plugin | Specification | Prerequisites | Namespace |
---|---|---|---|
ProductOptionsOrderItemExpanderPlugin |
Expands order items with product options. | None | Spryker\Zed\ProductOption\Communication\Plugin\Sales |
** src/Pyz/Zed/Sales/SalesDependencyProvider.php**
<?php
namespace Pyz\Zed\Sales;
use Spryker\Zed\ProductOption\Communication\Plugin\Sales\ProductOptionsOrderItemExpanderPlugin;
use Spryker\Zed\Sales\SalesDependencyProvider as SprykerSalesDependencyProvider;
class SalesDependencyProvider extends SprykerSalesDependencyProvider
{
/**
* @return \Spryker\Zed\SalesExtension\Dependency\Plugin\OrderItemExpanderPluginInterface[]
*/
protected function getOrderItemExpanderPlugins(): array
{
return [
new ProductOptionsOrderItemExpanderPlugin(),
];
}
}
Verification
Make sure that results from SalesFacade::getOrderItems()
method call contain product options data per each item which has product options.
Thank you!
For submitting the form