CMS Development

SDays
メンバー

compare with internal name in stead of label in Quote

I have made a custom quote template where I made some changes toe the line_items_table module.
I have an if statement where I compare the product_category (= a field in my product prp-operties) with it's internal name for example % if unit.product_category == "extra_materiaal" %}
This has always worked as it should. Since recently, this is not working anymore.
I had to change it with the "label value" to make it work again for example: % if unit.product_category == "Extra materiaal" %}
Why is my comparison with the internal name not working anymore? How should I change this so I can compare this with my internal name again?
Scherm­afbeelding 2024-09-12 om 17.29.49.png

0 いいね!
2件の返信
Jaycee_Lewis
コミュニティーマネージャー
コミュニティーマネージャー

compare with internal name in stead of label in Quote

Hi @SDays Thanks for your question. I couldn't find any recent support tickets for this issue? Is still happening? Can you share your error messages for this when you switch back to using the internal value? Do you have any additional details or code examples you can share?

 

Thanks! — Jaycee

 

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 いいね!
SDays
メンバー

compare with internal name in stead of label in Quote

This is the ticket: HubSpot Ticket #16309462

 

I don't have an error message when I switch back, I just don't see my line items anymore when I compare with the 'internal name'... 

SO

  • Compare with internal name:
    {% if unit.product_category == "extra_materiaal" %} -> has always worked, but until recently not anymore...
  • Compare with label:
    {% if unit.product_category == "Extra materiaal" %} -> Is working now, but if our customer wants a different label, we have to change the code... 

So if we can compare with the internal name again, the customer can change the label if needed, and the internal name will remain the same and we don't need to change our code again.

How can I do that?Scherm­afbeelding 2024-09-17 om 11.48.17.png

0 いいね!