CMS Development

SVenkatesan
投稿者

Adding Line Item Properties in Custom Quote

解決

I would like to know possibility of adding line item property (Pre Discount Amount) in Custom Quote Template under Line item module.

Screenshot 2022-11-01 at 9.51.56 PM.png 

2件の承認済みベストアンサー
alyssamwilie
解決策
名誉エキスパート

Adding Line Item Properties in Custom Quote

解決

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

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developer at Lynton

Learn HubL | Get Marketing Insights

Lynton's HubSpot theme Rubric now available. Click to download.

元の投稿で解決策を見る

sskias-ink
解決策
参加者

Adding Line Item Properties in Custom Quote

解決

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

sskiasink_0-1698241088563.png

 

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

sskiasink_1-1698241182837.png

 

 

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

sskiasink_2-1698241220637.png

 

 

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. 

 

Hope this helps. 

元の投稿で解決策を見る

17件の返信
YGong6
参加者

Adding Line Item Properties in Custom Quote

解決

Hi Svenkatesan

 

How did you add more than 6 line items to the quote table? I can only do 6 on my end

 

Thanks

 

Cheers
Yan

0 いいね!
NDiver
参加者

Adding Line Item Properties in Custom Quote

解決

Hi @alyssamwilie 

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?

Any help of guidence would be hugley apprecaited?

Thank you 

0 いいね!
sskias-ink
参加者

Adding Line Item Properties in Custom 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? 

0 いいね!
DC1984
メンバー

Adding Line Item Properties in Custom Quote

解決

Hi,  @sskias-ink same problem here, do you managed to make it work?

0 いいね!
sskias-ink
解決策
参加者

Adding Line Item Properties in Custom Quote

解決

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

sskiasink_0-1698241088563.png

 

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

sskiasink_1-1698241182837.png

 

 

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

sskiasink_2-1698241220637.png

 

 

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. 

 

Hope this helps. 

daniele-lodola
参加者 | Diamond Partner
参加者 | Diamond Partner

Adding Line Item Properties in Custom Quote

解決

Hello @sskias-ink ,

 

Thanks for sharing this solution.

 

I am not able to get it to work on a single-line text field, any idea why ?

 

Best regards,

 

Dane

0 いいね!
sskias-ink
参加者

Adding Line Item Properties in Custom Quote

解決
When you say single line text field do you mean it does not repeat in the
output?

0 いいね!
daniele-lodola
参加者 | Diamond Partner
参加者 | Diamond Partner

Adding Line Item Properties in Custom Quote

解決

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 ?

0 いいね!
sskias-ink
参加者

Adding Line Item Properties in Custom Quote

解決
Can you provide a screenshot of the field configuration?

0 いいね!
daniele-lodola
参加者 | Diamond Partner
参加者 | Diamond Partner

Adding Line Item Properties in Custom Quote

解決

Sure ; this is my config:

  • unit.name, standard HubSpot product field, single-line text, displaying as expected
  • unit.name_fr, custom, custom product field, single-line text, NOT displaying as expected

 

Capture d’écran 2024-07-27 à 12.16.13.png

Capture d’écran 2024-07-27 à 12.15.17.png

  

0 いいね!
daniele-lodola
参加者 | Diamond Partner
参加者 | Diamond Partner

Adding Line Item Properties in Custom Quote

解決

any ideas @sskias-ink ? 😀

0 いいね!
sskias-ink
参加者

Adding Line Item Properties in Custom Quote

解決

Hi @daniele-lodola,

 

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>

</td>
{% elif item.column_property == 'item_description' %}
<td>
<span class="item-name">{{ unit.name }}</span>
<div class="line-item-description">{{ unit.description }}</div>

</td>
{% elif item.column_property == 'description' %}
<td>
<div class="line-item-description">{{ unit.description }}</div>
</td>

{% else %}
<td class="{{ cell_print_max_width_class }}">{{ property_value }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>

 

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. 

 

Apologies if this is not much help. 

0 いいね!
daniele-lodola
参加者 | Diamond Partner
参加者 | Diamond Partner

Adding Line Item Properties in Custom Quote

解決

Thanks a bunch for this prompt response and the insights you provided @sskias-ink !

0 いいね!
DC1984
メンバー

Adding Line Item Properties in Custom Quote

解決

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?

0 いいね!
SVenkatesan
投稿者

Adding Line Item Properties in Custom Quote

解決

You can increase it in Repeater Options like this @DC1984 @sskias-ink 

Screenshot 2024-01-17 at 3.27.21 PM.png

0 いいね!
sskias-ink
参加者

Adding Line Item Properties in Custom Quote

解決

I am glad that worked for you @DC1984.

 

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. 

0 いいね!
alyssamwilie
解決策
名誉エキスパート

Adding Line Item Properties in Custom Quote

解決

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

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developer at Lynton

Learn HubL | Get Marketing Insights

Lynton's HubSpot theme Rubric now available. Click to download.