Logicify / mautic-advanced-templates-bundle

Plugin extends default email template capabilities with TWIG block so you can use advanced scripting techniques like conditions, loops etc
https://logicify.com/?utm_source=github&utm_campaign=mautic-templates&utm_medium=opensource
MIT License
90 stars 57 forks source link

Does this work with Mautic 3? #18

Closed connectedbusiness-gary closed 2 years ago

connectedbusiness-gary commented 4 years ago

running Mautic 3 and cannot get the plugin to show. Am i doing something wrong or does this not work with Mautic 3 yet...

jordan8037310 commented 4 years ago

Following...

stevedrobinson commented 4 years ago

Following...

incentfit commented 4 years ago

I can confirm that this plugin is completely broken on Mautic 3.1

connectedbusiness-gary commented 4 years ago

i can confirm that this one works in M3.1

https://mtcextendee.com/marketplace/twig-templates-for-mautic/

benfavre commented 4 years ago

in : plugins/MauticAdvancedTemplatesBundle/EventListener/EmailSubscriber.php

Change :


use Mautic\CampaignBundle\Entity\Lead;
// use Mautic\CoreBundle\EventListener\CommonSubscriber;
`

/**
 * Class EmailSubscriber.
 */
class EmailSubscriber implements EventSubscriberInterface
`

public function onEmailGenerate(Events\EmailSendEvent $event)

    {

        // $this->logger->info('onEmailGenerate MauticAdvancedTemplatesBundle\EmailSubscriber');

        $content = $event->getContent();

        $content = $this->templateProcessor->processTemplate($content,  $event->getLead());

        $event->setContent($content);

        if ( empty( trim($event->getPlainText()) ) ) {

            $event->setPlainText( (new PlainTextHelper($content))->getText() );

        }

    }
colethorsen commented 4 years ago

You want this pull request, hopefully it will be merged in soon, but in the meantime that branch works with 3.0 https://github.com/Logicify/mautic-advanced-templates-bundle/pull/15

stvhanna commented 4 years ago

@colethorsen Tested and confirmed your PR works with v3.

MarketSmart commented 2 years ago

Closing this issue in favor of skipping over to mautic 4