I need to put the product codes in the invoice

  • Posts: 75
  • Thank you received: 0
8 years 4 months ago #222707

-- HikaShop version -- : 2.6.0. Bussines
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6.0
-- Browser(s) name and version -- : all

Last edit: 8 years 4 months ago by rober1903.

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

  • Posts: 81509
  • Thank you received: 13065
  • MODERATOR
8 years 4 months ago #222710

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.

  • Posts: 75
  • Thank you received: 0
8 years 4 months ago #222947

I attached the capture. This enabled see the code, and the bill does not come out. I am attaching the files.

Attachments:

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

  • Posts: 81509
  • Thank you received: 13065
  • MODERATOR
8 years 4 months ago #222969

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.

  • Posts: 75
  • Thank you received: 0
8 years 4 months ago #223136

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.

  • Posts: 81509
  • Thank you received: 13065
  • MODERATOR
8 years 4 months ago #223440

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.

  • Posts: 75
  • Thank you received: 0
8 years 4 months ago #223967

I performed the operation again and the result is the same. :(

Attachments:

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

  • Posts: 81509
  • Thank you received: 13065
  • MODERATOR
8 years 4 months ago #224023

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.

  • Posts: 75
  • Thank you received: 0
8 years 4 months ago #224033

It worked perfectly. Thank you!!

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

Time to create page: 0.077 seconds
Powered by Kunena Forum