Email Template Question

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #17421
    manny
    Participant

      Is there a way to set up an email template that either has the Subject line or actual email message be JUST the email address from the order form after a user placing an order? I’m trying to connect mailchimp with emails from orders using Zapier, and I need either the Subject or Message of the email to be JUST the email address, with nothing else, in order for Zapier to process the email correctly.

      #17427
      Olly
      Admin & Mod

        there are 3 filters that work in conjunction (for details look at those inc/wppizza.send-emails.inc.php)

        wppizza_filter_email_subject_prefix
        wppizza_filter_email_subject
        wppizza_filter_email_subject_suffix

        you will probably want to filter by template id ($tpl_id)

        this will be much more streamlined and less convoluted (like everything really) in v3.x when it comes out. for the moment, it is what it is

        #17480
        manny
        Participant

          Thanks for the info Olly.

          I’m actually not sure how I’d go about using these filters in order to produce an email subject line that contains JUST the email address of the user. Any ideas as to how I’d go about using those filters to do that?

          #17481
          Olly
          Admin & Mod

            add the email address to the subject line (in wppizza->ordrer form ) which adds the email to the “prefix”, and then just empty/unset the other two

            #17515
            manny
            Participant

              Hey Olly, thanks for the info.

              I’m actually not sure how to go about emptying/unsetting the other 2 filters. In case I wasn’t clear, what I’m trying to do is build a new email that gets sent when a user places an order, so that the subject line contains JUST their email address, so Zapier can pull that email address and add it to Mailchimp.

              So far I have the new email template created, but I’m trying to get the subject line OR the message for that email to be JUST the email address of the user. I’m getting the email to show up in the message of the email, but it contains additional code/text around, which isn’t gonna work.

              How would I go about using these filters to accomplish that, where either the email message or subject line is JUSt the user’s email address?

              #17517
              Olly
              Admin & Mod
                This reply has been marked as private.
                #17518
                manny
                Participant

                  I guess my question is, how would I go about using those filters you mentioned in order to have that email I created to send out JUST the user’s email address either in the subject or the message of the email? I’m not sure what the logic is behind those filters and what I actually need to do.

                  #17519
                  Olly
                  Admin & Mod

                    you use filters to change what they return.
                    the subject line is made out of 3 parts (as mentioned) filterable by those 3 filters

                    #17520
                    manny
                    Participant

                      Okay, so now that I have the email address from the user added to the email subject line from the Order Form, which gets placed in wppizza_filter_email_subject_prefix, I will need to create a function that filters by template id, to get the email template I created for this, then I unset the other 2 filters within the function?

                      #17521
                      Olly
                      Admin & Mod

                        i think you need to learn how wordpress filters work.
                        you do not unset filters. you use filters (and their related functions) to change things as required based on the arguments passed

                        #17522
                        manny
                        Participant

                          I’m just going by what you told me Olly, when you said to “just empty/unset the other two” in reply 17481. Again, what I’m trying to do is:

                          Build a new email that gets sent when a user places an order, so that the subject line contains JUST their email address, so Zapier can pull that email address and add it to Mailchimp.

                          I’ve checked on the option to add the email to the subject line in the Order From settings page, and you said that that would “add the email to the prefix”, and that I should then “just empty/unset the other two”.

                          Can you clarify what this means? I’ve worked with filters and such before, just never with WP Pizza, and I’m not finding any documentation that helps me do what I’m trying to do, which is why I’m asking for your support.

                          #17523
                          Olly
                          Admin & Mod

                            > I’ve worked with filters and such before, just never with WP Pizza,
                            this has nothing to do with wppizza . filters work the same everywhere. wppizza or not.

                            >and I’m not finding any documentation that helps me do what I’m trying to do

                            I gave you all you need.
                            the subject line is made up of three parts. all of which are filterable . (and the parameters passed to the filter in the file i mentioned near the beginning of this topic should be self-explanatory)

                            i must admit, I do not know what more info it is you are looking for really.

                            #17524
                            manny
                            Participant

                              > the subject line is made up of three parts. all of which are filterable . (and the parameters passed to the filter in the file i mentioned near the beginning of this topic should be self-explanatory)

                              I’m not seeing a wppizza.send-emails.inc.php file in the inc directory, though I do see it in the classes directory (wppizza/classes/wppizza.send-emails.inc.php). Is that the same one you’re talking about?

                              #17525
                              Olly
                              Admin & Mod

                                >Is that the same one you’re talking about?

                                yes.

                              Viewing 14 posts - 1 through 14 (of 14 total)
                              • The topic ‘Email Template Question’ is closed to new replies.