![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-bundle/Block/Catalog/Product/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Bundle\Block\Catalog\Product; /** * Bundle product price block * @api * @since 100.0.2 */ class Price extends \Magento\Catalog\Block\Product\Price { /** * @var \Magento\Tax\Helper\Data */ protected $_taxHelper; /** * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Stdlib\StringUtils $string * @param \Magento\Framework\Math\Random $mathRandom * @param \Magento\Checkout\Helper\Cart $cartHelper * @param \Magento\Tax\Helper\Data $taxData * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\Catalog\Helper\Data $catalogData, \Magento\Framework\Registry $registry, \Magento\Framework\Stdlib\StringUtils $string, \Magento\Framework\Math\Random $mathRandom, \Magento\Checkout\Helper\Cart $cartHelper, \Magento\Tax\Helper\Data $taxData, array $data = [] ) { $this->_taxHelper = $taxData; parent::__construct( $context, $jsonEncoder, $catalogData, $registry, $string, $mathRandom, $cartHelper, $data ); } /** * Check if we have display prices including and excluding tax * With corrections for Dynamic prices * * @return bool */ public function displayBothPrices() { $product = $this->getProduct(); if ($product->getPriceType() == \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC && $product->getPriceModel()->getIsPricesCalculatedByIndex() !== false ) { return false; } return $this->_taxHelper->displayBothPrices(); } /** * @param null|string|bool|int|\Magento\Store\Model\Store $storeId * @return bool|\Magento\Store\Model\Website */ public function getWebsite($storeId) { return $this->_storeManager->getStore($storeId)->getWebsite(); } }