Conditional price display
Hi.
Using the ecommerce module, is there a way to only display product prices when the user has logged on? So, when logged off, the user will see product listings along with product details but they need to log on to see the pricing. Is that possible?
Also, is it possible to show 2 prices for the product. One would be the list price and the second would be the price the logged on user will pay. Depending on the category of the user, the price they pay can be different than what another user pays. Can we do that with the ecommerce module?
Thanks and regards,
Ross.
Hello Ross,
You can achieve that by "playing" with widget`s permissions.
I advise you to place two widgets, one of the widget to be visible only for authenticated users, and the other anonymous users. Create a separate template for anonymous users and delete the price from it.
Note that the administrators will see both widgets as they cannot be restricted.
Another option is to somehow perform a check if the user is authenticated or not and then display the price, but requires more coding than the approach with two widgets.
Here is a video how I managed to do it.
Hope this helps.
Regards,
Vassil Vassilev
Telerik