fix codestyle after review
This commit is contained in:
parent
2b37b796b7
commit
9126e6f6f6
11 changed files with 29 additions and 19 deletions
|
@ -1,3 +1,8 @@
|
|||
<?php
|
||||
$filePath = $_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/intaro.retailcrm/lib/component/payment/retailcrmbonus/.description.php';
|
||||
|
||||
if (file_exists($filePath)) {
|
||||
require_once($filePath);
|
||||
}
|
||||
|
||||
|
||||
require_once($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/intaro.retailcrm/lib/component/payment/retailcrmbonus/.description.php');
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<?php
|
||||
$filePath = $_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/intaro.retailcrm/lib/component/payment/retailcrmbonus/handler.php';
|
||||
|
||||
require_once($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/intaro.retailcrm/lib/component/payment/retailcrmbonus/handler.php');
|
||||
if (file_exists($filePath)) {
|
||||
require_once($filePath);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ class intaro_retailcrm extends CModule
|
|||
public const BONUS_PAY_SYSTEM_NAME = 'Оплата бонусами';
|
||||
public const BONUS_PAY_SYSTEM_CODE = 'retailcrmbonus';
|
||||
public const BONUS_PAY_SYSTEM_DESCRIPTION = 'Оплата бонусами программы лояльности retailCRM';
|
||||
|
||||
/**
|
||||
* @var string[][]
|
||||
*/
|
||||
|
@ -1494,6 +1495,7 @@ class intaro_retailcrm extends CModule
|
|||
public function addLPOrderProps(): void
|
||||
{
|
||||
$persons = PersonTypeRepository::getCollectionByWhere(['ID']);
|
||||
|
||||
foreach ($persons as $person) {
|
||||
$personId = $person->getID();
|
||||
$groupID = $this->getGroupID($personId);
|
||||
|
@ -1519,6 +1521,7 @@ class intaro_retailcrm extends CModule
|
|||
];
|
||||
$obUserField = new CUserTypeEntity;
|
||||
$dbRes = CUserTypeEntity::GetList([], ["FIELD_NAME" => $filedName])->fetch();
|
||||
|
||||
if (!$dbRes['ID']) {
|
||||
$obUserField->Add($arProps);
|
||||
}
|
||||
|
@ -1554,6 +1557,7 @@ class intaro_retailcrm extends CModule
|
|||
'NAME' => self::LP_ORDER_GROUP_NAME,
|
||||
];
|
||||
$result = OrderPropsGroupTable::add($groupFields);
|
||||
|
||||
return $result->getId();
|
||||
}
|
||||
}
|
||||
|
@ -1608,7 +1612,6 @@ class intaro_retailcrm extends CModule
|
|||
])
|
||||
->fetchCollection();
|
||||
|
||||
|
||||
if (count($arrPaySystemAction) === 0) {
|
||||
$data = [
|
||||
'NAME' => self::BONUS_PAY_SYSTEM_NAME,
|
||||
|
@ -1656,6 +1659,7 @@ class intaro_retailcrm extends CModule
|
|||
['to_method', '=', $event['EVENT_NAME'] . 'Handler'],
|
||||
['to_class', '=', EventsHandlers::class],
|
||||
];
|
||||
|
||||
try {
|
||||
$events = ToModuleRepository::getCollectionByWhere($select, $where);
|
||||
if ($events !== null && count($events) === 0) {
|
||||
|
@ -1668,7 +1672,7 @@ class intaro_retailcrm extends CModule
|
|||
);
|
||||
}
|
||||
} catch (ObjectPropertyException | ArgumentException | SystemException $exception) {
|
||||
AddMessage2Log($exception->getMessage(), $this->MODULE_ID);
|
||||
AddMessage2Log($exception->getMessage(), $this->MODULE_ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1679,6 +1683,7 @@ class intaro_retailcrm extends CModule
|
|||
private function deleteLPEvents(): void
|
||||
{
|
||||
$eventManager = EventManager::getInstance();
|
||||
|
||||
foreach (self::SUBSCRIBE_LP_EVENTS as $event){
|
||||
$eventManager->unRegisterEventHandler(
|
||||
$event['FROM_MODULE'],
|
||||
|
|
|
@ -15,9 +15,8 @@ namespace Intaro\RetailCrm\Component\Loyalty;
|
|||
use Bitrix\Main\Event;
|
||||
|
||||
/**
|
||||
* Class ServiceLocator
|
||||
*
|
||||
* @package Intaro\RetailCrm\Component\EventsHandlers
|
||||
* Class EventsHandlers
|
||||
* @package Intaro\RetailCrm\Component\Loyalty
|
||||
*/
|
||||
class EventsHandlers
|
||||
{
|
||||
|
|
|
@ -33,4 +33,4 @@ class RetailCrmBonusHandler extends PaySystem\BaseServiceHandler
|
|||
return [];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
<?
|
||||
<?php
|
||||
$MESS["SALE_HPS_BONUS"] = "retailCRM bonus account";
|
||||
?>
|
|
@ -1,2 +1,2 @@
|
|||
<?
|
||||
$MESS["SALE_HPS_BONUS"] = "бонусный счет retailCRM";
|
||||
<?php
|
||||
$MESS["SALE_HPS_BONUS"] = "бонусный счет retailCRM";
|
||||
|
|
|
@ -18,7 +18,7 @@ use Bitrix\Sale\Internals\OrderPropsTable;
|
|||
use Intaro\RetailCrm\Model\Bitrix\ORM\ToModuleTable;
|
||||
|
||||
/**
|
||||
* Class ToModule
|
||||
* Class OrderProps
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Bitrix
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
* @package Intaro\RetailCrm\Repository
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
|
@ -17,8 +17,7 @@ use Intaro\RetailCrm\Model\Bitrix\OrderProps;
|
|||
|
||||
|
||||
/**
|
||||
* Class RepositoryRepository
|
||||
*
|
||||
* Class OrderPropsRepository
|
||||
* @package Intaro\RetailCrm\Repository
|
||||
*/
|
||||
class OrderPropsRepository extends AbstractRepository
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
* @package Intaro\RetailCrm\Repository
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
|
@ -15,7 +15,7 @@ use Bitrix\Main\Type\Collection;
|
|||
use Bitrix\Sale\Internals\PersonTypeTable;
|
||||
|
||||
/**
|
||||
* Class ToModuleRepository
|
||||
* Class PersonTypeRepository
|
||||
*
|
||||
* @package Intaro\RetailCrm\Repository
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
* @package Intaro\RetailCrm\Repository
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
|
|
Loading…
Add table
Reference in a new issue