setono / sylius-shipping-countdown-plugin
适用于Sylius 1.6+的Setono发货倒计时插件
v0.1.1
2022-08-15 13:51 UTC
Requires
- php: ^7.4 || ^8.0
- doctrine/collections: ^1.0
- fakerphp/faker: ^1.9
- knplabs/knp-menu: ^3.1
- sylius/resource-bundle: ^1.6
- symfony/config: ^4.4 || ^5.0
- symfony/console: ^4.4 || ^5.0
- symfony/dependency-injection: ^4.4 || ^5.0
- symfony/doctrine-bridge: ^4.4 || ^5.0
- symfony/form: ^4.4 || ^5.0
- symfony/http-kernel: ^4.4 || ^5.1.5
- symfony/options-resolver: ^4.4 || ^5.0
- symfony/translation-contracts: ^1.1 || ^2.0
- thecodingmachine/safe: ^1.0
- twig/twig: ^2.0 || ^3.0
- webmozart/assert: ^1.8
Requires (Dev)
- api-platform/core: ^2.5
- doctrine/persistence: ^2.0
- lexik/jwt-authentication-bundle: ^2.10
- matthiasnoback/symfony-config-test: ^4.2
- matthiasnoback/symfony-dependency-injection-test: ^4.2
- phpunit/phpunit: ^9.5
- psalm/plugin-symfony: ^2.1
- roave/security-advisories: dev-latest
- sensiolabs/security-checker: ^6.0
- setono/code-quality-pack: ^2.2
- sylius/sylius: ^1.11
- symfony/cache: ^4.4 || ^5.0
- symfony/debug-bundle: ^5.1
- symfony/dotenv: ^5.2
- symfony/intl: ^4.4 || ^5.0
- symfony/maker-bundle: ^1.15
- symfony/property-info: ^4.4 || ^5.0
- symfony/serializer: ^4.4 || ^5.0
- symfony/web-profiler-bundle: ^5.0
Suggests
- symfony/cache: To cache results
This package is auto-updated.
Last update: 2024-09-05 13:33:12 UTC
README
截图
安装
使用Composer安装插件
$ composer require setono/sylius-shipping-countdown-plugin
导入配置
# config/packages/setono_sylius_shipping_countdown.yaml imports: - { resource: "@SetonoSyliusShippingCountdownPlugin/Resources/config/app/config.yaml" } # Uncomment next line if you're using Webpack Encore # - { resource: "@SetonoSyliusShippingCountdownPlugin/Resources/config/app/config_webpack.yaml" } # You can also import example fixtures to play # - { resource: "@SetonoSyliusShippingCountdownPlugin/Resources/config/app/fixtures.yaml" } # If you want to use caching - add next configuration: framework: cache: pools: app.shipping_countdown_cache_pool: adapter: cache.app setono_sylius_shipping_countdown: cache: pool: app.shipping_countdown_cache_pool enabled: true
导入路由
# config/routes/setono_sylius_shipping_countdown.yaml setono_sylius_shipping_countdown: resource: "@SetonoSyliusShippingCountdownPlugin/Resources/config/routes.yaml"
或者如果你的应用不使用地区设置
# config/routes.yaml setono_sylius_shipping_countdown: resource: "@SetonoSyliusShippingCountdownPlugin/Resources/config/routes_no_locale.yaml"
将插件类添加到你的 bundles.php
确保你在 SyliusGridBundle
之前添加它,否则你会得到 您请求了一个不存在的参数 "setono_sylius_shipping_countdown.model.shipping_schedule.class"。
异常。
<?php $bundles = [ // ... Setono\SyliusShippingCountdownPlugin\SetonoSyliusShippingCountdownPlugin::class => ['all' => true], Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true], // ... ];
更新你的数据库
bin/console doctrine:migrations:diff bin/console doctrine:migrations:migrate
安装资源
php bin/console assets:install
清除缓存
php bin/console cache:clear
调试计划
你可以使用 setono:shipping-countdown:debug
命令来调试计划。
示例
bin/console setono:shipping-countdown:debug
bin/console setono:shipping-countdown:debug '+1 day'
bin/console setono:shipping-countdown:debug '2021-04-29 16:29'
bin/console setono:shipping-countdown:debug '2021-04-29 16:31'