Checking if you are in admin or customer area
page last edited on 22 November 2018
If you need to check whether you are in admin area or in customer one, use the following method:
It is particularly useful, if you need to perform this check in a model class or any other zone-independent one. The method is defined in
\XLite class and it will return
admin.php script was called, or
cart.php one was.
Help make this document better
This guide, as well as the rest of our docs, are open-source and available on GitHub.