setono/sylius-shop-the-look-plugin
Composer 安装命令:
composer require setono/sylius-shop-the-look-plugin
包简介
Create looks for your Sylius store that let your customers buy more items
README 文档
README
Installation
Require plugin with composer
composer require setono/sylius-shop-the-look-plugin
Import configuration
# config/packages/setono_sylius_shop_the_look.yaml imports: - { resource: "@SetonoSyliusShopTheLookPlugin/Resources/config/app/config.yaml" }
(Optional) Import fixtures
If you wish to have some looks to play with in your application during development.
# config/packages/setono_sylius_shop_the_look.yaml imports: # ... - { resource: "@SetonoSyliusShopTheLookPlugin/Resources/config/app/fixtures.yaml" }
Import routing
# config/routes/setono_sylius_shop_the_look.yaml setono_sylius_shop_the_look: resource: "@SetonoSyliusShopTheLookPlugin/Resources/config/routes.yaml" # Or if your app doesn't use localized URLs: # resource: "@SetonoSyliusShopTheLookPlugin/Resources/config/routes_no_locale.yaml" # @see https://docs.sylius.com/en/latest/cookbook/shop/disabling-localised-urls.html
Add plugin class to your bundles.php
Make sure you add it before SyliusGridBundle, otherwise you'll get exception.
<?php $bundles = [ // ... Setono\SyliusShopTheLookPlugin\SetonoSyliusShopTheLookPlugin::class => ['all' => true], Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true], // ... ];
Prepare assets
If you're using Webpack encore in your app:
- Add swiper to your
package.json:
yarn add swiper
- Specify plugin's scripts alias at
webpack.config.js:
// webpack.config.js // Admin const setonoShopTheLookPluginAdminResources = path.resolve(__dirname, 'vendor/setono/sylius-shop-the-look-plugin/src/Resources/private/admin/'); // ... adminConfig.resolve.alias['setono/shop-the-look-plugin'] = setonoShopTheLookPluginAdminResources; // ... // Shop const setonoShopTheLookPluginShopResources = path.resolve(__dirname, 'vendor/setono/sylius-shop-the-look-plugin/src/Resources/private/shop/'); // ... shopConfig.resolve.alias['setono/shop-the-look-plugin'] = setonoShopTheLookPluginShopResources;
- Use plugin's apps/styles:
// assets/admin/js/app.js import 'setono/shop-the-look-plugin/js/app';
// assets/shop/js/app.js import 'setono/shop-the-look-plugin/js/app'; import 'setono/shop-the-look-plugin/scss/app';
- And run
yarn encore devto rebuild it
If you're using regular scripts inclusion
This is not supported out of the box (slug generation script), but I guess you can do something like this at your app's javascript file:
(function ($) { 'use strict'; $.fn.extend({ // Put setono-shop-the-look-slug.js's content here }); $(document).ready(() => { $(document).lookSlugGenerator(); }); })(jQuery);
# config/packages/setono_sylius_shop_the_look.yaml imports: // ... - { resource: "@SetonoSyliusShopTheLookPlugin/Resources/config/app/ui/admin.yaml" }
Also, you should discover src/Resources/private and adjust shop styles/scripts to your needs.
Update your database:
$ bin/console doctrine:migrations:diff $ bin/console doctrine:migrations:migrate
Override templates
Inject look discount lines from src/Resources/views/templates/bundles templates to cart/checkout/order templates like it was done at tests/Application/templates/bundles.
setono/sylius-shop-the-look-plugin 适用场景与选型建议
setono/sylius-shop-the-look-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.38k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 03 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 setono/sylius-shop-the-look-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 setono/sylius-shop-the-look-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 11.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-03