[Skip to main content](#vessel-content)

#   Re: Automatic attaching invoices

##

- **[0329482](/forum/user/8784-0329482 "View 0329482's Profile")**
- [![0329482's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8784-0329482 "View 0329482's Profile") Topic Author
- [ Offline](/forum/user/8784-0329482)

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 2 months ago [\#61642](#61642) by [0329482](/forum/user/8784-0329482 "View 0329482's Profile")  *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#61642 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")* was created by *[0329482](/forum/user/8784-0329482 "View 0329482's Profile")*

Hi,

is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.

Cheers,

JJ

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

14 years 2 months ago [\#61660](#61660) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#61660 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi,

You can do that with the PDF Invoice plugin:
[ www.hikashop.com/en/component/hikashop/product/cid-18.html](http://www.hikashop.com/en/component/hikashop/product/cid-18.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[0329482](/forum/user/8784-0329482 "View 0329482's Profile")**
- [![0329482's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8784-0329482 "View 0329482's Profile") Topic Author
- [ Offline](/forum/user/8784-0329482)

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 2 months ago [\#61661](#61661) by [0329482](/forum/user/8784-0329482 "View 0329482's Profile")  Replied by *[0329482](/forum/user/8784-0329482 "View 0329482's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#61661 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

yes... I bought this plugin. And I'm receiving the email. But only after manual adjustment. Can I send it automatically upon order creation?

Cheers,

JJ

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

14 years 2 months ago [\#61807](#61807) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#61807 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi,

The PDF invoice is attached to the order confirmation notification (when the order is paid).
It is not attached to the order creation notification (when the order is created).

Normally, the order should change automatically from created to confirmed when the payment gateway sends the payment notification to HikaShop.
Isn't that the case on your website ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[0329482](/forum/user/8784-0329482 "View 0329482's Profile")**
- [![0329482's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8784-0329482 "View 0329482's Profile") Topic Author
- [ Offline](/forum/user/8784-0329482)

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 2 months ago [\#61825](#61825) by [0329482](/forum/user/8784-0329482 "View 0329482's Profile")  Replied by *[0329482](/forum/user/8784-0329482 "View 0329482's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#61825 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Yes, that right. But we are using Bank transfer as payment method and would like to send an invoice upon order creation. Is there any way to do this?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

14 years 2 months ago [\#61949](#61949) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#61949 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi,

Can you try to replace the line:
if(empty($data-&gt;mail_name) &#124;&#124; empty($data-&gt;data-&gt;order_status) &#124;&#124; $data-&gt;mail_name != 'order_status_notification' &#124;&#124; $data-&gt;data-&gt;order_status != 'confirmed') return;
by the line:
if(empty($data-&gt;mail_name) &#124;&#124; empty($data-&gt;data-&gt;order_status) &#124;&#124; !in_array($data-&gt;mail_name,array('order_status_notification','order_creation_notification')) &#124;&#124; $data-&gt;data-&gt;order_status != 'confirmed') return;

in the file plugins/hikashop/attachinvoice/attachinvoice.php ?
That should allow that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[0329482](/forum/user/8784-0329482 "View 0329482's Profile")**
- [![0329482's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8784-0329482 "View 0329482's Profile") Topic Author
- [ Offline](/forum/user/8784-0329482)

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 2 months ago [\#62174](#62174) by [0329482](/forum/user/8784-0329482 "View 0329482's Profile")  Replied by *[0329482](/forum/user/8784-0329482 "View 0329482's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#62174 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Thanks for your help.

I did that.... unfortunatly it doesn't work. No email is attached to the order creation email. If I change the status to confirmed/paid I get the email wtih attachment. So there is no real change.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

14 years 2 months ago [\#62180](#62180) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#62180 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Yes, that change will only attach the invoice to the email if the status of the order is confirmed when the order is created.

If you want it to always include the invoice then use that line instead:
if(empty($data-&gt;mail_name) &#124;&#124; empty($data-&gt;data-&gt;order_status) &#124;&#124; !in_array($data-&gt;mail_name,array('order_status_notification','order_creation_notification'))) return;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[0329482](/forum/user/8784-0329482 "View 0329482's Profile")**
- [![0329482's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8784-0329482 "View 0329482's Profile") Topic Author
- [ Offline](/forum/user/8784-0329482)

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 2 months ago [\#62196](#62196) by [0329482](/forum/user/8784-0329482 "View 0329482's Profile")  Replied by *[0329482](/forum/user/8784-0329482 "View 0329482's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#62196 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Works fine!!!

Thank you very much for your support ![:)](/media/kunena/emoticons/8.png ":)")

Cheers!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[0329482](/forum/user/8784-0329482 "View 0329482's Profile")**
- [![0329482's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8784-0329482 "View 0329482's Profile") Topic Author
- [ Offline](/forum/user/8784-0329482)

Less More

- Posts: 7
- Thank you received: 0
-
-

14 years 2 months ago [\#62308](#62308) by [0329482](/forum/user/8784-0329482 "View 0329482's Profile")  Replied by *[0329482](/forum/user/8784-0329482 "View 0329482's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#62308 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi nicolas,

another question: Are the generated PDFs stored somewhere? or can I add a CC or BCC adress somewhere?

Cheers!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

14 years 2 months ago [\#62428](#62428) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#62428 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

They are not stored.

There is no option to add a CC or BCC.
However, you can get the email yourself with such modification:
[ www.hikashop.com/en/forum/4-how-to/23622...multiple-people.html](http://www.hikashop.com/en/forum/4-how-to/23622-send-order-status-notification-to-multiple-people.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gasoline](/forum/user/6454-gasoline "View gasoline's Profile")**
- [![gasoline's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6454.jpg)](/forum/user/6454-gasoline "View gasoline's Profile")
- [ Offline](/forum/user/6454-gasoline)
- Still searching ...

Less More

- Posts: 247
- Thank you received: 9
-
-
-
- [](https://gasoline.nl)
-

13 years 4 months ago -  13 years 4 months ago [\#108052](#108052) by [gasoline](/forum/user/6454-gasoline "View gasoline's Profile")  Replied by *[gasoline](/forum/user/6454-gasoline "View gasoline's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#108052 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

[strike]I just bought and installed the PDF (attachinvoice) but when I change order to confirmed I get this error message:

TCPDF ERROR: Unable to create output file: /home/xxxxxx/domains/xxxxxxx.com/public_html/plugins/hikashop/attachinvoice/attachinvoice/invoices/Factuur-148_1370588576.pdf

What should I do now?[/strike]

Solved: I set the folder to 777 instead of 755.

However now I get an ugly invoice. Not as the adjusted invoice file I made. How can I change this invoice to make it look more like the corporate image of client??

---

I'll keep on trying!

Last edit: 13 years 4 months ago by [gasoline](/forum/user/6454-gasoline "View gasoline's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 4 months ago -  13 years 4 months ago [\#108094](#108094) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#108094 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi,

To edit the template of the invoice, you have to edit the file "attachinvoice/invoice.php" in the plugin hikashop &gt; attachinvoice.

You can also create a view override: "media/com_hikashop/plugins/invoice.php".

Regards,

Last edit: 13 years 4 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gasoline](/forum/user/6454-gasoline "View gasoline's Profile")**
- [![gasoline's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6454.jpg)](/forum/user/6454-gasoline "View gasoline's Profile")
- [ Offline](/forum/user/6454-gasoline)
- Still searching ...

Less More

- Posts: 247
- Thank you received: 9
-
-
-
- [](https://gasoline.nl)
-

13 years 4 months ago [\#108183](#108183) by [gasoline](/forum/user/6454-gasoline "View gasoline's Profile")  Replied by *[gasoline](/forum/user/6454-gasoline "View gasoline's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#108183 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

I have another question. The invoice (in Dutch Factuur) is attached to email. Works like a charme. However, he names the PDF Factuur.pdf. But I want it like this, Factuur0023.pdf. So including invoice number. is that possible?

---

I'll keep on trying!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 4 months ago [\#108240](#108240) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#108240 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi,

It requires a modification in the plugin "attachinvoice".
By replacing the line: Code:

$mailer-&gt;AddAttachment($invoiceFolder.DS.$invoiceFile,JText::_('INVOICE').'.pdf');

By Code:

$mailer-&gt;AddAttachment($invoiceFolder.DS.$invoiceFile,JText::_('INVOICE').str_pad($orderId, 4, "0", STR_PAD_LEFT).'.pdf');

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [gasoline](/forum/user/6454-gasoline "View gasoline's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gasoline](/forum/user/6454-gasoline "View gasoline's Profile")**
- [![gasoline's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6454.jpg)](/forum/user/6454-gasoline "View gasoline's Profile")
- [ Offline](/forum/user/6454-gasoline)
- Still searching ...

Less More

- Posts: 247
- Thank you received: 9
-
-
-
- [](https://gasoline.nl)
-

13 years 4 months ago -  13 years 4 months ago [\#108270](#108270) by [gasoline](/forum/user/6454-gasoline "View gasoline's Profile")  Replied by *[gasoline](/forum/user/6454-gasoline "View gasoline's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#108270 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Thanks!

But I tested it, and now the the pdf gets the ordernr, instead of invoice nr.

---

I'll keep on trying!

Last edit: 13 years 4 months ago by [gasoline](/forum/user/6454-gasoline "View gasoline's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 4 months ago [\#108276](#108276) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#108276 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi
Code:

$mailer-&gt;AddAttachment($invoiceFolder.DS.$invoiceFile,JText::_('INVOICE').str_pad($order-&gt;invoice_id, 4, "0", STR_PAD_LEFT).'.pdf');

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Magiweb](/forum/user/10291-magiweb "View Magiweb's Profile")**
- [![Magiweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10291-magiweb "View Magiweb's Profile")
- [ Offline](/forum/user/10291-magiweb)

Less More

- Posts: 5
- Thank you received: 0
-
-

13 years 4 months ago -  13 years 4 months ago [\#109280](#109280) by [Magiweb](/forum/user/10291-magiweb "View Magiweb's Profile")  Replied by *[Magiweb](/forum/user/10291-magiweb "View Magiweb's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#109280 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi Nicolas,

Just got the attach PDF plugin and am working on the invoice style/layout. I tried adding a logo by including html in the shop address field as you suggested, but it seems that the PDF plugin has an issue with that because I get this error when I try to view the invoice:
Code:

6 - An error has occurred. ERROR n°6 : Impossible to load the image http://fuelnetworkservices.co.za/images/FNS-logo.jpg

I've tried changing the image format to png, but that didn't help.

So I created an override file and hard-coded the image HTML, but I get the same error.

I've also tried relative (./images/FNS-logo.jpg and /images/FNS-logo.jpg) and absolute URLs in the source which didn't help either.

Please let me know how I can include the logo image in my Invoice.

Thanks.

Last edit: 13 years 4 months ago by [Magiweb](/forum/user/10291-magiweb "View Magiweb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Magiweb](/forum/user/10291-magiweb "View Magiweb's Profile")**
- [![Magiweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10291-magiweb "View Magiweb's Profile")
- [ Offline](/forum/user/10291-magiweb)

Less More

- Posts: 5
- Thank you received: 0
-
-

13 years 4 months ago -  13 years 4 months ago [\#109299](#109299) by [Magiweb](/forum/user/10291-magiweb "View Magiweb's Profile")  Replied by *[Magiweb](/forum/user/10291-magiweb "View Magiweb's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#109299 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Just so any1 who has a similar problem knows...

It was a server configuration issue: I had to enable allow_url_fopen on my hosting's php.ini file to get it working. Turns out HTML2PDF needs this to be able to open images.

Last edit: 13 years 4 months ago by [Magiweb](/forum/user/10291-magiweb "View Magiweb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 4 months ago [\#109416](#109416) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Re: Automatic attaching invoices](/forum/2-general-talk-about-hikashop/61642-re-automatic-attaching-invoices#109416 "Hi,  is there a possibility to send out the invoice as a PDF upon order creation without any manual adjustment of the order? I already tried changing the default order status to paid, but it just send out the email without the attachment.  Cheers,  JJ")*

Hi,

When you specify a file path, you have to set the server file path. If you are using a "http" path, it will not be seen as a file path, but as an external file which has to be download by the server.
It includes a lot of complexity for a file which is already in the server.
You have to use the server relative path or the server absolute path.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzYxNjQyLXJlLWF1dG9tYXRpYy1hdHRhY2hpbmctaW52b2ljZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.451 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
