Skip to main content

I need to put the product codes in the invoice

More
10 years 9 months ago - 10 years 9 months ago #222707 by rober1903
-- HikaShop version -- : 2.6.0. Bussines
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6.0
-- Browser(s) name and version -- : all
Last edit: 10 years 9 months ago by rober1903.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #222710 by nicolas
Hi,

Turn on the "display product code" setting of your HikaShop configuration and that should do it.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #222947 by rober1903
I attached the capture. This enabled see the code, and the bill does not come out. I am attaching the files.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #222969 by nicolas
Hi,

Ah, you're using the PDF invoice plugin.
In that case, yes the product code is not added.
You need to add the line:
echo ' '.$product->order_product_code;

after the line:
<?php echo implode('<br/>',$this->str_split_unicode(strip_tags($product->order_product_name),50));
in the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php
and that will add the product code.
The following user(s) said Thank You: rober1903

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #223136 by rober1903
Thank you very much for responding so quickly.
I changed the line, and the bill not visualize the code of the product. I am attaching the file invoice.php (plugins/hikashop/attachinvoice/attachinvoice/invoice.php)

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #223440 by nicolas
Hi,

The solution provided is definitely correct.
Can you do a screenshot of your change and one of an invoice after that change ?
Did you maybe already have an override for the invoice file ?

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #223967 by rober1903
I performed the operation again and the result is the same. :(

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #224023 by nicolas
Maybe the product code is cut off by the HTML 2 PDF library because the product name is too long.
Try using that code instead:
echo '<br/>'.$product->order_product_code;
that will put it on a second line and should avoid that.
The following user(s) said Thank You: rober1903

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #224033 by rober1903
It worked perfectly. Thank you!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.246 seconds
Powered by Kunena Forum