4

We are using Sitecore 9 Update 2 + Sitecore Commerce 9 Update 2.

Search field didn't return any result when I'm trying to add an image to the sellable item. As a key, I use image name. Before that, I republished all site and rebuilt all indexes. enter image description here enter image description here

I heard it's known issue for Commerce team, but didn't found any information about it.

4
  • Did you rebuild indexes? When you search it use sitecore indexes Oct 9, 2018 at 14:16
  • @VladIobagiu, yes I did it. Oct 9, 2018 at 14:28
  • Can you try to search * 153 * . Delete the space between digits and * Oct 9, 2018 at 16:11
  • @VladIobagiu, the same result. But when I search image by name from the content editor it working fine. Oct 10, 2018 at 6:27

2 Answers 2

4

Search in Commerce is using OData Item Service. Except for term, you type in Search dialog, additional filters might be used. Filters are defined by the OData Item API Key. In a default configuration commerce habitat and adventure environments are using

34905B27-5F55-4DF8-B866-B60A1571D2D5

as API key. This item is located in core database and contains filter below:

(Fields/any(f: (f/Name eq 'Extension' and (f/Value eq 'png' or f/Value eq 'jpg'))) and Language eq 'en' and (contains(Path, '/images/adventure') or contains(Path, '/images/habitat'))))

As you can see, the search is done only for images with extensions *.png and *.jpg and only under the habitat and adventure folders.

You should either register your own filter and update environment configuration or, as a fast change, update existing one.

1

I know this question is old but now from XC 9.1, {34905B27-5F55-4DF8-B866-B60A1571D2D5} item is in Master database instead Core database, and other things are the same as stated above. Location is - /sitecore/system/Settings/Services/API Keys/CommerceMediaItemsODataAPIKey

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.