{"id":15145481,"url":"https://github.com/prestashop/mjml-theme-converter","last_synced_at":"2025-07-26T20:15:19.784Z","repository":{"id":37818917,"uuid":"176786917","full_name":"PrestaShop/mjml-theme-converter","owner":"PrestaShop","description":"Tool used to convert a PrestaShop mail theme from MJML to twig","archived":false,"fork":false,"pushed_at":"2024-09-09T20:45:08.000Z","size":335,"stargazers_count":9,"open_issues_count":5,"forks_count":15,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-10-07T10:58:14.516Z","etag":null,"topics":["mail-theme","tool"],"latest_commit_sha":null,"homepage":"","language":"Twig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrestaShop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-20T17:44:41.000Z","updated_at":"2024-06-17T14:39:13.000Z","dependencies_parsed_at":"2024-04-18T14:03:57.354Z","dependency_job_id":null,"html_url":"https://github.com/PrestaShop/mjml-theme-converter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fmjml-theme-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fmjml-theme-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fmjml-theme-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fmjml-theme-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrestaShop","download_url":"https://codeload.github.com/PrestaShop/mjml-theme-converter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869264,"owners_count":16555575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mail-theme","tool"],"created_at":"2024-09-26T11:25:44.523Z","updated_at":"2024-10-07T10:58:28.008Z","avatar_url":"https://github.com/PrestaShop.png","language":"Twig","funding_links":[],"categories":[],"sub_categories":[],"readme":"mjml-theme-converter\n====================\n\n\nThis application is used to convert MJML mail themes for PrestaShop into Twig\nmail themes.\n\nTo convert a theme use this command:\n\n```\n./bin/console prestashop:mail:convert-mjml modern_mjml {twig_theme_path}\n```\n\nOn Windows use\n\n```\nphp bin/console prestashop:mail:convert-mjml modern_mjml {twig_theme_path}\n```\n\n`twig_theme_path` is the output folder (it must exist before running the command). It is an absolute path or a path\nrelative to the project root.\n\nThe `modern_mjml` theme is located in this project in the `mails/themes` folder.\n\nCreate your own email template\n------------------------------\n\n- fork `PrestaShop/mjml-theme-converter` and install it with `git clone`\n- Run `composer install`\n- Install [`mjml`](https://github.com/mjmlio/mjml). Either install it globally or install it with `npm install`.\n- Copy `app/config/parameters.yml.dist` to `app/config/parameters.yml`. Set the parameter `mjml_use_npm` accordingly to the way mjml is installed\n- The base theme, written in MJML (MailJet Markup Language) is in the folder `/mails/themes/modern_mjml`. Adjust it to your needs.\n- Run above command (e.g. `php bin/console prestashop:mail:convert-mjml modern_mjml ../prestashop/mails/themes/modern` if the two projects `PrestaShop/mjml-theme-converter` and `PrestaShop/Prestashop` are located in the same folder) to convert your mjml templates to twig templates. This will create all the twig files (and overwrite the existing).\n- In Prestashop Backoffice, menu `Design - Email Theme`, select your theme and click on `Generate emails` for all your installed languages.\n\n\nNote about the structure of the layout templates\n------------------------------------------------\n\nIn `layout.mjml.twig` (and similar in `order_layout.mjml.twig`) we have:\n\n    \u003cmj-wrapper\u003e\n      {% block header %}\n      {% include '@MjmlMailThemes/modern_mjml/components/header.mjml.twig' %}\n      {% endblock %}\n\n      {% block content %}\n      {% endblock %}\n\n      {% block footer_content %}\n      {% endblock %}\n    \u003c/mj-wrapper\u003e\n    {% block footer %}\n      {% include '@MjmlMailThemes/modern_mjml/components/footer.mjml.twig' %}\n    {% endblock %}\n\nAll blocks are wrapped by `\u003cmj-wrapper\u003e`, but the `footer`. If you want to change the wrapping,\nin `src/AppBundle/Converter/TwigTemplateConverter.php`, you have to adapt the code such that `true` or `false` is passed\nas parameter `$isWrapped` to reflect your changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestashop%2Fmjml-theme-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprestashop%2Fmjml-theme-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestashop%2Fmjml-theme-converter/lists"}