is there a way to Check if logged in through the Root.cshtml nop 2.3
if the visitor is logged in I will display a different menu than if they are not logged in.
@{
using Nop.Core;
using Nop.Core.Infrastructure;
using Nop.Services.Customers;
bool isRegistered = EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.IsRegistered();
}
var isRegisterCustomer = customerService.IsRegistered(workContext.CurrentCustomer);
@using Nop.Core
@using Nop.Services.Customers
@inject IWorkContext workContext
@inject ICustomerService customerService