3namespace Bitrix\Catalog\v2\Price;
5use Bitrix\Catalog\GroupTable;
6use Bitrix\Catalog\Model\Price;
7use Bitrix\Catalog\PriceTable;
8use Bitrix\Catalog\v2\BaseEntity;
9use Bitrix\Catalog\v2\Sku\BaseSku;
11use Bitrix\Main\Result;
35 throw new \OutOfRangeException($id);
44 return reset($entities) ?:
null;
65 if ($parent && !$parent->isNew())
67 $id = $parent->getId();
86 if (
$res->isSuccess())
105 $entity->setProductId($productId);
118 if (!
$res->isSuccess())
127 if (
$res->isSuccess())
141 public function delete(BaseEntity ...$entities): Result
152 if (!
$res->isSuccess())
178 '=PRODUCT_ID' => $skuId,
187 return array_column($prices,
null,
'CATALOG_GROUP_ID');
192 $entity = $this->factory->createEntity();
201 $collection = $this->factory->createCollection();
203 foreach ($this->getPriceSettings() as
$settings)
211 $collection->add($price);
232 if (
$res->isSuccess())
259 if (!
$res->isSuccess())
273 if (!
$res->isSuccess())
281 private function getPriceSettings():
array
283 static $priceSettings =
null;
285 if ($priceSettings ===
null)
290 return $priceSettings;
add(BaseEntity ... $items)
getByProductId(int $skuId)
getProductId(BaseEntity $entity)
addInternal(array $fields)
createEntity(array $fields=[])
__construct(PriceFactory $factory)
createCollection(array $entityFields=[])
getCollectionByParent(BaseSku $sku)
updateInternal(int $id, array $fields)
static getList(array $parameters=array())
static update($primary, array $data)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
delete(BaseEntity ... $entities)
save(BaseEntity ... $entities)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']