本文整理匯總了PHP中Magento\Tax\Helper\Data::displayCartBothPrices方法的典型用法代碼示例。如果您正苦於以下問題:PHP Data::displayCartBothPrices方法的具體用法?PHP Data::displayCartBothPrices怎麽用?PHP Data::displayCartBothPrices使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Tax\Helper\Data
的用法示例。
在下文中一共展示了Data::displayCartBothPrices方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getReviewItemPriceDisplayMode
/**
* Get review item price display mode
*
* @return string 'both', 'including', 'excluding'
*/
public function getReviewItemPriceDisplayMode()
{
if ($this->taxHelper->displayCartBothPrices()) {
return 'both';
}
if ($this->taxHelper->displayCartPriceExclTax()) {
return 'excluding';
}
return 'including';
}
示例2: renderTotals
/**
* @param mixed $totals
* @param null $colspan
* @return string
*/
public function renderTotals($totals, $colspan = null)
{
if ($colspan === null) {
$colspan = $this->_taxHelper->displayCartBothPrices() ? 5 : 3;
}
$totals = $this->getChildBlock('totals')->setTotals($totals)->renderTotals('', $colspan) . $this->getChildBlock('totals')->setTotals($totals)->renderTotals('footer', $colspan);
return $totals;
}
示例3: displayBothPrices
/**
* Return whether display setting is to display both price including tax and price excluding tax
*
* @return bool
*/
public function displayBothPrices()
{
switch ($this->zone) {
case PricingRender::ZONE_CART:
return $this->taxHelper->displayCartBothPrices($this->storeId);
case PricingRender::ZONE_EMAIL:
case PricingRender::ZONE_SALES:
return $this->taxHelper->displaySalesBothPrices($this->storeId);
default:
return $this->taxHelper->displayCartBothPrices($this->storeId);
}
}