setono / sylius-conversion-attribution-plugin
Setono example plugin for Sylius.
Fund package maintenance!
Setono
Installs: 2 369
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- php: >=8.1
- doctrine/persistence: ^2.0 || ^3.0
- setono/bot-detection-bundle: ^1.12
- setono/client: ^1.0
- setono/client-bundle: ^1.0@alpha
- setono/composite-compiler-pass: ^1.1
- setono/doctrine-orm-trait: ^1.0
- sylius/core: ^1.0
- sylius/core-bundle: ^1.0
- sylius/resource-bundle: ^1.6
- symfony/cache: ^6.4 || ^7.0
- symfony/config: ^6.4 || ^7.0
- symfony/console: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/event-dispatcher: ^6.4 || ^7.0
- symfony/http-foundation: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
- symfony/routing: ^6.4 || ^7.0
- symfony/uid: ^6.4 || ^7.0
- webmozart/assert: ^1.11
Requires (Dev)
- api-platform/core: ^2.7.16
- babdev/pagerfanta-bundle: ^3.8
- behat/behat: ^3.14
- doctrine/doctrine-bundle: ^2.11
- infection/infection: ^0.27.10
- jms/serializer-bundle: ^4.2
- lexik/jwt-authentication-bundle: ^2.17
- matthiasnoback/symfony-dependency-injection-test: ^4.3 || ^5.1
- phpunit/phpunit: ^9.6.17
- psalm/plugin-phpunit: ^0.18.4
- setono/code-quality-pack: ^2.7
- setono/tag-bag-bundle: ^3.1
- sylius/sylius: ~1.12.13
- symfony/debug-bundle: ^6.4 || ^7.0
- symfony/dotenv: ^6.4 || ^7.0
- symfony/intl: ^6.4 || ^7.0
- symfony/property-info: ^6.4 || ^7.0
- symfony/serializer: ^6.4 || ^7.0
- symfony/web-profiler-bundle: ^6.4 || ^7.0
- symfony/webpack-encore-bundle: ^1.17.2
- willdurand/negotiation: ^3.1
This package is auto-updated.
Last update: 2024-10-25 08:25:19 UTC
README
See where customers are coming from by attributing conversions directly in your Sylius store
Installation
Download plugin
composer require setono/sylius-conversion-attribution-plugin
Notice that this also installs the setono/client-bundle
which is required by this plugin to work properly.
If you want to use the default javascript injection, you should also install the setono/tag-bag-bundle
.
See the installation instructions for the setono/tag-bag-bundle
here.
Import routes
# config/routes/setono_sylius_conversion_attribution.yaml setono_sylius_conversion_attribution: resource: "@SetonoSyliusConversionAttributionPlugin/Resources/config/routes.yaml"
Extend Customer
and Order
entities
<?php declare(strict_types=1); namespace App\Entity\Customer; use Doctrine\ORM\Mapping as ORM; use Setono\SyliusConversionAttributionPlugin\Model\CustomerInterface; use Setono\SyliusConversionAttributionPlugin\Model\CustomerTrait; use Sylius\Component\Core\Model\Customer as BaseCustomer; /** * @ORM\Entity * * @ORM\Table(name="sylius_customer") */ class Customer extends BaseCustomer implements CustomerInterface { use CustomerTrait; }
<?php declare(strict_types=1); namespace App\Entity\Order; use Doctrine\ORM\Mapping as ORM; use Setono\SyliusConversionAttributionPlugin\Model\OrderInterface; use Setono\SyliusConversionAttributionPlugin\Model\OrderTrait; use Sylius\Component\Core\Model\Order as BaseOrder; /** * @ORM\Entity * * @ORM\Table(name="sylius_order") */ class Order extends BaseOrder implements OrderInterface { use OrderTrait; }
Migrate your database
php bin/console doctrine:migrations:diff php bin/console doctrine:migrations:migrate