Announcement

Collapse
No announcement yet.

Template Based Emails -- Custom Trigger event

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Template Based Emails -- Custom Trigger event

    How can I trigger Template Based Emails manually?

    My client wants to send an additional email that's similar to the Order Confirmation: Customer email BUT only under certain conditions.

    I created a copy of the template as ORDERCONF_EXTRA, made the changes and added it to Template Based Emails.

    On the INVC page Template I want to do something like this

    <mvt:if expr="condition EQ 'true'">
    API Call to Send email ORDERCONF_EXTRA
    </mvt:if>

    Has anyone else tried this?
    Ray Yates
    "If I have seen further, it is by standing on the shoulders of giants."
    --- Sir Isaac Newton

    #2
    Re: Template Based Emails -- Custom Trigger event

    You don't need an api call if you are triggering from a Merchant event. You can use that same conditional in the actual templated email.

    <mvt:if expr="g.someGlobalWithinINVC">

    content of email

    </mvt:if>

    then set the email to fire on customer order. If the g.someGlobalWithinINVC is not present, the email will not be sent as merchant wont send an empty email.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: Template Based Emails -- Custom Trigger event

      PERFECT! I can stop digging around in the API now :)

      Thanks Bruce
      Ray Yates
      "If I have seen further, it is by standing on the shoulders of giants."
      --- Sir Isaac Newton

      Comment


        #4
        Re: Template Based Emails -- Custom Trigger event

        No prob...at least when *I* ask that question a month from now I'll have a reference to look up :)
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          I know this is pretty old, but for many years this worked for me, and recently I noticed that merchant started sending emails even if blank. Can either of you confirm that you've seen the same thing?
          Looking for work as of March 2024! I've been a web developer for going on 20 years, with most of that time spent on Miva sites.

          Comment


            #6
            I haven't heard from any clients who have this type of setup (and there are probably at least a dozen).

            Can you force test this? Is the email really "empty". Not sure, but I imagine that even if there was an empty space character, the mail will fire. So, maybe first test to see if it is really empty. As a matter of course, whenever I test a variable, I also wrap it in []. Been bitten by leading and trailing spaces too many times :)
            Bruce Golub
            Phosphor Media - "Your Success is our Business"

            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
            phosphormedia.com

            Comment

            Working...
            X