on ‎2018 May 02 1:43 PM
Hello Experts,
Our requirement is we have to restrict the price from the User,After login only we have show case the price.How to restrict this,any OOB is their for this,please suggest me,please share your tips.Thank you..
Sindhu
Request clarification before answering.
Hello Sindhu,
you could wrap the html regarding the display of the price in the productDetailsPanel.tag-file with a -Tag like this:
<sec:authorize access="!hasAnyRole('ROLE_ANONYMOUS')">
<div>price</div>
</sec:authorize>
This will prevent anyone with the anonymous role to see the price
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sindhu,
You can wrap the Price Component in a BTG Segment.
The Segment will only show if the User is not Anonymous.
Or else create a new UserGroup, called something like HidePrice
Add the Anonymous user to this group.
Then set the segment to hide if the User is a member of HidePrice usergroup.
Regards,
Luke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sindhu,
OOB do not have such option. But we have similar requirement in our project. but we are showing the price for anonymous customer. We are not allowing customer to add a product as anonymous customer. on Add To cart method. it will call controller. we implemented a @Require Hard Login.
if you dont want to display then you might need to add a check in the code with the anonomous user.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 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.