Toplam Gönderi:
3
Karma:
15
Katılım:
9.06.2017
yer:
India
Hi, I have different custom customer role created and assigned to different customers. What I would like to have, is to show the logged in user the current role he is assigned to, I tried following by editing Views\Common\HeaderLinks.cshtml <li><a href="@Url.RouteUrl("CustomerInfo")" class="ico-account">@T("Admin.Customers.CustomerRoles.Fields.Name")</a></li> no luck the header display text as 'Name' Regards Praveen
Toplam Gönderi:
3
Karma:
15
Katılım:
9.06.2017
yer:
India
thank you soo much , worked like charm.
Toplam Gönderi:
2
Karma:
10
Katılım:
29.06.2013
yer:
Poland
Hi, Above solution is working for roles Administrators and Registered by why it dosn't work for "Forum Moderators" or "Custom role" created in admin area @if (EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.IsInCustomerRole("Administrators")) { <span>Administrators</span> //this work fine } @if (EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.IsInCustomerRole("Forum Moderators")) { <span>Forum Moderators</span> //this doesn't work } @if (EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.IsInCustomerRole("Custom role")) { <span>Custom role</span> //this doesn't work } @if (EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.IsInCustomerRole("Registered")) { <span>Registered</span> //this work fine }
Toplam Gönderi:
2
Karma:
10
Katılım:
29.06.2013
yer:
Poland
It wasn't show up becouse I didn't define "System name" in CustomerRole