@SVenkatesan There's not currently a way out-of-the-box to do so, but according to this Ideas Form post HubSpot does at least it have in planning to update the default line items module to allow for custom properties.
in the meantime, if you're comfortable with the design manager, you could update it yourself to allow adding that property. If you're using the HubSpot quotes theme you'd first have to create a Child theme and then in the files you would have to open the line_items_table module and edit the Select column property field to include your custom property as a choice.
If this answer solved your question, please mark it as the solution.
@DC1984, I was able to get this to work. It took some trial and error though.
1. After you have cloned the template, open the line_items_table in Design Manager.
2. In the editor on the right pane, hover over Select column property (Choice) and click Edit. It should be located under Line item column (Field group).
3. This should display the list of fields that you can select in your quote template editor when configuring the line items table.
4. At the bottom of that list, you have the option to Add another choice
5. The property will already need to be created at this time. Just enter the label and the property name.
6. Publish the changes.
This should make the property available when configuring your quote template.
Thank you for your post, which proved very helpful for me within the Design Manager.
I have managed to get the "Custom Product Property" Named As "Collection Frequency" within my products to be visible on a quote column for the customer to see.
Oddly, the column heading is visible (Collection Frequency), but it's not pulling through any of the iems ticked.
My "Custom Property Field Type" has been created as Multiple checkboxes so the idea was that when showing the custom properties column on the quote, it would pull through the ticked boxes.
Oddly, I can build the quote, when selecting products to go onto the Collection Frequency when adding products to the quote. (It allows me to tick Mon/Tue/Wed for example. However the Mon/Tue/Wed is not pulling through to the quote (not visible for the customer to see).
Can you reccomend how to have this pull through in the design Manager. Or do I need to create a differnt Custom Property for the correct ticked days to pull through to the quote?
@alyssamwilie I have tried this and followed the steps you provided; however, it seems like HubSpot doesn't recognize the property at all when using it in a quote. Is there something else that needs to be done for HubSpot to recognize the custom property in the line_items_table?
@DC1984, I was able to get this to work. It took some trial and error though.
1. After you have cloned the template, open the line_items_table in Design Manager.
2. In the editor on the right pane, hover over Select column property (Choice) and click Edit. It should be located under Line item column (Field group).
3. This should display the list of fields that you can select in your quote template editor when configuring the line items table.
4. At the bottom of that list, you have the option to Add another choice
5. The property will already need to be created at this time. Just enter the label and the property name.
6. Publish the changes.
This should make the property available when configuring your quote template.
No output whatsoever is retrieved from the product for my single-line text field.
I'm using {{ unit.name_fr|sanitize_html }} to retrieve the value from the "name_fr" field which is populated on my products, but I'm just getting an empty value. Do I need to address the 'text' attribute / component of the field or something like that ?
I am not entirely sure why it is not firing. The only options I can think of is...
1. Try entering a constant value instead of unit.name_fr as a test to see if it displays.
2. I am not clear on where you if statement is being placed. There is a section in the line items table where the body of the content gets displayed. It should be this section:
<tbody id="line-items__table-body"> {% for unit in line_items %} <tr> {% for item in module.line_item_column %} {% set property_value = unit[item.column_property] %}
{% if item.column_property == 'name' %} <td> <span>{{ unit.name }}</span>
When I added the additional properties, I did not have to edit the code here, but I also was not doing any conditional logic on the properties. I managed what was displayed in the template editor itself where you can select which properties to include in that section.
For your situation, I would think your conditional statement should be placed within the item table body section of the code.
Oct 25, 202310:37 AM - edited Oct 25, 202310:38 AM
Member
Adding Line Item Properties in Custom Quote
SOLVE
Thank you very much @sskias-ink , I followed your explanation and it works correctly. Unfortunately, I noticed that there are only 6 spaces/columns. I read here in the community that 'There's still a limit of 6 columns which is annoying, but you can get past this via the Rich Text modules and create a table yourselves & use personalize to map the properties you want onto it.' but I don't understand how to proceed to increase the number, do you have any suggestions?
Unfortunately, I have not had the need to expand the number of columns within the template. I would think this would require a developer to build out exactly what you need.
@SVenkatesan There's not currently a way out-of-the-box to do so, but according to this Ideas Form post HubSpot does at least it have in planning to update the default line items module to allow for custom properties.
in the meantime, if you're comfortable with the design manager, you could update it yourself to allow adding that property. If you're using the HubSpot quotes theme you'd first have to create a Child theme and then in the files you would have to open the line_items_table module and edit the Select column property field to include your custom property as a choice.
If this answer solved your question, please mark it as the solution.