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


PHP Mage_Tax_Model_Config::displaySalesShippingBoth方法代码示例

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


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

示例1: _initShipping

 protected function _initShipping()
 {
     $store = $this->getStore();
     $parent = $this->getParentBlock();
     $shipping = $parent->getTotal('shipping');
     if (!$shipping) {
         return $this;
     }
     if ($this->_config->displaySalesShippingBoth($store)) {
         $shipping = (double) $this->_source->getShippingAmount();
         $baseShipping = (double) $this->_source->getBaseShippingAmount();
         $shippingIncl = $shipping + (double) $this->_source->getShippingTaxAmount();
         $baseShippingIncl = $baseShipping + (double) $this->_source->getBaseShippingTaxAmount();
         $totalExcl = new Varien_Object(array('code' => 'shipping', 'value' => $shipping, 'base_value' => $baseShipping, 'label' => $this->__('Shipping & Handling (Excl.Tax)')));
         $totalIncl = new Varien_Object(array('code' => 'shipping_incl', 'value' => $shippingIncl, 'base_value' => $baseShippingIncl, 'label' => $this->__('Shipping & Handling (Incl.Tax)')));
         $parent->addTotal($totalExcl, 'shipping');
         $parent->addTotal($totalIncl, 'shipping');
     } elseif ($this->_config->displaySalesShippingInclTax($store)) {
         $shippingIncl = $this->_source->getShippingAmount() + $this->_source->getShippingTaxAmount();
         $baseShippingIncl = $this->_source->getBaseShippingAmount() + $this->_source->getBaseShippingTaxAmount();
         $total = $parent->getTotal('shipping');
         if ($total) {
             $total->setValue($shippingIncl);
             $total->setBaseValue($baseShippingIncl);
         }
     }
     return $this;
 }
开发者ID:joebushi,项目名称:magento-mirror,代码行数:28,代码来源:Tax.php

示例2: displaySalesShippingBoth

 /**
  * Check if display sales shipping include and exclude tax
  *
  * @param mixed $store
  * @return bool
  */
 public function displaySalesShippingBoth($store = null)
 {
     if ($this->_getDataHelper()->isAvataxEnabled($store)) {
         return false;
     }
     return parent::displaySalesShippingBoth($store);
 }
开发者ID:shabirm,项目名称:avatax,代码行数:13,代码来源:Config.php


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