VirtoCommerce/vc-module-catalog

Allows to search product variations

tatarincev opened this issue · 3 comments

The new SearchCriteria.MainProductId property has been added to allow search withing variations of concrete product. Need to extends https://github.com/VirtoCommerce/vc-module-catalog/blob/dev/VirtoCommerce.CatalogModule.Data/Services/CatalogSearchServiceImpl.cs to handle this new criteria property to search product variations.

Released https://github.com/VirtoCommerce/vc-module-catalog/releases/tag/v2.23.19
Use this API and request data for search product variations POST api/catalog/search
{ MainProductId = '123', Take = 20 }

The default products indexation process has been extended with indexation of product variations. This allows to perform indexed search within product variations.

Example of request that's search variations for product with Id = "f9330eb5ed78427abb4dc4089bc37d9f"

POST http://localhost/admin/api/catalog/search/products

{ 
"storeId": "Electronics", 
"withHidden": true, 
"terms": ["is:variation", "mainproductid:f9330eb5ed78427abb4dc4089bc37d9f" ], 
"sort":"name:asc",
"skip":0,
"take":5
}