15 class Totals extends \Magento\Checkout\Block\Cart\AbstractCart
59 $this->_salesConfig = $salesConfig;
60 parent::__construct($context, $customerSession, $checkoutSession,
$data);
61 $this->_isScopePrivate =
true;
70 foreach ($this->layoutProcessors as
$processor) {
71 $this->jsLayout =
$processor->process($this->jsLayout);
74 return json_encode($this->jsLayout, JSON_HEX_TAG);
82 if ($this->_totals ===
null) {
83 return parent::getTotals();
105 $blockName =
$code .
'_total_renderer';
108 $renderer = $this->_salesConfig->getTotalsRenderer(
'quote',
'totals',
$code);
109 if (!empty($renderer)) {
132 $code = $total->getCode();
133 if ($total->getAs()) {
134 $code = $total->getAs();
143 $area ===
null ? -1 : $area
158 if ($total->getArea() != $area && $area != -1) {
161 $html .= $this->
renderTotal($total, $area, $colspan);
174 if (
$quote->getBaseCurrencyCode() !=
$quote->getQuoteCurrencyCode()) {
187 $firstTotal = reset($this->_totals);
189 $total = $firstTotal->getAddress()->getBaseGrandTotal();
190 return $this->_storeManager->getStore()->getBaseCurrency()->format($total, [],
true);
202 if ($this->getCustomQuote()) {
203 return $this->getCustomQuote();
206 if (
null === $this->_quote) {
207 $this->_quote = $this->_checkoutSession->getQuote();
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\Config $salesConfig, array $layoutProcessors=[], array $data=[])
needDisplayBaseGrandtotal()
renderTotal($total, $area=null, $colspan=1)
renderTotals($area=null, $colspan=1)