Keeping maintainability in mind, how can the developer add the supplier ID to the search?

CORRECT TEXT

An Adobe Commerce developer wants to generate a list of products using ProductRepositoryinterface and search for products using a supplier_id filter for data that is stored in a standalone table (It. not in an EAV attribute).

Keeping maintainability in mind, how can the developer add the supplier ID to the search?
A . Add a custom filter to the virtual type
B . MegentoCatalogmodelApiSearchCriteriaCollectionProfessorProductFilterProcessor for supplier_id field. In the custom filter, apply the needed join and filter to the passed $collection.
C . Write a before plugin on MagentoCotalogModelProductRepository: getlist()and register the search criteria passed. Write an event observer to listen for the event catalog_product_collection_load_before – Iterate through the registered search criteria, and if found, apply the neededjoin and filter to the event’s $collection .
D . Write a before plugin on MagentoFremeworkapiSearchCriteriaCollectionProcessorinterface::process() . Iterate through the $searchCriteria provided for supplier_id, and if found, apply the neededjoin and filler to the passed $collection .

Answer: B

Latest AD0-E709 Dumps Valid Version with 135 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments