valantic-spryker/price-product-customer-group

包含数据库架构和为特定客户组的产品价格所需的插件模块。

1.0.0 2023-08-01 15:21 UTC

This package is auto-updated.

Last update: 2024-09-09 12:35:39 UTC


README

Minimum PHP Version

包含数据库架构和为特定客户组的产品价格所需的插件模块。

安装包

composer req valantic-spryker/price-product-customer-group

更新共享配置

config/Shared/config_default.php

$config[KernelConstants::CORE_NAMESPACES] = [
    ...
    'ValanticSpryker',
];

注册插件

src/Pyz/Zed/PriceProduct/PriceProductDependencyProvider.php

...

use ValanticSpryker\Zed\PriceProductCustomerGroup\Communication\Plugin\PriceProduct\CustomerGroupPriceDimensionAbstractWriterPlugin;
use ValanticSpryker\Zed\PriceProductCustomerGroup\Communication\Plugin\PriceProduct\CustomerGroupPriceDimensionConcreteWriterPlugin;
use ValanticSpryker\Zed\PriceProductCustomerGroup\Communication\Plugin\PriceProduct\CustomerGroupPriceProductDimensionExpanderStrategyPlugin;
use ValanticSpryker\Zed\PriceProductCustomerGroup\Communication\Plugin\PriceProduct\CustomerGroupPriceProductStorePreDeletePlugin;
use ValanticSpryker\Zed\PriceProductCustomerGroup\Communication\Plugin\PriceProduct\CustomerGroupPriceQueryCriteriaPlugin;

...

 protected function getPriceDimensionQueryCriteriaPlugins(): array
 {
    return array_merge(parent::getPriceDimensionQueryCriteriaPlugins(), [
        ...
        new CustomerGroupPriceQueryCriteriaPlugin(),
    ]);
 }

...

protected function getPriceProductStorePreDeletePlugins(): array
{
    return [
        ...
        new CustomerGroupPriceProductStorePreDeletePlugin(),
    ];
}

...

protected function getPriceProductDimensionExpanderStrategyPlugins(): array
{
    return [
        ...
        new CustomerGroupPriceProductDimensionExpanderStrategyPlugin(),
    ];
}

...

protected function getPriceDimensionConcreteSaverPlugins(): array
{
    return [
        ...
        new CustomerGroupPriceDimensionConcreteWriterPlugin(),
    ];
}

...

protected function getPriceDimensionAbstractSaverPlugins(): array
{
    return [
        ...
        new CustomerGroupPriceDimensionAbstractWriterPlugin(),
    ];
}

src/Pyz/Zed/Console/ConsoleDependencyProvider.php

...
use ValanticSpryker\Zed\PriceProductCustomerGroup\Communication\Console\PriceProductCustomerGroupDeleteConsole;
...

protected function getConsoleCommands(Container $container): array
{
    $commands = [
        ...
        new PriceProductCustomerGroupDeleteConsole(),
    ];
}

src/Pyz/Service/PriceProduct/PriceProductDependencyProvider.php

...
use ValanticSpryker\Service\PriceProductCustomerGroup\Plugin\PriceProduct\CustomerGroupPriceProductFilterPlugin;
...

protected function getPriceProductDecisionPlugins(): array
{
    return array_merge([
        ...
        new CustomerGroupPriceProductFilterPlugin(),
    ], parent::getPriceProductDecisionPlugins());
}

另请参阅

价格产品客户组连接器的集成:https://gitlab.nxs360.com/packages/php/spryker/price-product-customer-group-connector