Search code examples
sap-commerce-cloudflexible-search

Hybris OOTB ProductService can't find an existing product


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?


Solution

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

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