Sunday, January 16, 2022

[FIXED] Shopware 5 - Column name not changing via snippet

Issue

I have created a Free text field in s_articles_attributes table and also marked it as translatable, when i am viewing items > overview and enabling that column, the column name isn't changed to what i put in snippet.

Does anybody know how can i make it translate according to my snippet. I thought it should be straightforward. or is there something extra i should be doing?

enter image description here

enter image description here

enter image description here


Solution

The snippets for attributes need to follow a special scheme.

  • First of all the snippet itself needs to be in the namespace backend/attribute_columns
  • Then the naming of the snippet key is important:
    • for labels: <attbribute_table>_<attribute_name>_label
    • for support texts: <attbribute_table>_<attribute_name>_supportText
    • for help texts: <attbribute_table>_<attribute_name>_helpText

So for your case the snippet key has to look like this: s_articles_attributes_warehouse_us_label. Also don't forget to create it in the right namespace.

You can find more about this in our documentation: https://developers.shopware.com/developers-guide/attribute-system/#attribute-label-translations



Answered By - Michael T

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.