workouse / sylius-referral-marketing-plugin
此包已废弃,不再维护。未建议替代包。
Sylius电子商务的推荐营销包
dev-master / 1.5.x-dev
2019-11-29 14:24 UTC
Requires
- php: ^7.2
- sylius/sylius: ^1.4
Requires (Dev)
- behat/behat: ^3.4
- behat/mink: ^1.7@dev
- behat/mink-browserkit-driver: ^1.3
- behat/mink-extension: ^2.2
- behat/mink-selenium2-driver: ^1.3
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.0
- friends-of-behat/variadic-extension: ^1.1
- lakion/mink-debug-extension: ^1.2.3
- phpspec/phpspec: ^5.0
- phpstan/phpstan-doctrine: ^0.10
- phpstan/phpstan-shim: ^0.10
- phpstan/phpstan-webmozart-assert: ^0.10
- phpunit/phpunit: ^6.5
- sensiolabs/security-checker: ^5.0
- sylius-labs/coding-standard: ^2.0
- symfony/browser-kit: ^3.4|^4.1
- symfony/debug-bundle: ^3.4|^4.1
- symfony/dotenv: ^4.2
- symfony/intl: ^3.4|^4.1
- symfony/web-profiler-bundle: ^3.4|^4.1
- symfony/web-server-bundle: ^3.4|^4.1
Conflicts
- symfony/browser-kit: 4.1.8
- symfony/dependency-injection: 4.1.8
- symfony/dom-crawler: 4.1.8
- symfony/routing: 4.1.8
- symfony/symfony: 4.1.8
This package is auto-updated.
Last update: 2024-07-06 11:48:36 UTC
README
Workouse推荐营销插件
Sylius电子商务的推荐营销包。允许客户通过电子邮件互相发送邀请并赢得优惠券
安装
$ composer require workouse/sylius-referral-marketing-plugin
将插件依赖项添加到您的 config/bundles.php
文件中
return [ ... Workouse\SyliusReferralMarketingPlugin\WorkouseReferralMarketingPlugin::class => ['all' => true], ];
在您的 config/packages/_sylius.yaml
文件中导入所需的配置
# config/packages/_sylius.yaml imports: ... - { resource: "@WorkouseSyliusReferralMarketingPlugin/Resources/config/config.yml" }
在您的 config/routes.yaml
文件中导入路由
# config/routes.yaml ... workouse_referral_marketing_plugin: resource: "@WorkouseSyliusReferralMarketingPlugin/Resources/config/routing.yml"
扩展实体
<?php declare(strict_types=1); namespace App\Entity\Promotion; use Doctrine\ORM\Mapping as ORM; use Workouse\SyliusReferralMarketingPlugin\Entity\PromotionCouponTrait; use Sylius\Component\Core\Model\PromotionCoupon as BasePromotionCoupon; /** * @ORM\Entity * @ORM\Table(name="sylius_promotion_coupon") */ class PromotionCoupon extends BasePromotionCoupon { use PromotionCouponTrait; // ... }
在您的 config/routes.yaml
文件中进行配置
#config/packages/workouse_referral_marketing.yml workouse_referral_marketing: service: 'workouse_referral_marketing_plugin.promotion' referrer_promotion_code: 'referrer_promotion' invitee_promotion_code: 'invitee_promotion'
通过更新数据库架构和安装资源来完成安装
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate
$ bin/console cache:clear
测试和运行插件
$ composer install $ cd tests/Application $ yarn $ yarn build $ bin/console assets:install public -e test $ bin/console doctrine:database:create -e test $ bin/console doctrine:schema:create -e test $ bin/console server:run 127.0.0.1:8080 -d public -e test $ open http://localhost:8080 $ vendor/bin/behat