- Issue created by @lexsoft
- last update
about 1 year ago 54 pass - @lexsoft opened merge request.
- last update
about 1 year ago 54 pass - Status changed to Needs review
about 1 year ago 10:21am 11 September 2023 I want to send a invoice attached to a mail.
I use commerce module, commerce invoice, eca and easy mail.
1. On checkout event eca have to print the invoice and save it to private folder
2. Eca attachs the pdf file and send the mail.Tests :
1. Eca event : view content any. Action : print entity node. Node is printed and downloaded in the browser but not saved in private folder
2. Eca event : view content invoice. Action : print entity commerce_invoice. Nothing is printed and new page give a error id() null.Thanks for help
- π¬π§United Kingdom lexsoft London
@alexandrepoinas this ECA action only saves it as a file and should be visibile if you visit /admin/content/files but also the file it's available as a token you set in the ECA action. You could then use the file object token in other ECA actions and maybe attach this to an email if an ECA action is build for that.
Tried this solution but obtained : "Le site Web a rencontrΓ© une erreur inattendue." unexpected error.
It works fine when I try with a node.- π©πͺGermany jurgenhaas Gottmadingen
@lexsoft I've looked into your MR and that looks really good. Unfortunately, this way it introduces a dependency on the ECA module, which is probably not what the maintainers of entity_print want.
May I suggest that we create a separate module
eca_entity_print
which integrates ECA with entity_print and only comes with those action plugins? We could then move them over and publish the code there idependently. - π¬π§United Kingdom lexsoft London
Hi @jurgenhaas, sounds good.
I can create one, can I add you as a maintainer as well? - π©πͺGermany jurgenhaas Gottmadingen
@lexsoft yes please, I'd be happy to contribute the next couple of days as I have a project where I need that action plugin.
Please name the project "ECA Entity Print" with the machine name
eca_entity_print
so that it is consistent with the other integration modules. - π¬π§United Kingdom lexsoft London
@jurgenhaas I've created a new module https://www.drupal.org/project/eca_entity_print β and added you as a maintainer. I've pushed the first initial code that includes the actions. Feel free to make any changes needed for a stable release and let me know how I can help.
- Status changed to Fixed
7 months ago 12:32pm 11 April 2024 - π©πͺGermany jurgenhaas Gottmadingen
@lexsoft That's great, thank you so much. I've created the 2.0.x branch there to build and optimize against the 2.0 release of ECA. Once that's completed, we can backport to 1.0.x from there.
Also, I've subclassed the views action plugin from the entity action plugin, which removes a lot of redundant code.
And last but not least, I've removed the file name sanitisation since Drupal core has that now built in and the file name for file entities will be sanitized automatically.
For further tasks, let's open issues in the other project.
Automatically closed - issue fixed for 2 weeks with no activity.