modmore / ClientConfig

ClientConfig is a MODX Revolution Extra to allow clients to maintain settings in a user friendly way.
https://docs.modmore.com/en/Open_Source/ClientConfig/index.html
MIT License
28 stars 27 forks source link

ClientConfig settings are not displayed in miniShop2 emails #173

Closed Ruslan-Aleev closed 4 years ago

Ruslan-Aleev commented 4 years ago

Summary

In emails from miniShop2 - about the order, their status, etc. often you need to display store contact information that can be created through ClientConfig.

And these settings are not displayed in inherited email templates (not the main one) - https://docs.modx.pro/en/components/minishop2/snippets/msgetorder#Writing-letters

This can be solved by adding an System Event - pdoToolsOnFenomInit for the ClientConfig plugin. And add code case 'pdoToolsOnFenomInit': after the line https://github.com/modmore/ClientConfig/blob/master/core/components/clientconfig/elements/plugins/clientconfig.plugin.php#L37

This is not a bug, and all MODX components and their settings cannot be taken into account, but for miniShop2 it will be useful, as it seems to me.

Environment

ClientConfig 2.2.0-pl, MODX 2.7.2

Mark-H commented 4 years ago

I'd be happy to accept a PR that adds this from someone that uses minishop/fenom and has tested it to work as expected.