Jump to content
thirty bees forum
  • 0

{SOLVED }Help attach a pdf +docx file to the order confirmation email


fidlimidly

Question

13 answers to this question

Recommended Posts

  • 0

I think the easiest way will be to hook into actionEmailSendBefore and add your attachments.

In case your 2 files are the same for all customers than why don't you just put the files on your server and add a link to them in the email body.

Link to comment
Share on other sites

  • 0

Ok ...I  am not ‎Steven Jobs 😕 can You tell me how I ca do it?

Anyway these 2 files are for all customers totally same so please can You tell me more about solution nr. 2 ? But i need send them as files not only links in email...
Thank You

Edited by fidlimidly
Link to comment
Share on other sites

  • 0

@yaniv14 answered you already. I can elaborate more: 

1) create new module

2) this module should register hook actionEmailSendBefore

3) in this hook, you can add your files to 'fileAttachments' output parameter. That requires loading the file content from disk and passing it in a structure like this:

[

	'content' => ...file content...
	'name' => 'filename.pdf',
	'mime' => 'file mime type'
]

If you don't know how to do any of these steps, then you will have to study. There are plenty of resources for prestashop module development out othere. If you don't have time, then hire somebody to do this for you.

Link to comment
Share on other sites

  • 0

Thx for help @datakick and @yaniv14... but my skills are not in this level 😞

but this not first thing what is different from Prestashop..... I will migration back to Presta .. there is bigger support and more topics about any problems than here...

For sellers with small IT skills is better Presta...this is true

Link to comment
Share on other sites

  • 0
9 minutes ago, fidlimidly said:

thx it works like in Prestashop.

You are right @datakick, I just add some code to classes/Mail.php

 

Please don't, that's not how you should customize thirtybees (or prestashop). Changing core files is the worst you can do, it will lock you to the current version, with very limited options to upgrade. 

The best way to do this is to implement your own module. If that's too hard for you, at least do this using override. 

You should never change core files. In other words, 

Advanced Parameters > Configuration Information > LIST OF CHANGED FILES

should be empty. If it's not, you will hate yourself soon enough.

 

Link to comment
Share on other sites

  • 0
On 5/23/2019 at 3:10 PM, fidlimidly said:

Ok ...I  am not ‎Steven Jobs 😕 can You tell me how I ca do it?

Anyway these 2 files are for all customers totally same so please can You tell me more about solution nr. 2 ? But i need send them as files not only links in email...
Thank You

Do you need to send these files in every single email you ever send.  I you need to send the at least once to every customer? then is every customer who gets and invoice?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...