Search

Solved. Made such a template, and it worked fine:

    <xsl:template match="/">
    <xsl:value-of select="/data/responses/entry/name" /> Says:
    <xsl:apply-templates select="/data/responses/entry/body" />

    Answer to email:<xsl:value-of select="/data/responses/entry/email"/>
  </xsl:template>

  <xsl:template match="/data/responses/entry/body">
   <xsl:value-of select="." />
  </xsl:template>
  </xsl:stylesheet>

I can't get the $etm-entry-id to work when editing entries. Basically what I'm doing is a user login and confirming they accept the terms and agreement. I create the user upon login, but only want to send the email once the user accepts the terms.

I also cannot send HTML emails. I can said plaintext emails just fine. Whenever I select "HTML and Plain" or "HTML only" I get this error:

<filter total="1" sent="0" name="etm-new-report" status="failed" />

I cannot even save HTML templates in Symphony (I get a red border around the textarea, but no error messages). I need to edit the template in a texteditor.

That looks bad. I'm currently doing exams, so I haven't got the time to fix the issues right away, but I'll look at it after the 5th of july.

I'm using the 2.3.x branch of the extension but am having trouble getting the emails to send 'from' the person filling in the front-end form.

Using the 'Reply-To Name' and 'Reply-To Email Address' fields doesn't seem to do anything, they're just being ignored. The emails always arrive from the SMTP account that's sending them, irrelevant of what goes into those fields. It's not even using the details provided in the SMTP settings, as the email address I've input there is a 'noreply@' type address different to the actual SMTP account used.

I do have the values set in the front-end form via the 'send-email[reply-to-email]' type fields, but they're set to the same values, and I'm assuming aren't used anyway.

Any thoughts?

Hi! I try to install this extension on symphony v 2.3.3. Doesn't this extension work on 2.3.3?

Thanks

Ops, I solved! :)

To be clear to anyone reading, you need to install the 2.3.x branch. The regular branch doesn't work.

I just released version 5.0, which is "officially" compatible with Symphony 2.3.x. You may use the master branch now.

@michael-e - Awesome!

woohoo! can we preview now??

can we preview now??

Sure, that should work.

Is it possible to trigger an ETM email from a chained event?

I.E I only want to send an email if the resulting primary event has a post value of invoice. I can't seem to trigger the etm-invoice filter unless it is present in the primary event.

Ideally I want to attach a secondary event and only trigger the email once the first event has fired. Has anyone done this?

In fact I have 3 chained events.. Primary event is a Registration event, secondary event is an allow multiple which attaches Delegates to the primary event via ID.

The third event is a conditional event where I'm listening for Card or Invoice payment post value. I have the redirects working based on the Post Value, but the 'etm-invoice' filter isn't firing in the third event.

Can anyone think of a reason why the chained event can't trigger the response?

The ETM's event filter subscribes to the EventFinalSaveFilter delegate, which — as far as I know — is only triggered by Symphony upon successful save ($entry->commit()) of a standard event. If you have a custom event, maybe those delegates don't work at all. (You might try and include them, however.)

Thanks Michael,

From my short experiment, Including the 'etm-invoice' filter in the chained events doesn't seem to trigger the email, but if I add it back into the primary/1st event, The email does trigger.

I guess if my 3rd event isn't actually saving any new data to the system, maybe the EventFinalSaveFilter isn't firing in that event anyways.. but it is when attached to the main 'registration' event as this one contains post data to send into the system.

When you say include the delegates: do you mean customise the inclusion of the EventFinalSaveFilter in my chained events?

I admit that my post was rather vague, simply because you don't say what your 3rd event is like (Is it custom code? Does it save anything? Does it include Symphony's TOOLKIT . '/class.event.php'?)

Symphony's "native" events (the ones which are created in the backend to save data to a section) will inlcude the above file. This file in turn inlcudes TOOLKIT . '/events/class.event.section.php'. There the execute function calls the __doitfunction. Look at the latter, and you will see when those delegates are triggered. The interesting function is the processFinalSaveFilters function.

My idea was: If your event is just custom code (not including/requiring all of the above), you might try and copy some code from processFinalSaveFilters to your custom event in order to "simulate" calling the delegate. I never did that, so don't ask me how this could work in detail. :-)

Your second chance — and maybe that is simpler and more straightforward — would be to not use the ETM's event filter (which is made to send emails after you have saved something, hence the delegate it hooks into) but to call the ETM's API directly in your event to process the email.

Still I hope that your 3rd event is actually saving something. I don't really understand why you want to send emails in an event that is only redirecting the user. Which information would you like to email then? The redirect target? :-)

Thanks for the explanation Michael.

Here's my setup:

Event #1:

Primary event with key information about a registration entry. Including amount of delegates and total amount of money calculated by number of delegates. I've set the priority to high on this one, so it fires first.

Event #2:

This is an allow multiple event where the information regarding each Delegate is sent into it's own section with an SBL taken from the result attribute of the primary event.

Event #3 (Chained from Event #2)/(POST action submit instructions fired from Event #2):

There are supposed to be 2 events triggered at this stage... based on the outcome of a POST Value in the first event. i.,e. 'Invoice' or 'Card'.

I guess I still need the information from Event #1 in order to trigger the email, but don't want that email to be sent unless the post value of the primary event was set to 'Invoice'.

So removing the filter may be the best approach in order to stop the event firing... And I guess thinking about it, there isn't a third Event, just a third instruction.

Also is it:

'Event::KHIGH' or 'self::KHIGH' for event priority?

Hi Michael,

I think I've found a way around it..

If I update the First event, with the 2nd 3rd triggers.. ETM fires from the chained events.. even if I'm just updating the invoice status of the entry.. I have managed to trigger the email after all other events have fired.

Fingers crossed this is a short term fix for me.

I am working on A GoCardless payment integration. In order to capitalise on their ready made PHP library, I am doing a lot of payment call-back processing in raw PHP and simply including their PHP library in an extension.

I'd like their call-backs to trigger ETM emails. Since the relevant code is running independently of Symphony however I don't know how to do this.

Can anyone suggest how I could trigger such an email from a PHP file in an extension folder? I guess I need to include a Symphony core file and then call ETM using a magic syntax…?

Are the callbacks updating section data? Im guessing the callbacks arent triggering symphony events either right?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details