alexispe / sylius-round-up-plugin
This plugin allows you to round up the total of the cart.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 3
Type:sylius-plugin
Requires
- php: ^8.0
- sylius/mailer-bundle: ^1.8 || ^2.0@beta
- sylius/sylius: ^1.12
- symfony/webpack-encore-bundle: ^1.15
Requires (Dev)
- behat/behat: ^3.6.1
- behat/mink-selenium2-driver: ^1.4
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- phpspec/phpspec: ^7.2
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^1.8.1
- phpstan/phpstan-doctrine: 1.3.45
- phpstan/phpstan-strict-rules: ^1.3.0
- phpstan/phpstan-webmozart-assert: ^1.2.0
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- sylius-labs/coding-standard: ^4.2
- symfony/browser-kit: ^5.4 || ^6.0
- symfony/debug-bundle: ^5.4 || ^6.0
- symfony/dotenv: ^5.4 || ^6.0
- symfony/flex: ^2.2.2
- symfony/intl: ^5.4 || ^6.0
- symfony/web-profiler-bundle: ^5.4 || ^6.0
- vimeo/psalm: 5.15.0
Conflicts
- symfony/framework-bundle: 6.2.8
This package is auto-updated.
Last update: 2024-11-13 11:48:04 UTC
README
This plugin simply round up your cart.
Then you can choose to donate the difference to a charity, plant a tree or keep it for you as a tip...
Installation
1. Composer
composer require alexispe/sylius-round-up-plugin
2. Load bundle
Add to the bundle list in config/bundles.php
:
<?php return [ // ... Alexispe\SyliusRoundUpPlugin\AlexispeSyliusRoundUpPlugin::class => ['all' => true], // ... ];
3. Load configuration
Add to the imports list in config/packages/_sylius.yaml
:
imports: ... - { resource: "@AlexispeSyliusRoundUpPlugin/config/config.yml" }
4. Show round up line in cart summary
Override template Cart\Summary\_totals.html.twig
and add line 52 (before cart total tr
):
{% include '@AlexispeSyliusRoundUpPlugin/Shop/Cart/Summary/_round_up_total.html.twig' %}
Contribute
Quickstart Installation
-
Execute
docker compose up -d
-
Initialize plugin
docker compose exec app make init
-
See your browser
open localhost
Running plugin tests
docker compose exec app make ecs docker compose exec app make phpstan docker compose exec app make psalm docker compose exec app make phpunit docker compose exec app make phpspec docker compose exec app make behat
License
This plugin is completely free and released under the MIT License.
Contact
I'm a 🇫🇷 freelance Sylius developer. If you want to contact me, e-mail me to contact@alexis-petit.fr. I will try to answer you as soon as possible.