nop4you wrote:Depend on how and where is it rendered. If you, for example, insert code to the page which is set to "Accessible when store closed" then it would be shown.
Regards,
Tom
Tom, thanks for the reply!
For now, lets focus on the view since I would like to learn and understand how to control the ability to show or hide a view based off of the store closed flag.
I have no special code in the view that I can tell that would allow for it to bypass the store closed setting if set to true.
Can you give me more insight as to what I need to look for (and where if not in the cshtml file) that could be controlling this?
Some additional testing results are below -
I have set some breakpoints in the code within the StoreClosedAttribute.cs to see what's going on, and for some reason the view I've created is not firing it as the home page does (index.cshtml), but rather more along the lines of the Contact Us page.
It seems that my view is returning out of the OnActionExecuting method of the StoreClosedAttribute.cs due to being flagged as a child action (filterContext.IsChildAction == True), or maybe it's just never calling it correctly?
When comparing how my view is calling the StoreClosedAttribute.cs to the home index page, the one glaring difference is how the class is called from each view, or so it seems. The home index page seems to call the class initially from its controller (Nop.Web.Controllers.HomeController) on its first pass through while my view never does this. The subsequent widget calls are made by both pages which kick out on the IsChildAction.
I also checked the Contact Us page to see how it acts, and my page seems to be acting similar to it (it too is visible whenever the store is closed) where no call is being made to the StoreClosedAttribute.cs from its controller. It looks as if something is missing from the controller for my plugin that may control how the StoreClosedAttribute.cs is utilized, or so it seems.
So, with all of that being said, I'll begin to review the controller code to see what may be needed to have this occur. If someone can lead me in the right direction, it would be greatly appreciated!!