In the template that shows an order from the hash in the URL (via the {exp:store:orders} tag), I want to check if the order was placed by a registered member or not. If it wasn't placed by a registered member, then I want to show a message suggesting that they register to keep all their orders together.

My first thought was to see if the order has an associated {username}, and show the message if not. However, it seems like {username} doesn't work inside `{exp:store:orders} tags, despite the docs claiming they do.

The only other thing I can think of is to pass the {order_email} field, which does work, on to some other tag that searches through members:

{exp:memberlist:fictional_tag search:email="{order_email}"}
    {if no_results}
    {!-- Order placed by non-member; show 'Consider Registering' message --}

As you may have guessed, such a tag does not appear to exist as far as I can tell.

Is there any other way to see if an order was placed by a registered member?

1 Answer 1


You can use the member_id tag to see if the user is a member or not. Logged in members will have a their member_id while guest members will return 0.

{exp:store:orders order_hash="{segment_3}"} {if member_id == 0} Create an account to keep all orders {/if} {/exp:store:orders}

  • Great, thanks. So looks like the documentation is lacking in addition to being misleading. :-/ I hope Exp:resso and DevDemon sort this out once the transition is complete.
    – Sandwich
    Dec 26, 2014 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.