Announcement

Collapse
No announcement yet.

Changing Default Order Confirmation Email Based on Payment Method

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

  • Changing Default Order Confirmation Email Based on Payment Method

    Trying to find if there is an easy way to trigger different emails based on the payment method at checkout. For example, if we make a quote using "Shop As Customer", I have a template that has "Quote" everywhere instead of Invoice, and shows Unpaid for payment, etc. When we complete checkout, the default "Order Confirmation" is triggered. How can I change or run logic so that if payment = COD, or whatever method I chose, it will send a different template based email?

    Thanks!

    Marc

  • In the unique payment method email template:

    Code:
    <mvt:if expr="g.paymentmethod EQ 'whatever-paymentmethodused'">
    
    body of email
    
    </mvt:if>
    and in your normal email template

    Code:
    <mvt:if expr="g.paymentmethod NE 'whatever-paymentmethodused'">
    
    body of email
    
    </mvt:if>
    This works because if the email system doesn't see any 'content' (because its blocked by the conditionals) it doesn't send the email regardless of whether its called or not.
    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


    • Thanks a bunch Bruce. Still learning the MVT language. When we call g.paymentmethod, what are the acceptable variable answers (is it numerical or the payment method name?)

      Comment


      • Depends on the payment method/module used. You need to go to the OSEL screen from the front side of your site (where you select shipping and payment) and use either an 'inspector' tool (right click to see what's available) or view source to locate the payment type selector. (See image). Whatever is in the VALUE parameter is what you need to use.

        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


        • Awesome - that worked in dev, but when I moved it over to live, it will auto send the email if I checkout using COD as customer, but when I try to resend the email from admin, or try to create order from the Admin side, it will not send the quote email. Is there an additional clause I can add so these will function as expected?

          Comment


          • If you need the payment method from the admin, you'll need to do three things:
            1) Create a custom Order field called "PaymentMethod"
            2) On INVC screen, add
            <mvt:item name="customfields" param="Write_Order( l.settings:order:id, 'PaymentMethod', g.paymentmethod )" />
            3) In the email, before the test for paymentmethod, add:
            <mvt:item name="customfields" param="Read_Order( l.settings:order:id, 'PaymentMethod', g.paymentmethod )" />
            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

            This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

            This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

            Accept