喜爱犀牛/可用性警报

4.1.0 2023-05-02 11:12 UTC

This package is auto-updated.

Last update: 2024-09-06 10:03:27 UTC


README

PHP from Travis config license

安装

composer require fond-of-oryx/availability-alert

配置

注册

  • 在 src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php 中 => AvailabilityAlertFormWidget::class
    /**
     * @return string[]
     */
    protected function getGlobalWidgets(): array
    {
        return [
            ...
            AvailabilityAlertFormWidget::class,
        ];
    }
  • 在 src/Pyz/Yves/Router/RouterDependencyProvider.php 中 => AvailabilityAlertControllerProviderPlugin
    /**
     * @return \Spryker\Yves\RouterExtension\Dependency\Plugin\RouteProviderPluginInterface[]
     */
    protected function getRouteProvider(): array
    {
        return [
            ...
            new AvailabilityAlertControllerProviderPlugin(),
        ];
    }

用法

在模板中使用小部件

{% widget 'AvailabilityAlertFormWidget' args [data.product.idProductAbstract] %}{% endwidget %}