mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-04 04:03:16 +03:00
30 lines
803 B
PHP
30 lines
803 B
PHP
|
<?php
|
||
|
/**
|
||
|
* @author Retail Driver LCC
|
||
|
* @copyright RetailCRM
|
||
|
* @license GPL
|
||
|
* @version 2.2.0
|
||
|
* @link https://retailcrm.ru
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
$_SERVER['HTTPS'] = 1;
|
||
|
|
||
|
require(dirname(__FILE__) . '/../../../config/config.inc.php');
|
||
|
require(dirname(__FILE__) . '/../../../init.php');
|
||
|
require(dirname(__FILE__) . '/../bootstrap.php');
|
||
|
|
||
|
$apiUrl = Configuration::get('RETAILCRM_ADDRESS');
|
||
|
$apiKey = Configuration::get('RETAILCRM_API_TOKEN');
|
||
|
$apiVersion = Configuration::get('RETAILCRM_API_VERSION');
|
||
|
|
||
|
|
||
|
if (!empty($apiUrl) && !empty($apiKey)) {
|
||
|
RetailcrmInventories::$api = new RetailcrmProxy($apiUrl, $apiKey, _PS_ROOT_DIR_ . '/retailcrm.log', $apiVersion);
|
||
|
} else {
|
||
|
error_log('inventories: set api key & url first', 3, _PS_ROOT_DIR_ . '/retailcrm.log');
|
||
|
exit();
|
||
|
}
|
||
|
|
||
|
RetailcrmInventories::load_stocks();
|