Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
fidlimidly

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

Question

Posted (edited)

Hi

I need send with email confirmation 2 files(1*pdf+1*docx)

I found some solution for Prestashop 1.5 / 1.6 but doesnt works with TB 1.08

Please help me with this problem

Edited by fidlimidly

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
  • 0

maybe its better for you to buy a module who can do this. There are several options on the market and if they work for presta 1.6 they will also work for thirtybees

Share this post


Link to post
Share on other sites
  • 0
36 minutes ago, fidlimidly said:

but this not first thing what is different from Prestashop.....

There is nothing different here from prestashop 16. You will need to do the same changes on both platforms.

Share this post


Link to post
Share on other sites
  • 0

thx it works like in Prestashop.

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

 

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites
  • 0

Ok so it is bad way....is there anyone who has the experience and time to create such a module? Please write me to PM

Share this post


Link to post
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?

Share this post


Link to post
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...