Elasticsuite: Can't add short_description in autocomplete results

Created on 14 Jun 2018  路  3Comments  路  Source: Smile-SA/elasticsuite

Preconditions


Magento Version : 2.2.3


ElasticSuite Version : 2.5


Environment : Developer


Third party modules :

Steps to reproduce

  1. Go to Attributes config form for "short_description"
  2. Look for "is_displayed_in_autocomplete" field

Expected result

  1. Possibility to add this attribute to additionnals attributes that can be shown in the autocomplete template with the "is_displayed_in_autocomplete" field

Actual result

  1. the field "is_displayed_in_autocomplete" is not visible because it depends on the field "is_filterable_in_search" wish is a strange behavior.

Did I missed something?

Most helpful comment

Great!

You have an error in the code snippe , I had to add xsi:type="string" on the item tag (otherwise it will throw an error)

<type name="Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\AttributeConfig">
    <arguments>
            <argument name="additionalSelectedAttributes" xsi:type="array">
                <item name="short_description" xsi:type="string">short_description</item>
            </argument>
    </arguments>
</type>

Thank you!

All 3 comments

Fear that you don't really undestand the purpose of this settings.

It allow to suggest attribute valuesin autocomplete.
In the following screenshot attribute material and color have been set to "is_displayed_in_autocomplete" :

capture d ecran 2018-06-15 a 10 01 30

Having the short description suggested this way is a non sense and it seems that you want to be able to use short_description in the product template instead.

To do it you should add the short description to the Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\AttributeConfig.
You can do it by creating a etc/frontend/di.xml file in your own module / namespace with the following content :

<type name="Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\AttributeConfig">
    <arguments>
            <argument name="additionalSelectedAttributes" xsi:type="array">
                <item name="short_description">short_description</item>
            </argument>
    </arguments>
</type>

Think this issue can be closed because of the above response.

Great!

You have an error in the code snippe , I had to add xsi:type="string" on the item tag (otherwise it will throw an error)

<type name="Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\AttributeConfig">
    <arguments>
            <argument name="additionalSelectedAttributes" xsi:type="array">
                <item name="short_description" xsi:type="string">short_description</item>
            </argument>
    </arguments>
</type>

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markdimi picture markdimi  路  4Comments

sdasun picture sdasun  路  4Comments

emirajbbd picture emirajbbd  路  3Comments

rvitaliy picture rvitaliy  路  3Comments

ghost picture ghost  路  4Comments