HTML emails with info-page templates

Open to all! Ask other shopowners for help.
Post Reply
User avatar
alix32
Member
Posts: 14
Joined: Mon Oct 26, 2020 11:22 am
Phoenix Version: v1.0.7.6
Has thanked: 1 time
Been thanked: 1 time

HTML emails with info-page templates

Post by alix32 »

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!
Current Phoenix Version in prod: 1.0.7.6


Join The Code Co-op to get access to your library in the Code Co-op Forum
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

Post by heatherbell »

alix32 wrote: Thu Mar 18, 2021 10:36 am However, has anyone been able to accomplish this and would you be willing to share step by step instructions?
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'];
It would then send the text configured in that info page.
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.
User avatar
alix32
Member
Posts: 14
Joined: Mon Oct 26, 2020 11:22 am
Phoenix Version: v1.0.7.6
Has thanked: 1 time
Been thanked: 1 time

Re: HTML emails with info-page templates

Post by alix32 »

Thanks a lot @heatherbell . I'll give that a swirl
Current Phoenix Version in prod: 1.0.7.6


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply