setono / sylius-google-optimize-plugin
Setono为Sylius提供的示例插件。
v0.1.0-beta
2022-06-07 08:52 UTC
Requires
- php: >=7.4
- ext-json: *
- doctrine/collections: ^1.6
- doctrine/persistence: ^1.3 || ^2.3
- knplabs/knp-menu: ^3.3
- setono/bot-detection-bundle: ^1.6
- setono/doctrine-object-manager-trait: ^1.1
- sylius/resource-bundle: ^1.8
- symfony/config: ^4.4 || ^5.4
- symfony/dependency-injection: ^4.4 || ^5.4
- symfony/event-dispatcher: ^4.4 || ^5.4
- symfony/form: ^4.4 || ^5.4
- symfony/http-foundation: ^4.4 || ^5.4
- symfony/http-kernel: ^4.4 || ^5.4
- symfony/options-resolver: ^4.4 || ^5.4
- symfony/routing: ^4.4 || ^5.4
- twig/twig: ^2.14
- webmozart/assert: ^1.11
Requires (Dev)
- api-platform/core: ^2.6
- friendsofsymfony/oauth-server-bundle: >2.0.0-alpha.0 ^2.0@dev
- lexik/jwt-authentication-bundle: ^2.15
- matthiasnoback/symfony-config-test: ^4.3
- matthiasnoback/symfony-dependency-injection-test: ^4.3
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.16
- psalm/plugin-symfony: ^3.1
- roave/security-advisories: dev-latest
- setono/code-quality-pack: ^2.2.0
- setono/google-analytics-server-side-tracking-bundle: ^0.3.5
- sylius/admin-api-bundle: ^1.11
- sylius/sylius: ~1.10.14
- symfony/debug-bundle: ^4.4 || ^5.4
- symfony/dotenv: ^4.4 || ^5.4
- symfony/intl: ^4.4 || ^5.4
- symfony/property-info: ^4.4 || ^5.4
- symfony/serializer: ^4.4 || ^5.4
- symfony/web-profiler-bundle: ^4.4 || ^5.4
- symfony/webpack-encore-bundle: ^1.14
- dev-master / 1.0.x-dev
- v0.1.0-beta
- dev-dependabot/composer/lexik/jwt-authentication-bundle-tw-2.18
- dev-dependabot/composer/doctrine/persistence-tw-2.5.7
- dev-dependabot/composer/setono/code-quality-pack-tw-2.4.0
- dev-dependabot/composer/setono/bot-detection-bundle-tw-1.9
- dev-dependabot/composer/psalm/plugin-phpunit-tw-0.18
- dev-dependabot/composer/psalm/plugin-symfony-tw-4.0
- dev-dependabot/composer/doctrine/collections-tw-1.8
- dev-dependabot/composer/api-platform/core-tw-2.7
- dev-dependabot/composer/setono/google-analytics-server-side-tracking-bundle-tw-0.3.9
- dev-dependabot/composer/twig/twig-tw-2.15
This package is auto-updated.
Last update: 2024-09-13 12:54:44 UTC
README
正确地将 Google Optimize 集成到您的Sylius商店中!
安装插件
composer require setono/sylius-google-optimize-plugin
启用插件
如果您启用了Flex,则composer require
会自动将包和插件添加到bundles.php
中。如果没有,您应该手动添加它们
// ... Setono\SyliusGoogleOptimizePlugin\SetonoSyliusGoogleOptimizePlugin::class => ['all' => true], Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true], // ...
注意:在添加SyliusGridBundle
之前添加插件非常重要。
添加配置文件
创建文件 config/packages/setono_sylius_google_optimize.yaml
并添加以下内容
# config/packages/setono_sylius_google_optimize.yaml imports: - { resource: "@SetonoSyliusGoogleOptimizePlugin/Resources/config/app/config.yaml" }
包含路由配置
创建文件 config/routes/setono_sylius_google_optimize.yaml
并添加以下内容
# config/routes/setono_sylius_google_optimize.yaml setono_sylius_google_optimize: resource: "@SetonoSyliusGoogleOptimizePlugin/Resources/config/routes.yaml"
该插件还提供了一个非本地化商店的路由文件。您只需使用 @SetonoSyliusGoogleOptimizePlugin/Resources/config/routes_no_locale.yaml
代替 @SetonoSyliusGoogleOptimizePlugin/Resources/config/routes.yaml
即可。