Speak to our experts today 0333 004 0333
Speak to one of our experts today
User Guides

EKM Tag: [ekm:customer_logged_in]

The ekm:customer_logged_in tag is a standalone logic statement that serves one purpose, determining whether or not the current visitor is logged in to the EKM using the customer login area.

  • Tag Information
  • Nesting This Tag
Basic Use
This tests whether or not the current visitor is logged into your EKM shop.

[ekm:customer_logged_in]
    logged_in='You are currently logged in';
    logged_out='You are currently not logged in';
[/ekm:customer_logged_in]
                                
This would return True and would output...
You are currently logged in
Tag Attributes
Logged In
logged_in='You are currently logged in';

You can specify any HTML or Text you wish to output when the customer is logged in. There are a number of attribute tags you can use within this attribute to make the message personal to the customer viewing.

Value
Description
{user defined}
Enter your own HTML or Text to be displayed when the customer is logged in.

Within in attribute you can use a number of attribute tags to output customer related information and links.

Value
Description
[customer-name]
Outputs the name of the customer currently logged in.
[view-orders]
Outputs a link that can be clicked to take customers to the "View Orders" page.
[view-orders-url]
Outputs just the URI path to the view orders page. This can used if you want to change the text on "View Orders"
[logout]
Outputs a link that can be clicked to logout customers.
[logout-url]
Outputs just the URI path to the logout page. Useful if you wish to change the text on a logout link.
Logged Out
logged_out='You are currently logged out';

You can specify your own HTML or Text to be displayed when the customer is logged out.

Value
Description
{user defined}
Enter your own HTML or Text to be displayed when the customer is logged out.

The EKM system allows for some tags to be nested within other tags.

Nesting This Tag

When nesting this tag need to prepend the open and close tags with nested_ and change all single quotes ' to double quotes "

This example allows you to only show the price to customers who are logged in and ONLY the RRP to those logged out.


[ekm:showdata]
    ...
    output_item='<li class="

        [ekm:nested_customer_logged_in]
            logged_in="[price][rrp]";
            logged_out="[rrp]";
        [/ekm:nested_customer_logged_in]

    ">[name]</li>';
    ...
[/ekm:showdata]