Open ojs87 opened 5 months ago
Hey @ojs87,
thanks a lot for contributing to the project!
Regards, Serhii
Hey @ojs87 !
I've given this a test locally and this does appear to resolve the issue when sending via the Workflow-Send Email action.
However, I see that the issue is still present when sending an Email via the regular Email->Compose action.
For example Using the same Email Template and Quote selections on Email->Compose
Before Extending Quotes:
After Extending Quotes:
If possible, could you investigate and resolve this aspect too? (If you feel this would need a longer investigation/fix, I would be happy to raise this as a separate Github issue so we can close and merge this fix. Please let me know if so)
Thanks!
Hey @ojs87 !
I've given this a test locally and this does appear to resolve the issue when sending via the Workflow-Send Email action.
However, I see that the issue is still present when sending an Email via the regular Email->Compose action.
For example Using the same Email Template and Quote selections on Email->Compose
Before Extending Quotes:
After Extending Quotes:
If possible, could you investigate and resolve this aspect too? (If you feel this would need a longer investigation/fix, I would be happy to raise this as a separate Github issue so we can close and merge this fix. Please let me know if so)
Thanks!
Hi @johnM2401,
Thanks for testing that, I think this needs to be put on hold for now. This won't work for a Cases email template since the beanList value for cases is aCase and the table_name is case, so a little bit more thought is needed here.
Template parsing may need looked at so that the Compose view uses the same parser as the Workflow send Email action.
This is not ready to merge as it stands!
Thanks, Owen
Description
Modules that are extended in the custom folder, e.g. AOS_Quotes.php, are not correctly replacing variables based on the variables available in the Email Templates module. This is due to an extended module using a different beanList name(e.g. customAOS_Quotes) and the template parser using that beanList name as the key for the variables.
Motivation and Context
Extended modules should use the same basic variables in the Email Template editor to parse Email Templates
How To Test This
class CustomAOS_Quotes extends AOS_Quotes_sugar { public function save($check_notify = false) {
}
<?php $objectList['AOS_Quotes'] = 'AOS_Quotes'; $beanList['AOS_Quotes'] = 'CustomAOS_Quotes'; $beanFiles['CustomAOS_Quotes'] = 'custom/modules/AOS_Quotes/CustomAOS_Quotes.php';