本文整理汇总了PHP中Magento\Weee\Helper\Data::isTaxable方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::isTaxable方法的具体用法?PHP Data::isTaxable怎么用?PHP Data::isTaxable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Weee\Helper\Data
的用法示例。
在下文中一共展示了Data::isTaxable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateBundleProductOptions
/**
* Process bundle options selection for prepare view json
*
* @param \Magento\Framework\Event\Observer $observer
* @return $this
*/
public function updateBundleProductOptions(\Magento\Framework\Event\Observer $observer)
{
if (!$this->_weeeData->isEnabled()) {
return $this;
}
$response = $observer->getEvent()->getResponseObject();
$selection = $observer->getEvent()->getSelection();
$options = $response->getAdditionalOptions();
$_product = $this->_registry->registry('current_product');
$typeDynamic = \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Attributes\Extend::DYNAMIC;
if (!$_product || $_product->getPriceType() != $typeDynamic) {
return $this;
}
$amount = $this->_weeeData->getAmount($selection);
$attributes = $this->_weeeData->getProductWeeeAttributes($_product, null, null, null, $this->_weeeData->isTaxable());
$amountInclTaxes = $this->_weeeData->getAmountInclTaxes($attributes);
$taxes = $amountInclTaxes - $amount;
$options['plusDisposition'] = $amount;
$options['plusDispositionTax'] = $taxes < 0 ? 0 : $taxes;
// Exclude Weee amount from excluding tax amount
if (!$this->_weeeData->typeOfDisplay(array(0, 1, 4))) {
$options['exclDisposition'] = true;
}
$response->setAdditionalOptions($options);
return $this;
}
示例2: _processTaxSettings
/**
* Add extra amount which should be taxable by regular tax
*
* @param \Magento\Sales\Model\Quote\Item\AbstractItem $item
* @param float $value
* @param float $baseValue
* @param float $rowValue
* @param float $baseRowValue
* @return $this
*/
protected function _processTaxSettings($item, $value, $baseValue, $rowValue, $baseRowValue)
{
if ($this->_weeeData->isTaxable($this->_store) && $rowValue) {
$item->setExtraTaxableAmount($value)->setBaseExtraTaxableAmount($baseValue)->setExtraRowTaxableAmount($rowValue)->setBaseExtraRowTaxableAmount($baseRowValue);
}
return $this;
}
示例3: isIncludedInDisplayPrice
/**
* Define if adjustment is included in display price
*
* @return bool
*/
public function isIncludedInDisplayPrice()
{
if ($this->taxHelper->displayPriceExcludingTax()) {
return false;
}
if ($this->weeeHelper->isEnabled() == true && $this->weeeHelper->isTaxable() == true && $this->weeeHelper->typeOfDisplay([\Magento\Weee\Model\Tax::DISPLAY_EXCL]) == false) {
return true;
} else {
return false;
}
}
示例4: processTotalAmount
/**
* Process row amount based on FPT total amount configuration setting
*
* @param \Magento\Quote\Model\Quote\Address\Total $total
* @param float $rowValueExclTax
* @param float $baseRowValueExclTax
* @param float $rowValueInclTax
* @param float $baseRowValueInclTax
* @return $this
*/
protected function processTotalAmount($total, $rowValueExclTax, $baseRowValueExclTax, $rowValueInclTax, $baseRowValueInclTax)
{
if (!$this->weeeData->isTaxable($this->_store)) {
//Accumulate the values. Will be used later in the 'weee tax' collector
$this->weeeTotalExclTax += $this->priceCurrency->round($rowValueExclTax);
$this->weeeBaseTotalExclTax += $this->priceCurrency->round($baseRowValueExclTax);
}
//This value is used to calculate shipping cost; it will be overridden by tax collector
$total->setSubtotalInclTax($total->getSubtotalInclTax() + $this->priceCurrency->round($rowValueInclTax));
$total->setBaseSubtotalInclTax($total->getBaseSubtotalInclTax() + $this->priceCurrency->round($baseRowValueInclTax));
return $this;
}
示例5: getSortOrder
/**
* Return sort order position
*
* @return int
*/
public function getSortOrder()
{
return $this->weeeHelper->isTaxable() ? $this->sortOrder : -1;
}