fond-of-oryx/availability-cart-data-extender 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

license

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-03