- Posts: 90
- Thank you received: 2
Product code in PDF invoice
5 years 3 months ago #334239
by gielhier
Product code in PDF invoice was created by gielhier
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.28
-- PHP version -- : 7.4
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : none
Hi,
We want to have the product code in the PDF invoice. How can we do that?
Kind regards,
Raoul
-- Joomla version -- : 3.9.28
-- PHP version -- : 7.4
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : none
Hi,
We want to have the product code in the PDF invoice. How can we do that?
Kind regards,
Raoul
Please Log in or Create an account to join the conversation.
5 years 3 months ago #334242
by nicolas
Replied by nicolas on topic Product code in PDF invoice
Hi,
The product code will actually display automatically on the invoice if you have the "show product code" setting activated in the HikaShop configuration. Note that this setting will also activate the display of the product code on the product details page, and other places.
If you only want it in the PDF invoice, you can edit the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php and change the line:
if ($config->get('show_code')) {
to:
if(true) {
The product code will actually display automatically on the invoice if you have the "show product code" setting activated in the HikaShop configuration. Note that this setting will also activate the display of the product code on the product details page, and other places.
If you only want it in the PDF invoice, you can edit the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php and change the line:
if ($config->get('show_code')) {
to:
if(true) {
Please Log in or Create an account to join the conversation.
5 years 2 months ago #334295
by gielhier
Replied by gielhier on topic Product code in PDF invoice
Hi Nicolas,
No if ($config->get('show_code')) { in plugins/hikashop/attachinvoice/attachinvoice/invoice.php. Do I have a outdated version?
I think this is the right button in the config? See screenshot.
Regards,
Raoul
No if ($config->get('show_code')) { in plugins/hikashop/attachinvoice/attachinvoice/invoice.php. Do I have a outdated version?
I think this is the right button in the config? See screenshot.
Regards,
Raoul
Please Log in or Create an account to join the conversation.
5 years 2 months ago #334297
by nicolas
Replied by nicolas on topic Product code in PDF invoice
Hi,
Well, in that case, you probably have an old version of the plugin yes.
In that file, you can add that line of code to display the product code:
echo '<br/>'.$product->order_product_code;
That's the line already there by default.
Now I'm not sure what's the status of the code in your version of the plugin, so I can't say where to add it exactly.
Search for order_product_name and add that code after the line with order_product_name in it.
Well, in that case, you probably have an old version of the plugin yes.
In that file, you can add that line of code to display the product code:
echo '<br/>'.$product->order_product_code;
That's the line already there by default.
Now I'm not sure what's the status of the code in your version of the plugin, so I can't say where to add it exactly.
Search for order_product_name and add that code after the line with order_product_name in it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.181 seconds