I want to create a custom theme for this purpose. Is it possible to create a custom field (which contains translated name) from Inventory Items
instead of using the actual item name inside my invoice?
I used this code to get rid of the column header
{% for column in table.columns %}
{% if column.label == "Item" %}
{% continue %}
{% else %}
<td style="font-weight: bold; color: #ffffff; background-color: #70AD47; border-bottom-width: 5px; border-color: #C5E0B3; padding: 10px; text-align: {{ column.align }}{% if forloop.first %}; padding-left: 30px{% endif %}{% if forloop.last %}; padding-right: 30px{% endif %}{% if column.nowrap %}; width: 80px{% endif %}">{{ column.label }}</td>
{% endif %}
{% endfor %}
but the cells under that column still remain there
edit: update, typos
try to do it yourself @BawarYassin
If you are failed to do so, then write on the Forum and ask for help
1 Like
Alright, so it’s possible. I tried and updated the post as you suggested.
Mark
April 5, 2022, 12:35pm
4
Removing the item code is already answered in this post .
1 Like
Tut
April 5, 2022, 2:03pm
5
Your question is not clear, @BawarYassin . Where do you want the custom field to appear? Why do you not translate the item name in the inventory item definition? What are you actually trying to accomplish?
@BawarYassin , your answer is in this post:
The code fragment was missing the first for loop.
This one should work:
{% assign removedCols = 1 %}
{% for column in table.columns %}
{% if column.label == 'Order number' %}
{% assign j = forloop.index0%}
{% assign removedCols = removedCols | plus: 1 %}
{% continue %}
{% endif%}
<td class="text-{{ column.align }} border-start{% if forloop.last == true %} border-top border-end{% endif %}" style="font-weight: solid;font-size: 8px ;padding: 0.5px; border-botto…
There’s other code included – namely, anything using the variable (i ) – but the concept is the same and you can adapt this method to suit your needs.
2 Likes
I just want to have a custom theme for each language and having all translation in one cell is not desirable, especially if more than two languages.
@Ealfardan Thanks this worked perfectly. But how do I add the custom field
in its place?
edit: Nevermind, I did it by changing the position in custom fields
1 Like