Giter Club home page Giter Club logo

sylius-multi-newsletter's Introduction

sylius-multi-newsletter

  1. To install this package with composer, copy the following section to your project's composer.json
    "repositories": [
        {
            "type": "vcs",
            "url":  "[email protected]:vladfilimon/sylius-multi-newsletter.git"
        }
    ]

Then do composer require vladfilimon/sylius-multi-newsletter register the bundle in config/bundles.php

[
    ...
    VladFilimon\MultiNewsletterPlugin\VladFilimonMultiNewsletterPluginBundle::class => ['all' => true],
];
  1. Import the routes

    # config/routes.yaml
    sylius_resource:
        resources:
            app.multinewsletter:
                driver: doctrine/orm # You can use also different driver here
                classes:
                    model: VladFilimon\MultiNewsletterPlugin\Entity\Newsletter
  2. Import configuration

    # config/packages/_sylius.yaml
    
    imports:
        # ...
        - { resource: "@VladFilimonMultiNewsletterPluginBundle/Resources/config/config.yml" }
  3. Override Sylius' templates

    cp -R vendor/vladfilimon/sylius-multi-newsletter/src/Resources/views/bundles/* templates/bundles/
  4. Apply migrations

    bin/console doctrine:migrations:migrate -n
    

##Sending newsletters Because we rely on Sylius mail sender in order to send the newsletters, each new newsletter needs a twig template, and registration for the sylius_mailer. This bunlde comes with a newsletter template for being subscribed, if you need other templates, register them in sylius_mailer.yaml like this:

sylius_mailer:
    emails:
      NEWSLETTER_TEMPLATE_KEY:
      template: "path_to_my_template.html.twig"

To send a newsletter you need to run

bin/console newsletter:send NEWSLETTER_ID NEWSLETTER_TEMPLATE_KEY

This provides just minimal functionality. No batch processing, AMQP, no retrying mechanism, semaphores etc.

To run the example sending of newsletter, create a newsletter in the admin, assign some shop users to it (on the admin newsletter edit page) get it's id and run

bin/console newsletter:send NEWSLETTER_ID newsletter_template

Screenshots

There screenshots are outdated and lack translations alt text alt text alt text alt text alt text alt text alt text alt text

sylius-multi-newsletter's People

Contributors

vladfilimon avatar

Watchers

 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.