1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
batchmanager.php
См. документацию.
1<?php
2namespace Bitrix\Catalog\Product\Store;
3
4use Bitrix\Catalog\EO_StoreBatch;
5use Bitrix\Catalog\EO_StoreBatch_Collection;
6use Bitrix\Catalog\StoreBatchTable;
7use Bitrix\Currency\CurrencyManager;
8use Bitrix\Main\ArgumentException;
9use Bitrix\Main\Loader;
10use Bitrix\Main\ObjectPropertyException;
11use Bitrix\Main\SystemException;
12
19{
20 private int $productId;
21
22 public function __construct(int $productId)
23 {
24 $this->productId = $productId;
25 }
26
30 public function getProductId(): int
31 {
32 return $this->productId;
33 }
34
45 {
46 $filter['=ELEMENT_ID'] = $this->getProductId();
47
49 'filter' => $filter,
50 'order' => ['ID' => 'ASC'],
51 ])
52 ->fetchCollection()
53 ;
54 }
55
66 {
67 return $this->getStoreCollection([
68 '>AVAILABLE_AMOUNT' => 0,
69 '=STORE_ID' => $storeId,
70 ]);
71 }
72
82 public function calculateCostPrice(float $quantity, int $storeId, string $currency = null): float
83 {
84 if (empty($currency) && Loader::includeModule('currency'))
85 {
86 $currency = CurrencyManager::getBaseCurrency();
87 }
88
89 return (new CostPriceCalculator($this))->calculate($quantity, $storeId, $currency);
90 }
91}
getStoreCollection(array $filter=null)
Определения batchmanager.php:44
getAvailableStoreCollection(int $storeId)
Определения batchmanager.php:65
__construct(int $productId)
Определения batchmanager.php:22
calculateCostPrice(float $quantity, int $storeId, string $currency=null)
Определения batchmanager.php:82
static getList(array $parameters=array())
Определения datamanager.php:431
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$filter
Определения iblock_catalog_list.php:54
$currency
Определения template.php:266