cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Restrict product group to b2b customer group

Former Member
0 Likes
836

Hi Team,

We have a requirement to restrict Products Group to only certain Customer Groups, to ensure only certain customers can access restricted Products. On website products are coming from solr on advance search and from Hybris on PDP page. For front end we have AEM integrated with Hybris (not using Hybris WCMS/JSP part, dealing with OCC calls only). Request to Please share your inputs to implement this scenario. (Using Hybris 5.4)

Thanks in advance, Jasapriya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi : there can be a better approach, but I would write a value providers, to send b2bcustomergroup data to solr. Should be multivalued field.

Once the values are in solr, I will fetch the b2busergroup via b2bUserService and send that value to solr and fetch the products that belong to the b2bcustomergroup that I am sending.

so, if someone searches for a screwdriver, my query to solr would be. Search products where text equals 'screwdriver' and b2bcustomergroup as b2bUserService.getCurrentUser().getUserGroups() and sort by relevance.

Hope that helps, Go through solr documentation on how to send a multivalue attribute in solr query. Or go through solrfacetsearch documentation on help.hybris.com for more info

If you still need more info, drop me an email at saurabh24grover@gmail.com