Disable Search Restriction in Hybris

import de.hybris.platform.search.restriction.SearchRestrictionService;
Define attributes
private SessionService sessionService; private SearchRestrictionService searchRestrictionService;
Create getter & setters for the above services.
Here I am trying to disable the search restriction for category related query
Collection = getSessionService().executeInLocalView(new SessionExecutionBody() { @Override public Collection execute() { try { getSearchRestrictionService().disableSearchRestrictions(); return getCategoryDao().findCategoriesByCode(code); } finally { getSearchRestrictionService().enableSearchRestrictions(); } } });

Comments

Popular posts from this blog

How to export product data from Hybris Apparel Store to csv?

A day of Blessings!!!!!!!!!