-3

I hope to receive some information here on the following subject:

calling this function:

protected function getAdminDirectory()
{
    return str_replace(HTTP_SERVER, '', HTTP_ADMIN);
}

ends in this php statement:

PHP Notice: Use of undefined constant HTTP_ADMIN - assumed 'HTTP_ADMIN' in /xx/xxx/xxx/www/catalog/controller/payment/mollie_ideal.php on line 452

This statements seems to retrieve the admin directory but the constant is undefined, I'm uncertain on where to define it there for my question would be if I could make this static since the directory is known.

If so how would it look like?

{
    return str_replace(HTTP_SERVER, 'admin', admin);
}

Using opencart 2.0.1.1 and Mollie version 5.2.6 https://github.com/mollie/OpenCart/releases

Thank you in advanced.

uniqueHH
  • 1
  • 2
  • 6
  • defined admin in the config file, seems to have done the trick. – uniqueHH Feb 18 '15 at 13:08
  • There is no such constant as `HTTP_ADMIN` in OpenCart. I am not even following what are trying to achieve. – shadyyx Feb 19 '15 at 08:17
  • This is not what I am trying to achieve, it is what an external module, programmed for OpenCart and the version I am using is trying to achive, if you read again that is my entire question...since it is not exactly defined! However i've set HTTP_ADMIN directly to the administration diretory and if you see above your not helpful comment it's already resolved ;). – uniqueHH Feb 19 '15 at 15:29

2 Answers2

0

You should add an admin directory directive in your config.php file.

define('HTTP_ADMIN', 'http://xxxx.xx/admindirectory/'); (usually just admin/)

0

For anyone else having this problem:

 */
protected function getAdminDirectory()
{
    // if no default admin url defined in the config, use the default admin directory.
    if (!defined('HTTP_ADMIN'))
    {
        return 'admindirectory/';
    }

    return str_replace(HTTP_SERVER, '', HTTP_ADMIN);
}

in catalog/controller/payment/mollie_ideal.php

uniqueHH
  • 1
  • 2
  • 6