1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
storewithproductsinfo.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Catalog\Integration\Report\StoreStock\Entity\Store;
4
5
use Bitrix\Catalog\Integration\Report\StoreStock\Entity\ProductInfo;
6
7
class
StoreWithProductsInfo
extends
StoreInfo
8
{
9
protected
array
$productList
= [];
10
15
public
function
getProductList
():
array
16
{
17
return
$this->productList
;
18
}
19
25
public
function
addProduct
(
ProductInfo
...$product): void
26
{
27
array_push($this->productList, ...$product);
28
}
29
34
public
function
getCalculatedSumPrice
(): float
35
{
36
$sum
= 0.0;
37
39
foreach
($this->
getProductList
() as $product)
40
{
41
$sum
+= $product->getPrice() * $product->getQuantity();
42
}
43
44
return
$sum
;
45
}
46
}
$sum
$sum
Определения
checkout.php:6
Bitrix\Catalog\Integration\Report\StoreStock\Entity\ProductInfo
Определения
productinfo.php:12
Bitrix\Catalog\Integration\Report\StoreStock\Entity\Store\StoreInfo
Определения
storeinfo.php:10
Bitrix\Catalog\Integration\Report\StoreStock\Entity\Store\StoreInfo\getCalculatedSumPrice
getCalculatedSumPrice()
Bitrix\Catalog\Integration\Report\StoreStock\Entity\Store\StoreWithProductsInfo
Определения
storewithproductsinfo.php:8
Bitrix\Catalog\Integration\Report\StoreStock\Entity\Store\StoreWithProductsInfo\addProduct
addProduct(ProductInfo ... $product)
Определения
storewithproductsinfo.php:25
Bitrix\Catalog\Integration\Report\StoreStock\Entity\Store\StoreWithProductsInfo\$productList
array $productList
Определения
storewithproductsinfo.php:9
Bitrix\Catalog\Integration\Report\StoreStock\Entity\Store\StoreWithProductsInfo\getProductList
getProductList()
Определения
storewithproductsinfo.php:15
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
bitrix
modules
catalog
lib
integration
report
storestock
entity
store
storewithproductsinfo.php
Создано системой
1.14.0