Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FinalPriceBox.php
Go to the documentation of this file.
1 <?php
8 
12 
16 class FinalPriceBox extends CatalogRender\FinalPriceBox
17 {
23  public function showRangePrice()
24  {
26  $bundlePrice = $this->getPriceType(FinalPrice::PRICE_CODE);
27  $showRange = $bundlePrice->getMinimalPrice() != $bundlePrice->getMaximalPrice();
28 
29  if (!$showRange) {
30  //Check the custom options, if any
32  $customOptionPrice = $this->getPriceType(CustomOptionPrice::PRICE_CODE);
33  $showRange =
34  $customOptionPrice->getCustomOptionRange(true) != $customOptionPrice->getCustomOptionRange(false);
35  }
36 
37  return $showRange;
38  }
39 }