urbanara/catalog-promotion-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

urbanara/catalog-promotion-plugin

Composer 安装命令:

composer require urbanara/catalog-promotion-plugin

包简介

Catalog promotion extension for Sylius.

README 文档

README

Plugin provides basic functionality of catalog promotion on a top of Sylius platform

Installation

  1. Add plugin to your vendors:
$ composer require urbanara/catalog-promotion-plugin
  1. Extend config files:

    1. Import project config:

      # app/config/config.yml
      
      imports:
          ...
          - { resource: "@CatalogPromotionPlugin/Resources/config/app/grid.yml" }
    2. Import project routing:

      # app/config/routing.yml
      ...
      
      urbanara_catalog_plugin:
          resource: "@CatalogPromotionPlugin/Resources/config/routing.yml"
          prefix: /admin
    3. Add plugin to AppKernel:

      // app/AppKernel.php
      
      $bundles = [
         ...
          new \Urbanara\CatalogPromotionPlugin\CatalogPromotionPlugin(),
      ];
    4. Extend gulp file with following script:

      // Gulpfile.js
      
      gulp.task('catalog-promotion', function() {
          return gulp.src([
              'node_modules/jquery/dist/jquery.min.js',
              'vendor/sylius/sylius/src/Sylius/Bundle/UiBundle/Resources/private/js/sylius-prototype-handler.js',
              'vendor/sylius/sylius/src/Sylius/Bundle/UiBundle/Resources/private/js/sylius-form-collection.js',
              'vendor/urbanara/catalog-promotion-plugin/src/Resources/public/**'
          ])
              .pipe(concat('app.js'))
              .pipe(sourcemaps.write('./'))
              .pipe(gulp.dest('web/assets/catalog/' + 'js/'))
              ;
      });
      
      gulp.task('default', ['admin', 'shop', 'catalog-promotion']);
  2. To support SyliusElasticSearchPlugin apply the following changes:

    1. Configure ONGR in app/config/config.yml:

      # app/config/config.yml
      
      ongr_elasticsearch:
          managers:
              default:
                  index:
                      index_name: sylius
                  mappings:
                      CatalogPromotionPlugin:
                          document_dir: ElasticSearch\Document
    2. Add required bundles to app/AppKernel.php:

      // app/AppKernel.php
      
      $bundles = [
          // ...
          new \Sylius\ElasticSearchPlugin\SyliusElasticSearchPlugin(),
          new \ONGR\ElasticsearchBundle\ONGRElasticsearchBundle(),
          new \ONGR\FilterManagerBundle\ONGRFilterManagerBundle(),
          new \SimpleBus\SymfonyBridge\SimpleBusCommandBusBundle(),
          new \SimpleBus\SymfonyBridge\SimpleBusEventBusBundle(),
      ];
  3. If you want to see strikeout prices in your shop you need to customize templates on your own. A sample customization is available under tests/Application/app/Resources/SyliusShopBundle

Usage

Plugin provides basic crud functionality for catalog promotion as well as processor which will influence unit price of bought items. In addition, a twig helper is provided, which will return a ValueObject with old and current price.

Plugin supports catalog promotion with start date, ends date, promotion prioritization, custom promotion per channel, exclusive promotions. By default plugin provides two rules which will reduce a number of influenced items and two action. Rules:

  • Is product - the promotion will be applied only to the products selected in select box.
  • Is from taxon - the promotion will be applied only to the products which has at least one taxon from selected taxons in select box.

Actions:

  • Fixed value action - will reduce the price of product by fixed value. Value is set per channel.
  • Percentage action - will reduce the price of product by a percentage.

All features are described in features/ section.

统计信息

  • 总下载量: 86
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固