- Posts: 7
- Thank you received: 0
Re: Automatic attaching invoices
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 or Create an account to join the conversation.
You can do that with the PDF Invoice plugin:
www.hikashop.com/en/component/hikashop/product/cid-18.html
Please Log in or Create an account to join the conversation.
Cheers,
JJ
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Can you try to replace the line:
if(empty($data->mail_name) || empty($data->data->order_status) || $data->mail_name != 'order_status_notification' || $data->data->order_status != 'confirmed') return;
by the line:
if(empty($data->mail_name) || empty($data->data->order_status) || !in_array($data->mail_name,array('order_status_notification','order_creation_notification')) || $data->data->order_status != 'confirmed') return;
in the file plugins/hikashop/attachinvoice/attachinvoice.php ?
That should allow that.
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
If you want it to always include the invoice then use that line instead:
if(empty($data->mail_name) || empty($data->data->order_status) || !in_array($data->mail_name,array('order_status_notification','order_creation_notification'))) return;
Please Log in or Create an account to join the conversation.
Thank you very much for your support
Cheers!
Please Log in or Create an account to join the conversation.
another question: Are the generated PDFs stored somewhere? or can I add a CC or BCC adress somewhere?
Cheers!
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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!
Please Log in or Create an account to join the conversation.
To edit the template of the invoice, you have to edit the file "attachinvoice/invoice.php" in the plugin hikashop > attachinvoice.
You can also create a view override: "media/com_hikashop/plugins/invoice.php".
Regards,
Please Log in or Create an account to join the conversation.
I'll keep on trying!
Please Log in or Create an account to join the conversation.
It requires a modification in the plugin "attachinvoice".
By replacing the line:
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
But I tested it, and now the the pdf gets the ordernr, instead of invoice nr.
I'll keep on trying!
Please Log in or Create an account to join the conversation.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
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:
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.
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.
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 & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.