Команда nopCommerce расширяется и приглашает на работу первоклассных .NET разработчиков, маркетологов и менеджеров по продажам.

Show "you are not logged in" if user is guest

один месяц назад
i want to show some welcome text if user is guest or if he is registered then show another text

i am not good in C# programming, so i don't really know how to do it

i need something like this

@if user role "guest" {
       <p class="not-logged">You are not logged in and that is why you may not see secret information!</p>
} and @if user role "registered" {
       <p class="logged-in">You are logged in and here is your secret information!</p>

may you tell me how to achieve this?

thank you so much
один месяц назад
You can configure homepage text from topic HomePageText (Admin > Content Management > Topics ) topic.
But here you can't set text guest and registered user wise.

So you can create two different topic for guest and registed user and configure your message.
After that you've to set ACL - Limited to Customer Role
and add both topic line in Views > Home > Index.cshtml

Hope this will helps you.
один месяц назад
rajupaladiya wrote:
Hope this will helps you.

thank you so much! It is a great idea! i will use it later when need this.

but I need to show some text in the HEADER part of my site and in the FOOTER.

so something like i wrote. like if user role is registered then i show some text to him

how to do this in code, please? thanks
3 недели назад
Also you simple modify view pages and add content based on current customer's role