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

#   product code in pdf invoice

##

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

Less More

- Posts: 23
- Thank you received: 0
-
-

12 years 3 months ago -  12 years 2 months ago [\#165987](#165987) by [ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile")  *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#165987 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")* was created by *[ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile")*

-- url of the page with the problem -- : local
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.2
-- PHP version -- : 5.5.11
-- Browser(s) name and version -- : Firefox 31.0

Hi
I use the pdf invoice plugin.
I'd like to display the product code in my pdf invoice.
I'd lke to have the product code with the product name.
I do have the product code in the email but not in the pdf invoice.
What do I need to add?
Thanks in advance

Last edit: 12 years 2 months ago by [ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile").

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 3 months ago [\#166004](#166004) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#166004 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Hello,
Note that the display of the PDF invoice is customizable through the file: "*plugins/hikashop/attachinvoice/attachinvoice/**invoice.php***".

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

12 years 3 months ago [\#166088](#166088) by [ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile")  Replied by *[ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#166088 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Hi,
Yes I've already customized the invoice but I'm not really good with php coding... So I'm wondering if someone already did that by the past and could give me the piece of code to add in the file.

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 3 months ago -  12 years 3 months ago [\#166097](#166097) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#166097 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Hi,

In that file you just have to add: Code:

echo $product-&gt;order_product_code;

After: Code:

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

Last edit: 12 years 3 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

12 years 3 months ago [\#166568](#166568) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#166568 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

This solution does not work,
I tried implementing Code:

echo $product-&gt;order_product_name

on line life below, and after....

....and both times it gives me an error.

Any solution ?

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

12 years 3 months ago [\#166573](#166573) 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/30-integrations/870089-product-code-in-pdf-invoice#166573 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Indeed the code of Xavier was not correct. I've fixed it.

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

12 years 3 months ago [\#167967](#167967) by [ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile")  Replied by *[ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#167967 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Thank you Xavier and Nicolas, that works perfectly!

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

12 years 2 weeks ago [\#178474](#178474) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#178474 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

I downloaded the latest version of the "Attach Invoice to the order confirmation e-mail" plugin in order to bulk print invoices from the back-end.

But I need the Product Code to display in these invoices ?

It use to work with an earlier version like described in this thread. But not with the latest version.

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

12 years 2 weeks ago [\#178479](#178479) by [ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile")  Replied by *[ip-studio](/forum/user/33508-ip-studio "View ip-studio's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#178479 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Hi
Just add :
echo $product-&gt;order_product_code;
where you except to see the code in plugins/hikashop/attachinvoice/attachinvoice/invoice.php

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 2 weeks ago [\#178480](#178480) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#178480 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Hi,

Are you sure that you are editing the file correctly, that there is no other override ?

The given code must still be working, there was no changes in the plugin.
You have maybe added the code at teh wrong place, please try to change the code position and not in a if condition.

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

10 years 11 months ago [\#223734](#223734) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#223734 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

> ip-studio wrote: Hi
> Just add :
> echo $product-&gt;order\_product\_code;
> where you except to see the code in plugins/hikashop/attachinvoice/attachinvoice/invoice.php

This works fine, and my product code(red underlined) is displaying like this in the invoice:

[ ![invoice&#95;00.png](/forum/attachment/28390) ](/forum/attachment/28390 "invoice&#95;00.png")

I need it do display like this (red underline), on a separate line.

[ ![invoice&#95;02.png](/forum/attachment/28391) ](/forum/attachment/28391 "invoice&#95;02.png")

Any advice on how to fix this ?

- [ ![invoice&#95;00.png](/forum/attachment/28390) ](/forum/attachment/28390 "invoice&#95;00.png") [ ](/forum/attachment/28390?download=1 "invoice&#95;00.png")
- [ ![invoice&#95;02.png](/forum/attachment/28391) ](/forum/attachment/28391 "invoice&#95;02.png") [ ](/forum/attachment/28391?download=1 "invoice&#95;02.png")

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

10 years 11 months ago [\#223765](#223765) 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/30-integrations/870089-product-code-in-pdf-invoice#223765 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

You can do like that:
echo '&lt;br/&gt;'.$product-&gt;order_product_code;

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

10 years 11 months ago -  10 years 11 months ago [\#223888](#223888) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#223888 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

It works perfect. One last question:

It is possible to include the brand name of the product in the invoice. Plese see image on how I want it to look (brand name is illustrated with red)

[ ![brand&#95;name&#95;screenshot.jpg](/forum/attachment/28419) ](/forum/attachment/28419 "...screenshot.jpg")

Any advice on how to do this ?

- [ ![brand&#95;name&#95;screenshot.jpg](/forum/attachment/28419) ](/forum/attachment/28419 "...screenshot.jpg") [ ](/forum/attachment/28419?download=1 "...screenshot.jpg")

Last edit: 10 years 11 months ago by [river](/forum/user/9591-river "View river's Profile").

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

10 years 11 months ago [\#223912](#223912) 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/30-integrations/870089-product-code-in-pdf-invoice#223912 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

It's more complex: Code:

$productClass = hikashop_get('class.product'); $productData = $productClass-&gt;get($product-&gt;product_id); $categoryClass = hikashop_get('class.category'); $category = $categoryClass-&gt;get($productData-&gt;product_manufacturer_id); echo $category-&gt;category_name;

The following user(s) said Thank You: [river](/forum/user/9591-river "View river's Profile")

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

10 years 11 months ago [\#223963](#223963) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#223963 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Perfect ....it works, Tnx a lot !

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

10 years 9 months ago [\#228528](#228528) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#228528 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

> nicolas wrote: It's more complex:
>
> Code:
>
> $productClass = hikashop_get('class.product'); $productData = $productClass-&gt;get($product-&gt;product_id); $categoryClass = hikashop_get('class.category'); $category = $categoryClass-&gt;get($productData-&gt;product_manufacturer_id); echo $category-&gt;category_name;

Note: Hikashop version: 2.6

OK this works fine, but I have a little problem.

When the products has Characteristics/with variants the brand name does not display.

When the product has no variants the brand name display's just fine.

In the product with variants I use different product codes. i.e:

Original product code: 660021_01
Variant a product code: 660021
Variant b product code: 660022

The invoice is displaying the correct product code, but I am missing the brand name with the products with "variants"

Any advice ?

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

10 years 9 months ago [\#228574](#228574) 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/30-integrations/870089-product-code-in-pdf-invoice#228574 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

It's more complex in that case: Code:

$productClass = hikashop_get('class.product'); $productData = $productClass-&gt;get($product-&gt;product_id); if($productData-&gt;product_parent_id){ $parentProductData = $productClass-&gt;get($product-&gt;product_parent_id); $productData-&gt;product_manufacturer_id = $parentProductData-&gt;product_manufacturer_id; } $categoryClass = hikashop_get('class.category'); $category = $categoryClass-&gt;get($productData-&gt;product_manufacturer_id); echo $category-&gt;category_name;

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

10 years 9 months ago [\#229723](#229723) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#229723 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Very nice, it works ! tnx a lot ![:)](/media/kunena/emoticons/3.png ":)")

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

10 years 6 months ago [\#239857](#239857) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[product code in pdf invoice](/forum/30-integrations/870089-product-code-in-pdf-invoice#239857 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Note: Hikashop 2.6.1

OK I will just continue using this thread since I am probarly the only person with this request.

It is possible to include the product quantity or a message saying: "Product on stock" in the product invoice.
Like this:

[ ![tester1111.jpg](/forum/attachment/31360) ](/forum/attachment/31360 "tester1111.jpg")

I only need this message to be displayed if the quantity of the product is 1 or above.

I have some products the have Quantity: Unlimited, but on these products I do not need the message to be displayed since these products are not in my own warehouse.

Looking forward to hear from you.

- [ ![tester1111.jpg](/forum/attachment/31360) ](/forum/attachment/31360 "tester1111.jpg") [ ](/forum/attachment/31360?download=1 "tester1111.jpg")

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

10 years 6 months ago [\#239861](#239861) 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/30-integrations/870089-product-code-in-pdf-invoice#239861 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.2 -- Joomla version -- : 3.3.2 -- PHP version -- : 5.5.11 -- Browser(s) name and version -- : Firefox 31.0  Hi I use the pdf invoice plugin. I'd like to display the product code in my pdf invoice. I'd lke to have the product code with the product name. I do have the product code in the email but not in the pdf invoice. What do I need to add? Thanks in advance")*

Hi,

You can do like that: Code:

$productClass = hikashop_get('class.product'); $productData = $productClass-&gt;get($product-&gt;product_id); if($productData-&gt;product_quantity&gt;0) echo 'Product on stock';

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

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