mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-01 19:03:14 +03:00
parent
05e332ce76
commit
c531f9b124
@ -1,3 +1,6 @@
|
|||||||
|
## v3.6.0
|
||||||
|
* Добавлена поддержка PrestaShop 1.7.8.10
|
||||||
|
|
||||||
## v3.5.8
|
## v3.5.8
|
||||||
* Реализована передача характеристик товара в ICML каталог
|
* Реализована передача характеристик товара в ICML каталог
|
||||||
|
|
||||||
|
@ -1890,10 +1890,7 @@ class RetailcrmHistory
|
|||||||
|
|
||||||
private static function getPrestashopOutOfStockStatusFromModuleConfig(array $crmOrder)
|
private static function getPrestashopOutOfStockStatusFromModuleConfig(array $crmOrder)
|
||||||
{
|
{
|
||||||
$statusArray = json_decode(
|
$statusArray = json_decode(Configuration::get(RetailCRM::OUT_OF_STOCK_STATUS), true);
|
||||||
Configuration::get(RetailCRM::OUT_OF_STOCK_STATUS),
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!empty($crmOrder['fullPaidAt'])) {
|
if (!empty($crmOrder['fullPaidAt'])) {
|
||||||
return $statusArray['out_of_stock_paid'];
|
return $statusArray['out_of_stock_paid'];
|
||||||
|
@ -55,9 +55,9 @@ class RetailcrmJobManagerException extends Exception
|
|||||||
* @param string $job
|
* @param string $job
|
||||||
* @param array $jobs
|
* @param array $jobs
|
||||||
* @param int $code
|
* @param int $code
|
||||||
* @param \Exception|null $previous
|
* @param $previous
|
||||||
*/
|
*/
|
||||||
public function __construct($message = '', $job = '', $jobs = [], $code = 0, Exception $previous = null)
|
public function __construct($message = '', $job = '', $jobs = [], $code = 0, $previous = null)
|
||||||
{
|
{
|
||||||
parent::__construct($message, $code, $previous);
|
parent::__construct($message, $code, $previous);
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ require_once dirname(__FILE__) . '/bootstrap.php';
|
|||||||
|
|
||||||
class RetailCRM extends Module
|
class RetailCRM extends Module
|
||||||
{
|
{
|
||||||
const VERSION = '3.5.8';
|
const VERSION = '3.6.0';
|
||||||
|
|
||||||
const API_URL = 'RETAILCRM_ADDRESS';
|
const API_URL = 'RETAILCRM_ADDRESS';
|
||||||
const API_KEY = 'RETAILCRM_API_TOKEN';
|
const API_KEY = 'RETAILCRM_API_TOKEN';
|
||||||
@ -387,32 +387,34 @@ class RetailCRM extends Module
|
|||||||
|
|
||||||
public function installDB()
|
public function installDB()
|
||||||
{
|
{
|
||||||
return Db::getInstance()->execute(
|
$resultQuery1 = Db::getInstance()->execute(
|
||||||
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'retailcrm_abandonedcarts` (
|
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'retailcrm_abandonedcarts` (
|
||||||
`id_cart` INT UNSIGNED UNIQUE NOT NULL,
|
`id_cart` INT UNSIGNED UNIQUE NOT NULL,
|
||||||
`last_uploaded` DATETIME,
|
`last_uploaded` DATETIME,
|
||||||
FOREIGN KEY (id_cart) REFERENCES ' . _DB_PREFIX_ . 'cart (id_cart)
|
FOREIGN KEY (id_cart) REFERENCES `' . _DB_PREFIX_ . 'cart` (`id_cart`)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
ON UPDATE CASCADE
|
ON UPDATE CASCADE
|
||||||
) DEFAULT CHARSET=utf8;
|
) DEFAULT CHARSET=utf8;');
|
||||||
|
|
||||||
|
$resultQuery2 = Db::getInstance()->execute('
|
||||||
CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'retailcrm_exported_orders` (
|
CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'retailcrm_exported_orders` (
|
||||||
`id_order` INT UNSIGNED UNIQUE NULL,
|
`id_order` INT UNSIGNED UNIQUE NULL,
|
||||||
`id_order_crm` INT UNSIGNED UNIQUE NULL,
|
`id_order_crm` INT UNSIGNED UNIQUE NULL,
|
||||||
`errors` TEXT NULL,
|
`errors` TEXT NULL,
|
||||||
`last_uploaded` DATETIME,
|
`last_uploaded` DATETIME,
|
||||||
FOREIGN KEY (id_order) REFERENCES ' . _DB_PREFIX_ . 'orders (id_order)
|
FOREIGN KEY (id_order) REFERENCES `' . _DB_PREFIX_ . 'orders` (`id_order`)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
ON UPDATE CASCADE
|
ON UPDATE CASCADE
|
||||||
) DEFAULT CHARSET=utf8;'
|
) DEFAULT CHARSET=utf8;'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return $resultQuery1 && $resultQuery2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function uninstallDB()
|
public function uninstallDB()
|
||||||
{
|
{
|
||||||
return Db::getInstance()->execute(
|
return Db::getInstance()->execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'retailcrm_abandonedcarts`')
|
||||||
'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'retailcrm_abandonedcarts`;
|
&& Db::getInstance()->execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'retailcrm_exported_orders`');
|
||||||
DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'retailcrm_exported_orders`;'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
0
upgrade/upgrade-build
Executable file → Normal file
0
upgrade/upgrade-build
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user