# How to Display Bundle Products on the Invoice Template?

**URL:** <https://community.novulo.com/t/how-to-display-bundle-products-on-the-invoice-template/340>\
**Category:** \[Q&A\] General\
**Created:** [July 12, 2024, 10:53am UTC](https://community.novulo.com/t/how-to-display-bundle-products-on-the-invoice-template/340 "2024-07-12T10:53:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephanRS](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.novulo.com/stephanrs/32/92_2.png) [@StephanRS](https://community.novulo.com/u/StephanRS)\
**Post date:** [July 12, 2024, 10:53am UTC](https://community.novulo.com/t/how-to-display-bundle-products-on-the-invoice-template/340/1 "2024-07-12T10:53:50Z")

</div>

Hi everyone,

I’m working on an invoice template and need some advice. I want to display not only the regular product description but also the individual components of a bundle product as additional lines. Currently, I can’t find a direct link from the `sales_line` to achieve this.

Here’s what I’m aiming for:

- Regular products should show their description as usual.
- For bundle products, the main product description should appear, followed by the descriptions of the individual items that make up the bundle.

Can anyone provide guidance on how to implement this? It’s crucial that the normal products have their descriptions, and for bundle products, the description of the bundle is shown with the underlying products listed beneath it.

---

<div class="post-metadata">

**Author:** ![Aimee](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Aimee](https://community.novulo.com/u/Aimee)\
**Post date:** [July 15, 2024, 10:42am UTC](https://community.novulo.com/t/how-to-display-bundle-products-on-the-invoice-template/340/2 "2024-07-15T10:42:10Z")

</div>

Hi Stephan,

The link between the bundle products and the main product on the sales\_lines is parent\_product.

You could add a field “sub\_products” with a string:htmljoin in your exportdataset. The expression would look something like this:

string:htmljoin(  
“\n”,  
{  
saleslines,  
this.quantity.round().tostring().concat("x ").concat(this.description),  
this.parent\_product.equals(parent.sales\_line)  
}  
)

---

<div class="post-metadata">

**Author:** ![StephanRS](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.novulo.com/stephanrs/32/92_2.png) [@StephanRS](https://community.novulo.com/u/StephanRS)\
**Post date:** [August 7, 2024, 6:56am UTC](https://community.novulo.com/t/how-to-display-bundle-products-on-the-invoice-template/340/3 "2024-08-07T06:56:58Z")

</div>

> [@Aimee](#):
>
> string:htmljoin(  
> “\n”,  
> {  
> saleslines,  
> this.quantity.round().tostring().concat("x ").concat(this.description),  
> this.parent\_product.equals(parent.sales\_line)  
> }  
> )

Hi Aimee,

Thank you for your response, and sorry for my late reply. I was not active on the forum due to being on vacation. I am now getting the message “invalid fieldname” at “\n”. Please see the screenshot as well. Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![StephanRS](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.novulo.com/stephanrs/32/92_2.png) [@StephanRS](https://community.novulo.com/u/StephanRS)\
**Post date:** [August 7, 2024, 6:57am UTC](https://community.novulo.com/t/how-to-display-bundle-products-on-the-invoice-template/340/4 "2024-08-07T06:57:38Z")

</div>

![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/1X/b5875eccd00b7178f88801b6bc03866095c3cd3b.png)

---

<div class="post-metadata">

**Author:** ![m.gechev](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@m.gechev](https://community.novulo.com/u/m.gechev)\
**Post date:** [August 7, 2024, 7:06am UTC](https://community.novulo.com/t/how-to-display-bundle-products-on-the-invoice-template/340/5 "2024-08-07T07:06:13Z")

</div>

Hi Stephan,

You need to use the straight quotes ( " " ), what is entered in the expression are curly quotes ( “ ”)

Greetings,  
Miroslav

---

<div class="post-metadata">

**Author:** ![StephanRS](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.novulo.com/stephanrs/32/92_2.png) [@StephanRS](https://community.novulo.com/u/StephanRS)\
**Post date:** [August 7, 2024, 7:13am UTC](https://community.novulo.com/t/how-to-display-bundle-products-on-the-invoice-template/340/6 "2024-08-07T07:13:14Z")

</div>

You are my hero, thank you, it works.
