V
V
Vladislav Aleinikov2020-08-26 13:04:38
1C-Bitrix
Vladislav Aleinikov, 2020-08-26 13:04:38

Automatic installation of the marketplace module?

You need to write code that installs the module without human intervention.
This is for autotests. For example, at the end you can write something like:

if (!\Bitrix\Main\Loader::includeModule("mymodule"))
{
   \Bitrix\Main\Diag\Debug::dumpToFile('mymodule не установлен!',"","mymodule _module.log");
   return false;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Aleinikov, 2020-08-26
@va_rabbit

I managed to solve it using the DoInstall() method from the module.

if(@file_exists($DOCUMENT_ROOT."/local/modules/mymodule/install/index.php"))
{
 include_once($DOCUMENT_ROOT."/local/modules/mymodule/install/index.php");
 $obModule = new mymodule;
 $obModule->DoInstall();
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question