本文整理匯總了PHP中Magento\Tax\Helper\Data::displaySalesBothPrices方法的典型用法代碼示例。如果您正苦於以下問題:PHP Data::displaySalesBothPrices方法的具體用法?PHP Data::displaySalesBothPrices怎麽用?PHP Data::displaySalesBothPrices使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Tax\Helper\Data
的用法示例。
在下文中一共展示了Data::displaySalesBothPrices方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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);
}
}
示例2: getItemPricesForDisplay
/**
* Get array of arrays with item prices information for display in PDF
*
* Format: array(
* $index => array(
* 'label' => $label,
* 'price' => $price,
* 'subtotal' => $subtotal
* )
* )
*
* @return array
*/
public function getItemPricesForDisplay()
{
$order = $this->getOrder();
$item = $this->getItem();
if ($this->_taxData->displaySalesBothPrices()) {
$prices = array(array('label' => __('Excl. Tax') . ':', 'price' => $order->formatPriceTxt($item->getPrice()), 'subtotal' => $order->formatPriceTxt($item->getRowTotal())), array('label' => __('Incl. Tax') . ':', 'price' => $order->formatPriceTxt($item->getPriceInclTax()), 'subtotal' => $order->formatPriceTxt($item->getRowTotalInclTax())));
} elseif ($this->_taxData->displaySalesPriceInclTax()) {
$prices = array(array('price' => $order->formatPriceTxt($item->getPriceInclTax()), 'subtotal' => $order->formatPriceTxt($item->getRowTotalInclTax())));
} else {
$prices = array(array('price' => $order->formatPriceTxt($item->getPrice()), 'subtotal' => $order->formatPriceTxt($item->getRowTotal())));
}
return $prices;
}