Hello all, I would like to append some data to Pro...
# help
c
Hello all, I would like to append some data to ProductAbstractData returned by CatalogClient's search function. Can you please advice me where to look into?
w
You can implement a result formatter Plugin (
\Spryker\Client\SearchExtension\Dependency\Plugin\ResultFormatterPluginInterface
) and add it in the
CatalogDependencyProvider
). There are plenty of implementations of this plugin interface you can use as an example.
c
Thank you very much 🙂
e
shouldnt it be
ProductAbstractMapExpanderPluginInterface
which is added in
\Pyz\Zed\ProductPageSearch\ProductPageSearchDependencyProvider::getProductAbstractMapExpanderPlugins
?
c
@early-art-81990 I guess so. Seems like it depends on what we are trying to do. I am going for MapExpander
w
It really depends. Is it data that is available during document publishing and will also change along when the product is changed? Then Zed is the right place as @early-art-81990 described it. Is it data that comes from the redis and will change independently from the product data and is changed more frequently than the product data (e.g.: availabilities) and does not need to be present in the search to filter by -> Client implementation as I described. As you've asked specificly about the Client part I thought you already figured out it needs to be implemented on clientside, sorry my bad
👍 2
e
makes sense