monsieurbiz/sylius-no-commerce-plugin
Composer 安装命令:
composer require monsieurbiz/sylius-no-commerce-plugin
包简介
Disable the e-commerce on your Sylius.
README 文档
README
No Commerce for Sylius
This plugin disables the e-commerce parts of Sylius.
Basically it disables the routes and updates the admin and frontend templates.
Compatibility
| Sylius Version | PHP Version |
|---|---|
| 1.12 | 8.1 - 8.2 - 8.3 |
| 1.13 | 8.1 - 8.2 - 8.3 |
| 1.14 | 8.1 - 8.2 - 8.3 |
Installation
If you want to use our recipes, you can configure your composer.json by running:
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
composer require monsieurbiz/sylius-no-commerce-plugin
For the installation without flex, follow these additional steps
Change your config/bundles.php file to add this line for the plugin declaration:
<?php return [ //.. MonsieurBiz\SyliusNoCommercePlugin\MonsieurBizSyliusNoCommercePlugin::class => ['all' => true], ];
Then create the config file in config/packages/monsieurbiz_sylius_nocommerce_plugin.yaml:
imports: - { resource: "@MonsieurBizSyliusNoCommercePlugin/Resources/config/config.yaml" }
Add some annotations to your src/Entity/Channel/Channel.php entity to prevent error during Channel saving:
/** * @ORM\Entity * @ORM\Table(name="sylius_channel") + * @ORM\AssociationOverrides({ + * @ORM\AssociationOverride(name="baseCurrency", + * joinColumns=@ORM\JoinColumn( + * name="base_currency_id", referencedColumnName="id", nullable=true + * ) + * ) + * }) */ #[ORM\Entity] #[ORM\Table(name: 'sylius_channel')] + #[ORM\AssociationOverrides([ + new ORM\AssociationOverride( + name: 'baseCurrency', + joinColumns: new ORM\JoinColumn(name: 'base_currency_id', referencedColumnName: 'id', nullable: true) + )] + )] class Channel extends BaseChannel
Use a different trait for your src/Kernel.php:
- use MicroKernelTrait; + use SyliusNoCommerceKernelTrait;
(don't forget the use MonsieurBiz\SyliusNoCommercePlugin\Kernel\SyliusNoCommerceKernelTrait; statement or course).
Copy the templates we override:
cp -Rv vendor/monsieurbiz/sylius-no-commerce-plugin/src/Resources/templates/* templates/
Create the new migrations, and run them:
./bin/console doctrine:migrations:diff
./bin/console doctrine:migrations:migrate
Re-enable features
In the config file config/packages/monsieurbiz_sylius_nocommerce_plugin.yaml, add this lines:
# ... monsieurbiz_sylius_nocommerce: config: allow_countries: false allow_customers: false allow_zones: false
You can allow different sections by changing the parameters to true.
Ignore routes
By default, the disable firewall listener will ignore the following routes for the developer toolbar.
You can ignore additional routes, such as the preview route for error pages, by adding them to the config/packages/monsieurbiz_sylius_nocommerce_plugin.yaml file:
parameters: monsieurbiz_sylius_nocommerce.disable_firewall.ignored_routes: - "_preview_error"
Contributing
You can open an issue or a Pull Request if you want! 😘
Thank you!
monsieurbiz/sylius-no-commerce-plugin 适用场景与选型建议
monsieurbiz/sylius-no-commerce-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21.04k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2020 年 10 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sylius」 「sylius-plugin」 「monsieurbiz」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 monsieurbiz/sylius-no-commerce-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 monsieurbiz/sylius-no-commerce-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 monsieurbiz/sylius-no-commerce-plugin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Implementation of the Omnibus Directive for Sylius application.
A simple plugin to have sales reports in Sylius
Adds a simple message on top of your shop.
Bulk export of sylius resources
Sylius plugin that integrates Addwish
Setono example plugin for Sylius.
统计信息
- 总下载量: 21.04k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-26
