asdoria/sylius-pictogram-plugin 问题修复 & 功能扩展

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

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

asdoria/sylius-pictogram-plugin

Composer 安装命令:

composer require asdoria/sylius-pictogram-plugin

包简介

A Pictogram plugin for Sylius

README 文档

README

Example of a product's pictograms customization

Asdoria Pictogram Bundle

A plugin to create, group and associate pictograms with products

Features

  • Create groups of pictograms using your own images
  • Easily customize which pictograms to display from the product configuration page
  • Images are automatically displayed on the product's store page

Example of a product's pictograms customization

Toggling the pictograms to display for a product Example of a product's pictograms customization

Installation

  1. run composer require asdoria/sylius-pictogram-plugin

  2. Go into config/bundles.php. You must put the Pictogram plugin line ABOVE SyliusGridBundle

Asdoria\SyliusPictogramPlugin\AsdoriaSyliusPictogramPlugin::class => ['all' => true],
[...]
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
  1. Import routes in config/routes.yaml
asdoria_pictogram:
    resource: "@AsdoriaSyliusPictogramPlugin/Resources/config/routing.yaml"
    prefix: /admin
  1. Import config in config/packages/_sylius.yaml
imports:
    - { resource: "@AsdoriaSyliusPictogramPlugin/Resources/config/config.yaml"}
  1. In src/Entity/Product/Product.php. Import Asdoria\SyliusPictogramPlugin\Traits\PictogramsTrait and initialize a pictogram collection in the constructor
// ...

use Asdoria\SyliusPictogramPlugin\Traits\PictogramsTrait;

/**
 * @ORM\Entity
 * @ORM\Table(name="sylius_product")
 */
class Product extends BaseProduct
{
    use PictogramsTrait;

    public function __construct()
    {
        parent::__construct();
        $this->initializePictogramsCollection();
    }
    
    // ...
}
  1. run php bin/console do:mi:mi to update the database schema

Demo

You can see the result for the user here with a cap: here.
If you want to try to create pictograms, go on the admin authentication page and connect with:

Login: asdoria
Password: asdoria

Then go on "Pictograms Groups" in the back office and follow usage lines below.

Note that we have developed several other open source plugins for Sylius, whose demos and documentation are listed on the following page.

Usage

  1. In the back office, under Catalog, enter Pictogram Groups. Create a group using a unique code
  2. In Pictogram Groups, click Managing Pictograms to create/delete images for this group
  3. Go to a product's edit page, then click the Pictograms tab in the sidebar. Here you can toggle which pictograms you wish to display

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-01-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固