To be honest, the correct answer is $this->request->get['route']; .
To catch the current route, you can use $this->request->get['route']; in the catalog/controller/common/header.php file in the index() function. Header.php is part of almost any output interface (as I understand it, right now you donβt know which controller is used in http://example.com/desktops , so you need a place where you can run your code anyway).
The SEO module does not cancel this part of the request object. Also keep in mind that in the middle of generating OpenCart code, the $_GET array and the $this->request->get array are not the same. You will not catch the current route (in the "path / controller / action" format) in the $ _GET superglobal php array when the SEO module is in action, but you can catch it with any controller using the $this->request->get array, which is prepared for you by the OpenCart engine.
source share