I need to send a request from the front office admin URL: https://asd.local/admin123123/index.php?controller=AdminKbProductApprovalList.
The solution I found is using $this->context->link->getLegacyAdminLink(‘AdminKbProductApprovalList’, false). This generates the correct URL, but I’m encountering the following error:
Warning: Use of undefined constant PS_ADMIN_DIR – assumed ‘PS_ADMIN_DIR’ (this will throw an Error in a future version of PHP) in /home/name/projects/asd.local/classes/Link.php on line 906.
How can I fix this?
Tape JIka is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.