$ 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"
or if your app doesn't use locales:
# config/routes.yaml
setono_sylius_shipping_countdown:
resource: "@SetonoSyliusShippingCountdownPlugin/Resources/config/routes_no_locale.yaml"
Make sure you add it before SyliusGridBundle
, otherwise you'll get
You have requested a non-existent parameter "setono_sylius_shipping_countdown.model.shipping_schedule.class".
exception.
<?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
You can use setono:shipping-countdown:debug
command to debug schedule.
Examples:
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'