Giter Club home page Giter Club logo

sylius-maker-plugin's Introduction

INSTALLATION:

  1. Add Github repository to composer.json:

                {
                    "repositories": [
                        {
                            "type": "vcs",
                            "url":  "[email protected]:ecolos/sylius-maker-plugin.git"
                        }
                    ]
                }
    
  2. Install package via composer from Github

    composer require ecolos/sylius-maker-plugin
  3. Configure vich-uploader package see https://github.com/dustin10/VichUploaderBundle/blob/master/Resources/doc/installation.md#user-content-choose-and-configure-a-persistence-engine

  4. Add to config/bundles.php

            [
                Ecolos\SyliusMakerPlugin\EcolosSyliusMakerPlugin::class => ['all' => true]
                Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true]
            ]
  5. Clear the symfony cache

    php bin/console cache:clear
  6. Determine doctrine schema changes and migrate

    php bin/console doctrine:migrations:diff
    php bin/console doctrine:migrations:execute --up XXXXXXXXXXXXX
  7. Set configs

    Add to config/routes.yaml

    ecolos_sylius_maker_plugin:
        resource: "@EcolosSyliusMakerPlugin/Resources/config/routing.yaml"

    Edit config/services.yml

    imports:
        - { resource: "@EcolosSyliusMakerPlugin/Resources/config/config.yaml" }

    Add to config/packages/_sylius.yml

    imports:
        - { resource: "@EcolosSyliusMakerPlugin/Resources/config/_sylius.yaml" }

    Add to config/packages/doctrine.yml

        doctrine:
            orm:
                mappings:
                    EcolosSyliusMakerPlugin:
                        is_bundle: true
                        type: yml
                        dir: '/Resources/config/doctrine'
  8. Edit src/Entity/Product.php

    namespace App\Entity;
    use Ecolos\SyliusMakerPlugin\Entity\MakerTrait;
    use Sylius\Component\Core\Model\Product as BaseProduct;
    class Product extends BaseProduct { use MakerTrait; }

USAGE:

<a href="{{ path('ecolos_sylius_maker_plugin_list') }}">{{ 'ecolos_sylius_maker_plugin.makers'|trans }}</a>

... or simply visit /makers (for "en" locale - use /marken for "de" locale)

TOOLS:

- Command ecolos:slugify_makers
    Creates a slug from entity.name

TODO

- Add tests

sylius-maker-plugin's People

Contributors

matthiez avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.