23 Internals\OrderRulesTable::clearByOrder($order);
24 Internals\OrderDiscountDataTable::clearByOrder($order);
25 Internals\OrderRoundTable::clearByOrder($order);
50 return parent::validateCoupon($fields);
63 return Internals\DiscountTable::getList($parameters);
78 return Internals\DiscountCouponTable::isValidCouponType($type);
93 return Internals\OrderDiscountTable::getList($parameters);
104 return Internals\OrderDiscountTable::add($fields);
115 return Internals\OrderDiscountTable::getEmptyFields($fields);
126 $result = Internals\OrderDiscountTable::prepareDiscountData($rawFields);
127 return (is_array($result) ? $result :
null);
138 $hash = Internals\OrderDiscountTable::calculateHash($fields);
139 return ($hash ===
false ?
null : $hash);
154 return Internals\OrderCouponsTable::getList($parameters);
165 return Internals\OrderCouponsTable::add($fields);
178 return Internals\OrderModulesTable::getList($parameters);
192 $resultModule = Internals\OrderModulesTable::saveOrderDiscountModules(
198 Internals\OrderDiscountTable::clearList($orderDiscountId);
201 unset($resultModule);
219 $discountClassName = static::getDiscountClassName();
223 case $discountClassName::ENTITY_BASKET_ITEM:
224 $result = Internals\OrderRulesTable::ENTITY_TYPE_BASKET_ITEM;
226 case $discountClassName::ENTITY_DELIVERY:
227 $result = Internals\OrderRulesTable::ENTITY_TYPE_DELIVERY;
231 unset($discountClassName);
247 $discountClassName = static::getDiscountClassName();
251 case Internals\OrderRulesTable::ENTITY_TYPE_BASKET_ITEM:
252 $result = $discountClassName::ENTITY_BASKET_ITEM;
254 case Internals\OrderRulesTable::ENTITY_TYPE_DELIVERY:
255 $result = $discountClassName::ENTITY_DELIVERY;
259 unset($discountClassName);
270 if (!isset($parameters[
'select']))
271 $parameters[
'select'] = [
'*',
'RULE_DESCR' =>
'DESCR.DESCR',
'RULE_DESCR_ID' =>
'DESCR.ID'];
272 if (!isset($parameters[
'order']))
273 $parameters[
'order'] = [
'ID' =>
'ASC'];
274 return Internals\OrderRulesTable::getList($parameters);
283 return Internals\OrderRulesDescrTable::getList($parameters);
293 return Internals\OrderRulesTable::getTableName();
303 return Internals\OrderRulesDescrTable::getTableName();
314 $fields = array_intersect_key($fields, Internals\OrderRulesTable::getEntity()->getScalarFields());
315 return (!empty($fields) ? $fields :
null);
326 $fields = array_intersect_key($fields, Internals\OrderRulesDescrTable::getEntity()->getScalarFields());
327 return (!empty($fields) ? $fields :
null);
338 return Internals\OrderRulesTable::add($fields);
349 return Internals\OrderRulesDescrTable::add($fields);
361 return Internals\OrderRulesTable::update($id, $fields);
373 return Internals\OrderRulesDescrTable::update($id, $fields);
391 $discountClassName = static::getDiscountClassName();
395 case $discountClassName::ENTITY_BASKET_ITEM:
396 $result = Internals\OrderRoundTable::ENTITY_TYPE_BASKET_ITEM;
400 unset($discountClassName);
416 $discountClassName = static::getDiscountClassName();
420 case Internals\OrderRoundTable::ENTITY_TYPE_BASKET_ITEM:
421 $result = $discountClassName::ENTITY_BASKET_ITEM;
425 unset($discountClassName);
436 if (empty($parameters[
'select']))
437 $parameters[
'select'] = [
'*'];
438 return Internals\OrderRoundTable::getList($parameters);
449 return Internals\OrderRoundTable::add($fields);
461 return Internals\OrderRoundTable::update($id, $fields);
471 return Internals\OrderRoundTable::getTableName();
488 switch ($storageType)
491 $result = Internals\OrderDiscountDataTable::ENTITY_TYPE_DISCOUNT_STORED_DATA;
494 $result = Internals\OrderDiscountDataTable::ENTITY_TYPE_ORDER;
497 $result = Internals\OrderDiscountDataTable::ENTITY_TYPE_ROUND;
500 $result = Internals\OrderDiscountDataTable::ENTITY_TYPE_BASKET_ITEM;
512 return Internals\OrderDiscountDataTable::getList($parameters);
523 return Internals\OrderDiscountDataTable::add($fields);
535 return Internals\OrderDiscountDataTable::update($id, $fields);
545 return Internals\OrderDiscountDataTable::getTableName();
static loadMessages($file)
const STORAGE_TYPE_ORDER_CONFIG
static getResultEntityFromInternal($entity)
static getResultEntityInternal($entity)
static getRoundEntityInternal($entity)
const STORAGE_TYPE_ROUND_CONFIG
static getRoundEntityFromInternal($entity)
const STORAGE_TYPE_DISCOUNT_ACTION_DATA
const STORAGE_TYPE_BASKET_ITEM
static addRoundResultInternal(array $fields)
static getOrderDiscountIterator(array $parameters)
static getResultIterator(array $parameters)
static getRoundResultIterator(array $parameters)
static addResultInternal(array $fields)
static getOrderDiscountModuleIterator(array $parameters)
static updateResultInternal($id, array $fields)
static getResultTableNameInternal()
static addResultDescriptionInternal(array $fields)
static getResultDescriptionTableNameInternal()
static getDiscountIterator(array $parameters)
static addStoredDataInternal(array $fields)
static addOrderDiscountInternal(array $fields)
static checkResultTableWhiteList(array $fields)
static getOrderCouponIterator(array $parameters)
static checkRequiredOrderDiscountFields(array $fields)
static isValidCouponTypeInternal($type)
static updateResultDescriptionInternal($id, array $fields)
static calculateOrderDiscountHashInternal(array $fields)
static updateStoredDataInternal($id, array $fields)
static updateRoundResultInternal($id, array $fields)
static getStorageTypeInternal($storageType)
static checkResultDescriptionTableWhiteList(array $fields)
static validateCoupon(array $fields)
static getResultDescriptionIterator(array $parameters)
static deleteByOrder($order)
static saveOrderDiscountModulesInternal($orderDiscountId, array $modules)
static getStoredDataTableInternal()
static getRoundTableNameInternal()
static addOrderCouponInternal(array $fields)
static getStoredDataIterator(array $parameters)
static normalizeOrderDiscountFieldsInternal(array $rawFields)
const REGISTRY_TYPE_ORDER