asdoria / sylius-marketing-cart-plugin
为您的商店创建带有多个标准的页面产品
0.1.3
2023-09-07 08:26 UTC
Requires
- php: ^7.4|^8.0
- asdoria/sylius-facet-filter-plugin: ^0.1
- sylius/sylius: ^1.12
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
- friendsofsymfony/oauth-server-bundle: ^1.6 || >2.0.0-alpha.0 ^2.0@dev
- phpspec/phpspec: ^7.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: 0.12.99
- phpstan/phpstan-doctrine: 0.12.33
- phpstan/phpstan-strict-rules: ^0.12.0
- phpstan/phpstan-webmozart-assert: 0.12.12
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- sensiolabs/security-checker: ^6.0
- sylius-labs/coding-standard: ^4.0
- symfony/browser-kit: ^4.4 || ^5.2
- symfony/debug-bundle: ^4.4 || ^5.2
- symfony/dotenv: ^4.4 || ^5.2
- symfony/intl: ^4.4 || ^5.2
- symfony/web-profiler-bundle: ^4.4 || ^5.2
- vimeo/psalm: 4.7.1
README
Asdoria 营销购物车组件
简单地创建具有多个标准的页面,例如相似属性、分类到 Sylius 商店的产品
功能
- 创建具有多个标准的页面,例如相似属性、分类,的产品
安装
-
运行
composer require asdoria/sylius-marketing-cart-plugin
-
在
config/bundles.php
中添加组件。
Asdoria\SyliusMarketingCartPlugin\AsdoriaSyliusMarketingCartPlugin::class => ['all' => true],
- 在
config/routes.yaml
中导入路由
asdoria_marketing_cart: resource: "@AsdoriaSyliusMarketingCartPlugin/Resources/config/routing.yaml"
- 在
config/packages/_sylius.yaml
中导入配置
imports: - { resource: "@AsdoriaSyliusMarketingCartPlugin/Resources/config/config.yaml"}
- 将以下内容粘贴到
src/Repository/ProductRepository.php
<?php declare(strict_types=1); namespace App\Repository; use Asdoria\SyliusMarketingCartPlugin\Repository\Model\Aware\ProductMarketingCartRepositoryAwareInterface; use Asdoria\SyliusMarketingCartPlugin\Repository\Traits\ProductMarketingCartRepositoryTrait; use Sylius\Bundle\CoreBundle\Doctrine\ORM\ProductRepository as BaseProductRepository; final class ProductRepository extends BaseProductRepository implements ProductMarketingCartRepositoryAwareInterface { use ProductMarketingCartRepositoryTrait; }
- 在
config/packages/_sylius.yaml
中配置仓库
sylius_product:
resources:
product:
classes:
model: App\Entity\Product\Product
+ repository: App\Repository\ProductRepository
演示
您可以通过以下链接尝试在线使用 MarketingCart 插件: 这里!。
注意,我们为 Sylius 开发了几个其他开源插件,其演示和文档列在以下 页面 上。
用法
- 在商店办公室,转到 /en_US/marketing-carts 路径。