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

#   Custom field display in the PDF plugin invoic

##

- **[Gonzalez Villoria](/forum/user/1171-gonzalez-villoria "View Gonzalez Villoria's Profile")**
- [![Gonzalez Villoria's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1171.png)](/forum/user/1171-gonzalez-villoria "View Gonzalez Villoria's Profile") Topic Author
- [ Offline](/forum/user/1171-gonzalez-villoria)

Less More

- Posts: 48
- Thank you received: 0
-
- [](http://www.creatico.es)
-

1 year 1 month ago [\#368778](#368778) by [Gonzalez Villoria](/forum/user/1171-gonzalez-villoria "View Gonzalez Villoria's Profile")  *[Custom field display in the PDF plugin invoic](/forum/26-product-category-display/909757-custom-field-display-in-the-pdf-plugin-invoic#368778 "-- HikaShop version -- : 6.1.0 -- Joomla version -- : 4.4.13 -- PHP version -- : 8  Hello, I have the invoice PDF plugin installed and I need to include a custom text field in the product table (it’s a batch for traceability). How can I do this? Thank you.")* was created by *[Gonzalez Villoria](/forum/user/1171-gonzalez-villoria "View Gonzalez Villoria's Profile")*

-- HikaShop version -- : 6.1.0
-- Joomla version -- : 4.4.13
-- PHP version -- : 8

Hello, I have the invoice PDF plugin installed and I need to include a custom text field in the product table (it’s a batch for traceability). How can I do this? Thank you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDk3NTctY3VzdG9tLWZpZWxkLWRpc3BsYXktaW4tdGhlLXBkZi1wbHVnaW4taW52b2ljP3RtcGw9bWFya2Rvd24=) 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: 86584
- Thank you received: 14325
-
-

1 year 1 month ago [\#368780](#368780) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field display in the PDF plugin invoic](/forum/26-product-category-display/909757-custom-field-display-in-the-pdf-plugin-invoic#368780 "-- HikaShop version -- : 6.1.0 -- Joomla version -- : 4.4.13 -- PHP version -- : 8  Hello, I have the invoice PDF plugin installed and I need to include a custom text field in the product table (it’s a batch for traceability). How can I do this? Thank you.")*

Hi,

Go in the menu Display&gt;Views and search for the pdf_layout view.
You'll find the 4 different layout files corresponding to the "layout" setting in the PDF invoice plugin.
So edit the one corresponding to the layout you're using.
There, the product name is displayed with the code: Code:

echo implode('&lt;br/&gt;',$this-&gt;str_split_unicode(strip_tags($product-&gt;order_product_name),50));

In $product , you don't directly have the custom product fields data, however you have the product_id.
So, you can use such code, below the product name display code: Code:

$productClass = hikashop_get('class.product'); $productData = $productClass-&gt;get($product-&gt;product_id); echo '&lt;br/&gt;'. $productData-&gt;xxx;

where xxx is the column name of your custom product field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDk3NTctY3VzdG9tLWZpZWxkLWRpc3BsYXktaW4tdGhlLXBkZi1wbHVnaW4taW52b2ljP3RtcGw9bWFya2Rvd24=) 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.038 seconds

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