3

This maybe should be a feature request.

I have complex "pay later" instructions, and I would like to display them in html format (which I can easily do) and provide an alternate version for folks who have chosen to receive plan-text email only.

Now I know I could just not use html tags and everything would look OK for both types of contacts. But if it is possible to "conditionally" include the html format message and the text-only message, that would be swell.

Any thoughts? Thanks!

1 Answer 1

1

You should be able to apply the strip_tags modifier to the {$pay_later_receipt} tag in your message template(s) in the text-only version. As that page says, you might also consider the replace and replace_regex modifiers to handle newlines, etc.

Alternatively - modify the template to insert the "Pay Later" instructions directly into the template exactly as you like.

3
  • I was unclear. Within the Configure Contribution Page, on the "Amounts" tab, there is only one "Pay Later" box. That box gets displayed on the screen during payment, AND included in the user's email, regardless of their email format setting. There is no "text only version" available. Now if there were a "Strip Tags if the browser can't handle them" modifier... The other option is valid, but if I modify the "Contribution Receipt - online" Workflow message template, it would apply to ALL contributions, not just those from this particular Contribution Page. Jan 17, 2020 at 20:48
  • @DavidHyman I'm confused. The "Pay Later" is used in three places - on the payment screen, in the HTML version of the receipt, and the text version of the receipt. You can modify the text version of the receipt independently, and the first two will use the HTML version. I guess I'm unclear why adding the strip_tags modifier only to the HTML version of the receipt wouldn't work. Also, for option 2: You can put conditional logic into your Smarty receipt to only display the customized "Pay Later" text if the contribution page ID matches your special page. Jan 18, 2020 at 15:58
  • Well, I guess I will have to edit the Workflow message template to allow me to customize its behavior for each type of Contribution. (I admit I find editing those templates challenging.) It just seems odd to me that there isn't a "Pay Later -- Text Version" field on the Configure Contribution / Amounts (when pay later is checked) form. Actually, it would great to have HTML and text version fields of the "Receipt Message" on the "Receipt" tab as well. "Thank you"s for donations are critical, and forcing them to be text-only is very limiting. Jan 21, 2020 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.