Hybris OOTB ProductService can't find an existing product

480 Views Asked by At

I have several products registered in Backoffice, If I perform a flexible search query directly from HAC I can see any of them, however, If I use ProductService#getProductForCode that performs the same query as I do it doesn't find any products. How is that possible?

1

There are 1 best solutions below

0
On BEST ANSWER

You can try disable search restriction before you call productService#getProductForCode

import de.hybris.platform.search.restriction.SearchRestrictionService;
......
searchRestrictionService.disableSearchRestrictions();