- Posts: 138
- Thank you received: 1
How to add extra information field invoice to pdf
-- Joomla version -- : 2.5.19
-- PHP version -- : ?
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : not
Hello,
When a customer orders a product in the webshop they get an confirmation e-mail including the pdf. In our webshop it is possible for people to ad some text that gets included in the confirmation e-mail. (this option is called field in the backend of hikashop.)
So whe would like to get this information not only in the e-mail but also in the pdf. However we can not find the code responisble for this. Can you tell uss what the code is or where we can find it?
Thanks already!
Please Log in or Create an account to join the conversation.
You can find the file "invoice.php" to generate the PDF invoice from the PDF invoice plugin of Hikashop in the folder plugins/hikashop/attachinvoice/attachinvoice/ of your website.
The order data is available in the variable $order in that file
Please Log in or Create an account to join the conversation.
So we like to know where this e-mail gets his data from. (wich file) and were in this file it is giving info about the extra field part. So we can copy this and put it in the invoice.php file.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
You'll just have to edit the "plugins/hikashop/attachinvoice/attachinvoice/invoice.php" file, here are the lines which are displaying the "extra field part" :So we like to know where this e-mail gets his data from. (wich file) and were in this file it is giving info about the extra field part. So we can copy this and put it in the invoice.php file.
Please Log in or Create an account to join the conversation.
Thanks for your reaction. We did place the code in the invoice.php file and part of the stuff worked. What happends:
It is showing the first sentence of the extra field name.
It is not showing the second line of the fiels name.
It is also not showing the comment that people put into this field.
The field is also showing in the pdf when people do not put any comment into the field. Wich shouldnt be eather.
How is this possible as it should be the same code?
Please Log in or Create an account to join the conversation.
The forum engine stripped the
I believe that it's why it's not working properly.
Also, there should also be some extra code around that code:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Do you have the line $fields = $fieldsClass->getFields('backend',$order,'order'); in the attachinvoice.php file of the plugin ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please use our contact form to request the latest version with your order number and a link to this thread :
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.