Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog
Pricing
Price
ConfiguredPriceSelection.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Catalog\Pricing\Price
;
9
10
use
Magento\Catalog\Model\Product
;
11
use
Magento\Framework\Api\ExtensibleDataInterface
;
12
use
Magento\Framework\Pricing\Adjustment\CalculatorInterface
;
13
use
Magento\Catalog\Pricing\Price\ConfiguredPriceInterface
;
14
18
class
ConfiguredPriceSelection
19
{
23
private
$calculator;
24
28
public
function
__construct
(
29
CalculatorInterface
$calculator
30
) {
31
$this->calculator = $calculator;
32
}
33
40
public
function
getSelectionPriceList
(
ConfiguredPriceInterface
$price
): array
41
{
42
$selectionPriceList = [];
43
foreach
(
$price
->getOptions() as
$option
) {
44
$selectionPriceList = array_merge(
45
$selectionPriceList,
46
$this->createSelectionPriceList(
$option
,
$price
->getProduct())
47
);
48
}
49
50
return
$selectionPriceList;
51
}
52
60
private
function
createSelectionPriceList(
ExtensibleDataInterface
$option
,
Product
$product
): array
61
{
62
return
$this->calculator->createSelectionPriceList(
$option
,
$product
);
63
}
64
}
Magento\Catalog\Pricing\Price\ConfiguredPriceSelection\getSelectionPriceList
getSelectionPriceList(ConfiguredPriceInterface $price)
Definition:
ConfiguredPriceSelection.php:40
$price
$price
Definition:
product_alert.php:10
Magento\Catalog\Pricing\Price\ConfiguredPriceSelection
Definition:
ConfiguredPriceSelection.php:18
Magento\Catalog\Pricing\Price\ConfiguredPriceInterface
Definition:
ConfiguredPriceInterface.php:14
Magento\Catalog\Pricing\Price\ConfiguredPriceSelection\__construct
__construct(CalculatorInterface $calculator)
Definition:
ConfiguredPriceSelection.php:28
Magento\Catalog\Model\Product
Definition:
Product.php:42
Magento\Framework\Pricing\Adjustment\CalculatorInterface
Definition:
CalculatorInterface.php:17
Magento\Catalog\Model\Product
Definition:
ActionTest.php:6
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Framework\Api\ExtensibleDataInterface
Definition:
ExtensibleDataInterface.php:15
Magento\Catalog\Pricing\Price
Definition:
BasePrice.php:7
$option
$option
Definition:
product_configurable_with_single_child.php:38