Answer the question
In order to leave comments, you need to log in
How to push goods into Bitrix (store) with minimal effort?
How to fill a fresh (empty) Bitrix store with available products using Python? It is possible directly to the database, but I did not find the description of the tables (in the docks they want all APIs to be used, but everything is confusing there). I saw a lib for Bitrix24, but I didn’t find it for the usual one. Is there anything as convenient as for WooCommerce? In order not to dive deep and not understand php. And what other solution can you advise from experience ...
Answer the question
In order to leave comments, you need to log in
It is better to really access the database through the API. Bitrixoids were directly banned by some fraud. That is, you will connect to the database, but you won’t be able to make requests from python.
Through the API, in fact, it is done in a few lines:
To begin with, inherit the class that will make requests from Entity\DataManager.
Then, in the constructor write:
$connect = Application::getConnection();
$this->connect = $connect;
$sqlHelper = $connect->getSqlHelper();
$sql = "ВАШ ЗАПРОС;";
$recordset = $this->connect->query($sql);
while ($record = $recordset->fetch(\Bitrix\Main\Text\Converter::getHtmlConverter()))
{
$data[] = $record;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question