Jump to content

Issue information

  • #003990

  • Closed


Issue Confirmations

  • Yes (0)No (0)
Photo

V4: addon mail directory installation?

Posted by tbirnseth on 10 May 2013 - 08:47 PM

In reviewing the code, it does not appear that the fn_install_addon_templates() function installs an addon's mail templates into the design/frontend/mail/addons/ directory.

I must be missing something becasue I can see where other addons have their templates installed. Shouldn't the code indluce something like:
 if (is_dir($repo_dir . 'mail/addons/' . $addon_name)) {
	   fn_copy($repo_dir . 'mail/addons/' . $addon_name, $design_dir . $skin_name . '/mail/addons/' . $addon_name);
}

If I look at the skins respository for the gift_certficates addon I don't see any 'mail' directory even though it does have mail components.

I would expect there to be a
var/skins_repository/basic/mail/addons
directory structure to support addons that have mail components.

Don't like that you have all the addon files scattered all over the place. They should all be within a single addon tree.

Please advise.

changed status to: Closed

Thank you for the report.

The 'fn_install_addon_templates' function installs only files for skins. Mail templates do not have skins, so there is no need in additional installation. All mail templates are stored in the

design/backend/mail
design/frontent/mail

directories.


Add-on templates are stored in the respective directories to simplify support and templates usage within add-ons, with skins and areas taken into account.


Thank you.


So now you scatter addon file across even more of the space.... I.e. there's no way to have a store dependent mail template and there is not repository reference? Why have a skins_repository at all if you're going to make us just install things into their final destination (whether the addon is "installed" or not.

You've really messed up the addon architecture with V4. You could have taken the opportunity to make it better. The mail directory should be under a 'stores' structure so that you can have independent mail templates for each store.

What a mess (from an addon developers standpoint).