- Posts: 75
- Thank you received: 0
I need to put the product codes in the invoice
10 years 9 months ago - 10 years 9 months ago #222707
by rober1903
I need to put the product codes in the invoice was created by rober1903
-- HikaShop version -- : 2.6.0. Bussines
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6.0
-- Browser(s) name and version -- : all
-- 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.
10 years 9 months ago #222710
by nicolas
Replied by nicolas on topic I need to put the product codes in the invoice
Hi,
Turn on the "display product code" setting of your HikaShop configuration and that should do it.
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.
10 years 9 months ago #222947
by rober1903
Replied by rober1903 on topic I need to put the product codes in the invoice
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.
10 years 9 months ago #222969
by nicolas
Replied by nicolas on topic I need to put the product codes in the invoice
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.
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.
10 years 9 months ago #223136
by rober1903
Replied by rober1903 on topic I need to put the product codes in the invoice
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)
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.
10 years 9 months ago #223440
by nicolas
Replied by nicolas on topic I need to put the product codes in the invoice
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 ?
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.
10 years 9 months ago #223967
by rober1903
Replied by rober1903 on topic I need to put the product codes in the invoice
I performed the operation again and the result is the same.
Please Log in or Create an account to join the conversation.
10 years 9 months ago #224023
by nicolas
Replied by nicolas on topic I need to put the product codes in the invoice
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.
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.
10 years 9 months ago #224033
by rober1903
Replied by rober1903 on topic I need to put the product codes in the invoice
It worked perfectly. Thank you!!
Please Log in or Create an account to join the conversation.
Time to create page: 0.246 seconds