on ‎2018 Dec 13 11:37 AM
Hi All,
(B2B site) We have requirement that customer should be able to see only few specified products(not all).
This applies to all the customer. Every customer will have different products
How to achieve this in Hybris latest version.
Main question is how to restrict customer in Solr to view only his products and not all products.
Request clarification before answering.
Hi Ansari,
As you have mentioned B2B SIte which will be more focused on B2BUnit instead B2BCustomer so you should create many to many mapping between Product and B2BUnit. If Products should be accessible to particular B2BCustomer then create mapping between Product and Principal. Afterwards you have to index these B2BUnit OR B2BCustomers in SOLR against each Product. Also you have to add code to tweak product accessibility for all Product Pages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It requires extending your-product model to add an attribute of type, principal. This attribute will hold the required customers to which the product should be visible. The next step would be to add this attribute to be indexed by Solr. Finally, you can process the data from Solr and display the products applicable for the logged in customer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I hope you have added the allowedCustomers as a SolrIndexedProperty in solr.impex. The next step is to write the value resolver for it. You can refer to https://wiki.hybris.com/pages/viewpage.action?pageId=294094315 and https://help.hybris.com/1811/hcd/8c7dea5386691014aceaa6b5ab3e31b9.html for hints.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.