fond-of-oryx/availability-cart-data-extender
最新稳定版本:2.0.0
Composer 安装命令:
composer require fond-of-oryx/availability-cart-data-extender
包简介
Availability Cart Connector module
README 文档
README
This package provides
- a plugin to add the availability and the isSellable state to the items in quote
- a plugin for adding the product name to the error message if one or more items are not sellable or available anymore.
It also provides a new
Installation
composer require fond-of-oryx/availability-cart-data-extender
Configuration
Register plugin AddAvailabilityDataToQuoteItemQuoteChangeObserverPlugin in zed CartDependencyProvider
/**
* @param \Spryker\Zed\Kernel\Container $container
*
* @return \Spryker\Zed\CartExtension\Dependency\Plugin\QuoteChangeObserverPluginInterface[]
*/
protected function getQuoteChangeObserverPlugins(Container $container): array
{
return [
...
new AddAvailabilityDataToQuoteItemQuoteChangeObserverPlugin(),
];
}
If you want the product name in error message too, replace the spryker CheckAvailabilityPlugin with the delivered plugin with same name in src/Pyz/Client/Checkout/CheckoutDependencyProvider.php
from
use Spryker\Zed\AvailabilityCartConnector\Communication\Plugin\CheckAvailabilityPlugin;
to
use FondOfOryx\Zed\AvailabilityCartDataExtender\Communication\Plugin\CheckAvailabilityPlugin;
/**
* @param \Spryker\Zed\Kernel\Container $container
*
* @return \Spryker\Zed\Cart\Dependency\CartPreCheckPluginInterface[]
*/
protected function getCartPreCheckPlugins(Container $container)
{
return [
...
new CheckAvailabilityPlugin(),
...
];
}
统计信息
- 总下载量: 15.66k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-09-03