当前位置: 首页>>代码示例>>PHP>>正文


PHP Config::displaySalesFullSummary方法代码示例

本文整理汇总了PHP中Magento\Tax\Model\Config::displaySalesFullSummary方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::displaySalesFullSummary方法的具体用法?PHP Config::displaySalesFullSummary怎么用?PHP Config::displaySalesFullSummary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Tax\Model\Config的用法示例。


在下文中一共展示了Config::displaySalesFullSummary方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getTotalsForDisplay

 /**
  * Check if tax amount should be included to grandtotal block
  * array(
  *  $index => array(
  *      'amount'   => $amount,
  *      'label'    => $label,
  *      'font_size'=> $font_size
  *  )
  * )
  * @return array
  */
 public function getTotalsForDisplay()
 {
     $store = $this->getOrder()->getStore();
     if ($this->_taxConfig->displaySalesTaxWithGrandTotal($store)) {
         return [];
     }
     $totals = [];
     if ($this->_taxConfig->displaySalesFullSummary($store)) {
         $totals = $this->getFullTaxInfo();
     }
     $totals = array_merge($totals, parent::getTotalsForDisplay());
     return $totals;
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:24,代码来源:Tax.php

示例2: getTotalsForDisplay

 /**
  * Check if tax amount should be included to grandtotals block
  * array(
  *  $index => array(
  *      'amount'   => $amount,
  *      'label'    => $label,
  *      'font_size'=> $font_size
  *  )
  * )
  * @return array
  */
 public function getTotalsForDisplay()
 {
     $store = $this->getOrder()->getStore();
     if (!$this->_taxConfig->displaySalesTaxWithGrandTotal($store)) {
         return parent::getTotalsForDisplay();
     }
     $amount = $this->getOrder()->formatPriceTxt($this->getAmount());
     $amountExclTax = $this->getAmount() - $this->getSource()->getTaxAmount();
     $amountExclTax = $amountExclTax > 0 ? $amountExclTax : 0;
     $amountExclTax = $this->getOrder()->formatPriceTxt($amountExclTax);
     $tax = $this->getOrder()->formatPriceTxt($this->getSource()->getTaxAmount());
     $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;
     $totals = [['amount' => $this->getAmountPrefix() . $amountExclTax, 'label' => __('Grand Total (Excl. Tax)') . ':', 'font_size' => $fontSize]];
     if ($this->_taxConfig->displaySalesFullSummary($store)) {
         $totals = array_merge($totals, $this->getFullTaxInfo());
     }
     $totals[] = ['amount' => $this->getAmountPrefix() . $tax, 'label' => __('Tax') . ':', 'font_size' => $fontSize];
     $totals[] = ['amount' => $this->getAmountPrefix() . $amount, 'label' => __('Grand Total (Incl. Tax)') . ':', 'font_size' => $fontSize];
     return $totals;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:31,代码来源:Grandtotal.php

示例3: displayFullSummary

 /**
  * Check if we nedd display full tax total info
  *
  * @return bool
  */
 public function displayFullSummary()
 {
     return $this->_config->displaySalesFullSummary($this->getOrder()->getStore());
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:9,代码来源:Tax.php


注:本文中的Magento\Tax\Model\Config::displaySalesFullSummary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。