Hi - I know it's possible to leverage the info-pages and hooks to build and trigger nicely designed html emails for each event (account creation, forgot password, order confirmation and other statuses, etc...). However, has anyone been able to accomplish this and would you be willing to share step by step instructions?
Thanks!
HTML emails with info-page templates
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: HTML emails with info-page templates
We have not done it and probably there are other ways of doing it but using /includes/modules/notifications/templates/tpl_n_checkout.php as an example of a file that contains what is sent and /templates/yourtemplate/includes/pages/conditions.php as an example of a file that outputs an info page, if you added (from conditions.php) the code that outputs the infopage, into tpl_n_checkout.php i.e.
Code: Select all
$page = info_pages::get_page(['p.slug' => 'conditions',
'pd.languages_id' => (int)$_SESSION['languages_id']]);
echo $page['pages_text'];Have a play with that.
You can imagine that bit of code could be used in a module anywhere to show content from an info page.