0

I am using Sitecore 9.0.1 with SXA 1.7 .we have a requirement that the filter values should get displayed in chinese language.

I have created a template with field color and data type multiroot tree list enter image description here

I have changed the display names of the color items to chinese and selected those items in my data folder.

enter image description here

but in the frontend dropdown i am able to see the Item Id's which is splitted into multiple parts

enter image description here

Workaround on Gatogordo's suggestion:

I added the below code in Sitecore.XA.Foundation.Search.Solr.config

<field fieldName="color_sm"
                    type="Sitecore.XA.Foundation.Search.ComputedFields.ResolvedLinks, Sitecore.XA.Foundation.Search" referenceField="Color" contentField="color"/>

This is my fruit template: enter image description here

This is my color template: enter image description here

Facet details

enter image description here

This is my dropdown filter: enter image description here

This is the result i am getting now:

enter image description here

2nd round workaround

Fruit template

enter image description here

Color template:

enter image description here

Facet details:

enter image description here

Colors:

enter image description here

Config change:

 <field fieldName="colortext" type="Sitecore.XA.Foundation.Search.ComputedFields.ResolvedLinks, Sitecore.XA.Foundation.Search" 
                                   referenceField="color" contentField="Color"/>

Current result:

enter image description here

After removing the fields from the template i m getting the below result:

enter image description here

Solr Data:

enter image description here

Can anyone please help how can i achieve the chinese data under my dropdown.

Thanks

5
0

You should change your configuration as:

<field fieldName="colortext" type="Sitecore.XA.Foundation.Search.ComputedFields.ResolvedLinks, Sitecore.XA.Foundation.Search" referenceField="color" contentField="Color"/>

After doing so, don't forget to rebuild the SXA indexes and verify that you now have a field "colortext" which has the values of the colors (not the guids).

Then you change the fieldname in the facet to be "colortext". I've had situations where I had to use the exact index name including the suffix (so like colortext_sm), so if it doesn't work try that...

But step 1 is to make sure you have the values in the index.

8
  • I added colortext field to my color template and changed the color field to colortext in fruit template ,changed the facet fieldname and added the above configuration but i am able to see only 2 colors in my dropdown other colors are not showing
    – Vinaya
    Apr 13 at 10:46
  • I have updated my work around please suggest where i am going wrong @Gatogordo
    – Vinaya
    Apr 13 at 10:59
  • You don't have to change the name of your field or add other fields.. that's the whole trick. You only add a field to your index, not to Sitecore.
    – Gatogordo
    Apr 13 at 11:35
  • i removed the added fields from the template and just kept the configuration and the facet name to "colortext" but still i m getting the item ID and for only one item it is showing the color name updated in the last screenshot @Gatogordo
    – Vinaya
    Apr 13 at 13:53
  • Did you rebuild the index and verify in solr that the colortext field is correctly filled?
    – Gatogordo
    Apr 13 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.