[Skip to main content](#vessel-content)

#   Product code in PDF invoice

##

- **[gielhier](/forum/user/9811-gielhier "View gielhier's Profile")**
- [![gielhier's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9811-gielhier "View gielhier's Profile") Topic Author
- [ Offline](/forum/user/9811-gielhier)

Less More

- Posts: 90
- Thank you received: 2
-
-

5 years 4 months ago [\#334239](#334239) by [gielhier](/forum/user/9811-gielhier "View gielhier's Profile")  *[Product code in PDF invoice](/forum/27-checkout/902922-product-code-in-pdf-invoice#334239 "-- 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")* was created by *[gielhier](/forum/user/9811-gielhier "View gielhier's Profile")*

-- 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

- [ ![Schermafbeelding2021-07-07om11.03.20.png](/forum/attachment/53203) ](/forum/attachment/53203 "...om11.03.20.png") [ ](/forum/attachment/53203?download=1 "...om11.03.20.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMjkyMi1wcm9kdWN0LWNvZGUtaW4tcGRmLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

5 years 4 months ago [\#334242](#334242) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product code in PDF invoice](/forum/27-checkout/902922-product-code-in-pdf-invoice#334242 "-- 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")*

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-&gt;get('show_code')) {
to:
if(true) {

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMjkyMi1wcm9kdWN0LWNvZGUtaW4tcGRmLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gielhier](/forum/user/9811-gielhier "View gielhier's Profile")**
- [![gielhier's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9811-gielhier "View gielhier's Profile") Topic Author
- [ Offline](/forum/user/9811-gielhier)

Less More

- Posts: 90
- Thank you received: 2
-
-

5 years 4 months ago [\#334295](#334295) by [gielhier](/forum/user/9811-gielhier "View gielhier's Profile")  Replied by *[gielhier](/forum/user/9811-gielhier "View gielhier's Profile")* on topic *[Product code in PDF invoice](/forum/27-checkout/902922-product-code-in-pdf-invoice#334295 "-- 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")*

Hi Nicolas,

No if ($config-&gt;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

- [ ![Schermafbeelding2021-07-08om15.31.08.png](/forum/attachment/53212) ](/forum/attachment/53212 "...om15.31.08.png") [ ](/forum/attachment/53212?download=1 "...om15.31.08.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMjkyMi1wcm9kdWN0LWNvZGUtaW4tcGRmLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

5 years 4 months ago [\#334297](#334297) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product code in PDF invoice](/forum/27-checkout/902922-product-code-in-pdf-invoice#334297 "-- 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")*

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 '&lt;br/&gt;'.$product-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMjkyMi1wcm9kdWN0LWNvZGUtaW4tcGRmLWludm9pY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.048 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
