3namespace Bitrix\Catalog\Controller;
7use Bitrix\Rest\Event\EventBindInterface;
8use Bitrix\Rest\RestException;
21 private const USER_GROUP_ADMINS = 1;
22 private const USER_GROUP_ALL_USERS = 2;
35 $fields[
'USER_GROUP'] =
$fields[
'USER_GROUP_BUY'] = [self::USER_GROUP_ADMINS, self::USER_GROUP_ALL_USERS];
46 $this->addError(
new Error(
'Error adding price type'));
61 $existsResult = $this->
exists($id);
62 if (!$existsResult->isSuccess())
64 $this->addErrors($existsResult->getErrors());
80 $this->addError(
new Error(
'Error updating price type'));
94 $existsResult = $this->
exists($id);
95 if (!$existsResult->isSuccess())
97 $this->addErrors($existsResult->getErrors());
113 $this->addError(
new Error(
'Error deleting price type'));
150 return new \Bitrix\Catalog\GroupTable();
159 self::EVENT_ON_ADD =>
$entity->getModule().
'.price.type.on.add',
160 self::EVENT_ON_UPDATE =>
$entity->getModule().
'.price.type.on.update',
161 self::EVENT_ON_DELETE =>
$entity->getModule().
'.price.type.on.delete',
170 return [self::class,
'processItemEvent'];
183 throw new RestException(
'id not found trying to process event');
const PRICE_TYPE_ENTITY_NOT_EXISTS
static getCallbackRestEvent()
getErrorCodeEntityNotExists()
updateAction(int $id, array $fields)
static processItemEvent(array $params, array $handler)
static Update($ID, $arFields)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']