Adapt email templates

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
pheeb
Posts: 10
Joined: 19 May 2017, 16:21

Adapt email templates

Post by pheeb » 23 May 2017, 08:05

Hi

First of all thank you for the magnificent shop! :)

I am using Typo3 7.6.10, Aimeos 17.3.0 and PHP 5.6.30.

The structure:
typo3conf/ext/aimeos
typo3conf/ext/myext/Resources/Private/Extensions/aimeos (created aimeos extension with the online tool )

The html email layout in outlook 2010 is not so pretty (no border, background colors etc.). Now i would like to add a doctype in the html email templates for better compatibility :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I can overwrite basket, catalog and checkout templates without problems but to adapt email templates are not possible.
typo3conf/ext/myext/Resources/Private/Extensions/aimeos/client/html/templates/email/delivery/html-body-default.php

I have add the following lines to the "ext/myext/Resources/Private/Extensions/aimeos/manifest.php"

Code: Select all

      'controller/jobs/templates' => array(
         'controller/jobs/templates',
         'client/html/templates',
      ),
But still have no effect.

So where are my mistakes to adapt html email templates? :)

Regards Patrik

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Adapt email templates

Post by aimeos » 24 May 2017, 00:16

pheeb wrote:First of all thank you for the magnificent shop! :)
It's great that you like it! :-)
pheeb wrote:I am using Typo3 7.6.10, Aimeos 17.3.0 and PHP 5.6.30.
At first, you should update to 17.4.1 as all versions before are not supported any more and 17.3.0 has problems sending e-mails.
pheeb wrote:typo3conf/ext/myext/Resources/Private/Extensions/aimeos (created aimeos extension with the online tool )
You probably renamed the created TYPO3 extension from "aimeos" to "myext". While this should be no problem, I would recommend to use the project name as extension name.
pheeb wrote:The html email layout in outlook 2010 is not so pretty (no border, background colors etc.). Now i would like to add a doctype in the html email templates for better compatibility :
If you can optimize the e-mails for Outlook and other email clients, we would be very grateful if you could push your changes into the Aimeos GitHub repository as well :-)
pheeb wrote:I can overwrite basket, catalog and checkout templates without problems but to adapt email templates are not possible.
typo3conf/ext/myext/Resources/Private/Extensions/aimeos/client/html/templates/email/delivery/html-body-default.php

I have add the following lines to the "ext/myext/Resources/Private/Extensions/aimeos/manifest.php"

Code: Select all

      'controller/jobs/templates' => array(
         'controller/jobs/templates',
         'client/html/templates',
      ),
That's all you need and we've updated the extension builder on the aimeos.org web site to include the line by default now. I've tested that and it works pretty well for the e-mail templates too. How does the rest of your manifest.php look like?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

pheeb
Posts: 10
Joined: 19 May 2017, 16:21

Re: Adapt email templates

Post by pheeb » 30 May 2017, 06:57

Thanks! I have updated to 17.4.1 and it works!

Now i can test and optimize the html email layout in the usual e-mail clients.
I will develop an aimeos distribution with foundation 6, maybe it make sense to use the framework "foundation for mail" for the templates. I will look for the "best practice" integration :)

here the rest of my manifest.php

Code: Select all

<?php

return array(
	'name' => 'fo_distribution_name',
	'depends' => array(
		'aimeos-core',
		'ai-admin-extadm',
		'ai-admin-jqadm',
		'ai-admin-jsonadm',
		'ai-client-html',
		'ai-client-jsonapi',
		'ai-controller-jobs',
	),
	'include' => array(
		'lib/custom/src',
		'client/html/src',
		'client/jsonapi/src',
		'controller/common/src',
		'controller/frontend/src',
		'controller/extjs/src',
		'controller/jobs/src',
		'admin/jsonadm/src',
		'admin/jqadm/src',
	),
	'i18n' => array(
		'admin' => 'admin/i18n',
		'admin/jsonadm' => 'admin/jsonadm/i18n',
		'controller/common' => 'controller/common/i18n',
		'controller/frontend' => 'controller/frontend/i18n',
		'controller/extjs' => 'controller/extjs/i18n',
		'controller/jobs' => 'controller/jobs/i18n',
		'mshop' => 'lib/custom/i18n',
		'client' => 'client/i18n',
	),
	'config' => array(
		'lib/custom/config',
	),
	'custom' => array(
		'admin/jsonadm/templates' => array(
			'admin/jsonadm/templates',
		),
		'admin/jqadm/templates' => array(
			'admin/jqadm/templates',
		),
		'admin/extjs' => array(
			'admin/extjs/manifest.jsb2',
		),
		'client/html/templates' => array(
			'client/html/templates',
		),
		'client/jsonapi/templates' => array(
			'client/jsonapi/templates',
		),
		'controller/extjs' => array(
			'controller/extjs/src',
		),
		'controller/jobs' => array(
			'controller/jobs/src',
		),
		'controller/jobs/templates' => array(
			'controller/jobs/templates',
			'client/html/templates',
		),
	),
	'setup' => array(
		'lib/custom/setup',
	),
);


Post Reply