I have put together a site with additional views(pages) What I am needing to do is only allow non-logged in accounts to view just the front pages and not get access to the catalog at all without being signed in.
I am using 2.3 and cannot seem to think of the best way to do this
I unsuccessfully tried to apply your idea to the categorynavigation.cshtml which appeared to have the potential to hide the category view from a non-registered user. I realize this is probably not how I was supposed to interpret your suggestion.
When you say at the beginning of the Category Controller, do you mean in the constructors region of the CategoryController.cs file?
Your idea makes a lot of sense, I'm just not sure where to put it exactly.
The Category Controller is in \Presentation\Nop.Web\Controllers\CatalogController.cs. Place it at the beginning of this action: public ActionResult Category(int categoryId, CatalogPagingFilteringModel command) { //place the code here..
Yes, It will work for Nop 4.20 as well. If you want to redirect your customer to login page then use return Challenge(); instead to explicitly mentioning the view. Here is what you have to do,
Yes, It will work for Nop 4.20 as well. If you want to redirect your customer to login page then use return Challenge(); instead to explicitly mentioning the view. Here is what you have to do,
Thank you so much. Your solution resolved my question!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.