本文整理汇总了PHP中Mage_XmlConnect_Model_Simplexml_Element::escapeXml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_XmlConnect_Model_Simplexml_Element::escapeXml方法的具体用法?PHP Mage_XmlConnect_Model_Simplexml_Element::escapeXml怎么用?PHP Mage_XmlConnect_Model_Simplexml_Element::escapeXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_XmlConnect_Model_Simplexml_Element
的用法示例。
在下文中一共展示了Mage_XmlConnect_Model_Simplexml_Element::escapeXml方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _addPriceToXmlObj
/**
* Add price details to xml object
*
* @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
* @param Mage_Sales_Model_Quote_Address_Rate $rate
* @return Mage_XmlConnect_Block_Cart_Paypal_Mecl_Shippingmethods
*/
protected function _addPriceToXmlObj($xmlObj, $rate)
{
$price = $this->_getShippingPrice($rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax());
$incl = $this->_getShippingPrice($rate->getPrice(), true);
$renderedInclTax = '';
if ($incl != $price && $this->helper('tax')->displayShippingBothPrices()) {
$inclTaxFormat = ' (%s %s)';
$renderedInclTax = sprintf($inclTaxFormat, Mage::helper('tax')->__('Incl. Tax'), $incl);
}
$price .= $renderedInclTax;
$xmlObj->addAttribute('price', $rate->getPrice() * 1);
$xmlObj->addAttribute('formatted_price', $xmlObj->escapeXml($price));
return $this;
}
示例2: _addWeeeToXmlObj
/**
* Add weee tax product info to xml object
*
* @param Mage_XmlConnect_Model_Simplexml_Element $priceXmlObj
* @param bool $subtotalFlag use true to get subtotal product info
* @return Mage_XmlConnect_Model_Simplexml_Element
*/
protected function _addWeeeToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $priceXmlObj, $subtotalFlag = false)
{
$_item = $this->getItem();
$weeeXmlObj = $priceXmlObj->addCustomChild('weee');
if ($subtotalFlag) {
$_incl = $this->helper('checkout')->getSubtotalInclTax($_item);
} else {
$_incl = $this->helper('checkout')->getPriceInclTax($_item);
}
$typeOfDisplay2 = Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales');
if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()) {
foreach (Mage::helper('weee')->getApplied($_item) as $tax) {
if ($subtotalFlag) {
$amount = $tax['row_amount'];
} else {
$amount = $tax['amount'];
}
$weeeXmlObj->addCustomChild('item', null, array('name' => $tax['title'], 'amount' => $this->_formatPrice($amount)));
}
} elseif ($_item->getWeeeTaxAppliedAmount() && ($typeOfDisplay2 || Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales'))) {
foreach (Mage::helper('weee')->getApplied($_item) as $tax) {
if ($subtotalFlag) {
$amount = $tax['row_amount_incl_tax'];
} else {
$amount = $tax['amount_incl_tax'];
}
$weeeXmlObj->addCustomChild('item', null, array('name' => $tax['title'], 'amount' => $this->_formatPrice($amount)));
}
}
if ($typeOfDisplay2 && $_item->getWeeeTaxAppliedAmount()) {
if ($subtotalFlag) {
$totalExcl = $_item->getRowTotal() + $_item->getWeeeTaxAppliedRowAmount() + $_item->getWeeeTaxRowDisposition();
} else {
$totalExcl = $_item->getCalculationPrice() + $_item->getWeeeTaxAppliedAmount() + $_item->getWeeeTaxDisposition();
}
$totalExcl = $this->_formatPrice($totalExcl);
$priceXmlObj->addAttribute('total_excluding_tax', $priceXmlObj->escapeXml($totalExcl));
}
if ($typeOfDisplay2 && $_item->getWeeeTaxAppliedAmount()) {
if ($subtotalFlag) {
$totalIncl = $_incl + $_item->getWeeeTaxAppliedRowAmount();
} else {
$totalIncl = $_incl + $_item->getWeeeTaxAppliedAmount();
}
$totalIncl = $this->_formatPrice($totalIncl);
$priceXmlObj->addAttribute('total_including_tax', $priceXmlObj->escapeXml($totalIncl));
}
return $priceXmlObj;
}
示例3: _addTotalToXmlApi23
/**
* Add total to totals XML. Api version 23.
*
* @param Varien_Object $total
* @param Mage_XmlConnect_Model_Simplexml_Element $totalsXml
* @return null
*/
protected function _addTotalToXmlApi23($total, Mage_XmlConnect_Model_Simplexml_Element $totalsXml)
{
if ($total instanceof Varien_Object && $total->getCode() && $total->getLabel() && $total->hasData('value')) {
$totalsXml->addCustomChild('item', $this->_formatPrice($total), array('id' => preg_replace('@[\\W]+@', '_', trim($total->getCode())), 'label' => $totalsXml->escapeXml($total->getLabel())));
}
}
示例4: _buildPaymentMethods
/**
* Add payment methods info to xml object
*
* @throw Mage_Core_Exception
* @param Mage_XmlConnect_Model_Simplexml_Element $methodsXmlObj
* @return Mage_XmlConnect_Block_Checkout_Payment_Method_List
*/
protected function _buildPaymentMethods(Mage_XmlConnect_Model_Simplexml_Element $methodsXmlObj)
{
$methodArray = $this->_getPaymentMethodArray();
$usedMethods = $sortedAvailableMethodCodes = $usedCodes = array();
/**
* Receive available methods for checkout
*/
$allAvailableMethods = Mage::helper('payment')->getStoreMethods(Mage::app()->getStore(), $this->getQuote());
$total = $this->getQuote()->getGrandTotal();
foreach ($allAvailableMethods as $key => $method) {
if ($this->_canUseMethod($method) && ($total != 0 || $method->getCode() == 'free' || $this->getQuote()->hasRecurringItems() && $method->canManageRecurringProfiles())) {
$this->_assignMethod($method);
} else {
unset($allAvailableMethods[$key]);
}
}
/**
* Get sorted codes of available methods
*/
foreach ($allAvailableMethods as $method) {
$sortedAvailableMethodCodes[] = $method->getCode();
}
/**
* Get blocks for layout to check available renderers
*/
$methodBlocks = $this->getChild();
/**
* Collect directly supported by xmlconnect methods
*/
if (!empty($methodBlocks) && is_array($methodBlocks)) {
foreach ($methodBlocks as $block) {
if (!$block) {
continue;
}
$method = $block->getMethod();
if (!$this->_canUseMethod($method) || in_array($method->getCode(), $usedCodes)) {
continue;
}
$this->_assignMethod($method);
$usedCodes[] = $method->getCode();
$usedMethods[$method->getCode()] = array('renderer' => $block, 'method' => $method);
}
}
/**
* Collect all "Credit Card" / "CheckMo" / "Purchaseorder" method compatible methods
*/
foreach ($methodArray as $methodName => $methodModelClassName) {
$methodRenderer = $this->getChild($methodName);
if (!empty($methodRenderer)) {
foreach ($sortedAvailableMethodCodes as $methodCode) {
/**
* Skip used methods
*/
if (in_array($methodCode, $usedCodes)) {
continue;
}
try {
$method = Mage::helper('payment')->getMethodInstance($methodCode);
if (!is_subclass_of($method, $methodModelClassName)) {
continue;
}
if (!$this->_canUseMethod($method)) {
continue;
}
$this->_assignMethod($method);
$usedCodes[] = $method->getCode();
$usedMethods[$method->getCode()] = array('renderer' => $methodRenderer, 'method' => $method);
} catch (Exception $e) {
Mage::logException($e);
}
}
}
}
/**
* Generate methods XML according to sort order
*/
foreach ($sortedAvailableMethodCodes as $code) {
if (!in_array($code, $usedCodes)) {
continue;
}
$method = $usedMethods[$code]['method'];
$renderer = $usedMethods[$code]['renderer'];
/**
* Render all Credit Card method compatible methods
*/
if ($renderer instanceof Mage_XmlConnect_Block_Checkout_Payment_Method_Ccsave) {
$renderer->setData('method', $method);
}
$options = array('id' => $method->getCode(), 'code' => $method->getCode(), 'post_name' => 'payment[method]', 'label' => $methodsXmlObj->escapeXml($method->getTitle()));
if ($this->getQuote()->getPayment()->getMethod() == $method->getCode()) {
$options['selected'] = 1;
}
$methodItemXmlObj = $methodsXmlObj->addCustomChild('method', null, $options);
//.........这里部分代码省略.........
示例5: _addTotalDataToXmlObj
/**
* Add total data to totals xml object
*
* @param Mage_XmlConnect_Model_Simplexml_Element $totalsXmlObj
* @param string $code
* @param string $title
* @param float $value
*/
protected function _addTotalDataToXmlObj($totalsXmlObj, $code, $title, $value)
{
$value = Mage::helper('xmlconnect')->formatPriceForXml($value);
$totalXmlObj = $totalsXmlObj->addChild($code);
$totalXmlObj->addChild('title', $totalsXmlObj->escapeXml($title));
$formattedValue = $this->getQuote()->getStore()->formatPrice($value, false);
$totalXmlObj->addChild('value', $value);
$totalXmlObj->addChild('formated_value', $formattedValue);
}
示例6: addCartProductsToXmlObj
/**
* Add product block to cart
*
* @param Mage_XmlConnect_Model_Simplexml_Element $xmlObject
* @param Mage_Sales_Model_Quote $quote
* @return null
*/
public function addCartProductsToXmlObj($xmlObject, $quote)
{
$productSmallImageSize = Mage::getModel('xmlconnect/images')->getImageLimitParam('content/product_small');
$products = $xmlObject->addCustomChild('products');
/* @var $item Mage_Sales_Model_Quote_Item */
foreach ($this->getItems() as $item) {
$type = $item->getProductType();
$renderer = $this->getItemRenderer($type)->setItem($item);
/**
* General information
*/
$itemXml = $products->addCustomChild('item', null, array('entity_id' => $item->getProduct()->getId()));
$itemXml->addCustomChild('entity_type', $type);
$itemXml->addCustomChild('item_id', $item->getId());
$itemXml->addCustomChild('name', $xmlObject->escapeXml($renderer->getProductName()));
$itemXml->addCustomChild('code', 'cart[' . $item->getId() . '][qty]');
$itemXml->addCustomChild('qty', $renderer->getQty());
$icon = $renderer->getProductThumbnail()->resize($productSmallImageSize);
$iconXml = $itemXml->addChild('icon', $icon);
$iconXml->addAttribute('modification_time', filemtime($icon->getNewFile()));
/**
* Price
*/
$pricesXmlObj = $itemXml->addCustomChild('price_list');
$exclPrice = $inclPrice = 0;
if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) {
if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()) {
$exclPrice = $item->getCalculationPrice() + $item->getWeeeTaxAppliedAmount() + $item->getWeeeTaxDisposition();
} else {
$exclPrice = $item->getCalculationPrice();
}
}
if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()) {
$incl = $this->helper('checkout')->getPriceInclTax($item);
if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()) {
$inclPrice = $incl + $item->getWeeeTaxAppliedAmount();
} else {
$inclPrice = $incl - $item->getWeeeTaxDisposition();
}
}
$exclPrice = Mage::helper('xmlconnect')->formatPriceForXml($exclPrice);
$paypalPrice = Mage::helper('xmlconnect')->formatPriceForXml($item->getCalculationPrice());
$formattedExclPrice = $quote->getStore()->formatPrice($exclPrice, false);
$inclPrice = Mage::helper('xmlconnect')->formatPriceForXml($inclPrice);
$formattedInclPrice = $quote->getStore()->formatPrice($inclPrice, false);
$priceXmlObj = $pricesXmlObj->addCustomChild('prices', null, array('id' => 'price'));
if ($this->helper('tax')->displayCartBothPrices()) {
$priceXmlObj->addCustomChild('price', $exclPrice, array('id' => 'excluding_tax', 'label' => $this->__('Excl. Tax'), 'formatted_value' => $formattedExclPrice));
$priceXmlObj->addCustomChild('price', $inclPrice, array('id' => 'including_tax', 'label' => $this->__('Incl. Tax'), 'formatted_value' => $formattedInclPrice));
} else {
if ($this->helper('tax')->displayCartPriceExclTax()) {
$priceXmlObj->addCustomChild('price', $exclPrice, array('id' => 'regular', 'label' => $this->__('Unit Price'), 'formatted_value' => $formattedExclPrice));
}
if ($this->helper('tax')->displayCartPriceInclTax()) {
$priceXmlObj->addCustomChild('price', $inclPrice, array('id' => 'regular', 'label' => $this->__('Unit Price'), 'formatted_value' => $formattedInclPrice));
}
}
/**
* Info for paypal MEP if it's enabled
*/
$appConfig = Mage::helper('xmlconnect')->getApplication()->loadConfiguration()->getRenderConf();
$isMepActive = $appConfig['paypal']['isActive'];
$paypalMepIsAvailable = Mage::getModel('xmlconnect/payment_method_paypal_mep')->isAvailable(null);
if ($paypalMepIsAvailable && $isMepActive) {
$paypalPriceXmlObj = $pricesXmlObj->addCustomChild('prices', null, array('id' => 'paypal'));
$paypalPriceXmlObj->addCustomChild('price', $paypalPrice, array('id' => 'regular', 'label' => $this->__('Unit Price'), 'formatted_value' => $quote->getStore()->formatPrice($paypalPrice, false)));
$paypalSubtotalPrice = Mage::helper('xmlconnect')->formatPriceForXml($item->getRowTotal());
$paypalPriceXmlObj->addCustomChild('price', $paypalSubtotalPrice, array('id' => 'subtotal', 'label' => $this->__('Subtotal'), 'formatted_value' => $quote->getStore()->formatPrice($paypalSubtotalPrice, false)));
}
/**
* Subtotal
*/
$subtotalExclTax = $subtotalInclTax = 0;
if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) {
if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()) {
$subtotalExclTax = $item->getRowTotal() + $item->getWeeeTaxAppliedRowAmount() + $item->getWeeeTaxRowDisposition();
} else {
$subtotalExclTax = $item->getRowTotal();
}
}
if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()) {
$incl = $this->helper('checkout')->getSubtotalInclTax($item);
if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()) {
$subtotalInclTax = $incl + $item->getWeeeTaxAppliedRowAmount();
} else {
$subtotalInclTax = $incl - $item->getWeeeTaxRowDisposition();
}
}
$subtotalExclTax = Mage::helper('xmlconnect')->formatPriceForXml($subtotalExclTax);
$formattedSubtotalExcl = $quote->getStore()->formatPrice($subtotalExclTax, false);
$subtotalInclTax = Mage::helper('xmlconnect')->formatPriceForXml($subtotalInclTax);
$formattedSubtotalIncl = $quote->getStore()->formatPrice($subtotalInclTax, false);
$priceXmlObj = $pricesXmlObj->addCustomChild('prices', null, array('id' => 'subtotal'));
//.........这里部分代码省略.........
示例7: prepareAddressData
/**
* Collect address data to xml node
* Remove objects from data array and escape data values
*
* @param Mage_Customer_Model_Address $address
* @param Mage_XmlConnect_Model_Simplexml_Element $item
* @return array
*/
public function prepareAddressData(Mage_Customer_Model_Address $address, Mage_XmlConnect_Model_Simplexml_Element $item)
{
if (!$address) {
return array();
}
$attributes = Mage::helper('Mage_Customer_Helper_Address')->getAttributes();
$data = array('entity_id' => $address->getId());
foreach ($attributes as $attribute) {
/* @var $attribute Mage_Customer_Model_Attribute */
if (!$attribute->getIsVisible()) {
continue;
}
if ($attribute->getAttributeCode() == 'country_id') {
$data['country'] = $address->getCountryModel()->getName();
$data['country_id'] = $address->getCountryId();
} else {
if ($attribute->getAttributeCode() == 'region') {
$data['region'] = $address->getRegion();
} else {
$dataModel = Mage_Customer_Model_Attribute_Data::factory($attribute, $address);
$value = $dataModel->outputValue(Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_ONELINE);
if ($attribute->getFrontendInput() == 'multiline') {
$values = $dataModel->outputValue(Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_ARRAY);
// explode lines
foreach ($values as $k => $v) {
$key = sprintf('%s%d', $attribute->getAttributeCode(), $k + 1);
$data[$key] = $v;
}
}
$data[$attribute->getAttributeCode()] = $value;
}
}
}
foreach ($data as $key => $value) {
if (empty($value)) {
continue;
}
$item->addChild($key, $item->escapeXml($value));
}
}
示例8: collectProductPrices
/**
* Collect product prices to specified item xml object
*
* @param Mage_Catalog_Model_Product $product
* @param Mage_XmlConnect_Model_Simplexml_Element $item
*/
public function collectProductPrices(Mage_Catalog_Model_Product $product, Mage_XmlConnect_Model_Simplexml_Element $item)
{
$this->setProduct($product)->setDisplayMinimalPrice(true)->setUseLinkForAsLowAs(false);
$priceListXmlObj = $item->addCustomChild('price_list');
$tierPrices = $this->_getTierPrices($product);
if (count($tierPrices) > 0) {
$tierPricesTextArray = $item->escapeXml(implode(PHP_EOL, $this->_getTierPricesTextArray($tierPrices, $product)));
$item->addCustomChild('price_tier', $tierPricesTextArray);
}
/** @var $coreHelper Mage_Core_Helper_Data */
$coreHelper = $this->helper('core');
/** @var $weeeHelper Mage_Weee_Helper_Data */
$weeeHelper = $this->helper('weee');
/** @var $taxHelper Mage_Tax_Helper_Data */
$taxHelper = $this->helper('tax');
$simplePricesTax = $taxHelper->displayPriceIncludingTax() || $taxHelper->displayBothPrices();
$minimalPriceValue = $product->getMinimalPrice();
$minimalPrice = $taxHelper->getPrice($product, $minimalPriceValue, $simplePricesTax);
if (!$product->isGrouped()) {
$weeeTaxAmount = $weeeHelper->getAmountForDisplay($product);
if ($weeeHelper->typeOfDisplay($product, array(1, 2, 4))) {
$weeeTaxAmount = $weeeHelper->getAmount($product);
$weeeTaxAttributes = $weeeHelper->getProductWeeeAttributesForDisplay($product);
}
$price = $taxHelper->getPrice($product, $product->getPrice());
$regularPrice = $taxHelper->getPrice($product, $product->getPrice(), $simplePricesTax);
$finalPrice = $taxHelper->getPrice($product, $product->getFinalPrice());
$finalPriceInclTax = $taxHelper->getPrice($product, $product->getFinalPrice(), true);
$weeeHelper->getPriceDisplayType();
if ($finalPrice == $price) {
if ($taxHelper->displayBothPrices()) {
/**
* Including
*/
if ($weeeTaxAmount && $weeeHelper->typeOfDisplay($product, 0)) {
$pricesXmlObj = $priceListXmlObj->addCustomChild('prices', null, array('id' => 'price'));
$exclTaxValue = $price + $weeeTaxAmount;
$pricesXmlObj->addCustomChild('price', $exclTaxValue, array('id' => 'excluding_tax', 'label' => $this->__('Excl. Tax'), 'formatted_value' => $coreHelper->currency($exclTaxValue, true, false)));
$inclTaxValue = $finalPriceInclTax + $weeeTaxAmount;
$pricesXmlObj->addCustomChild('price', $inclTaxValue, array('id' => 'including_tax', 'label' => $this->__('Incl. Tax'), 'formatted_value' => $coreHelper->currency($inclTaxValue, true, false)));
} elseif ($weeeTaxAmount && $weeeHelper->typeOfDisplay($product, 1)) {
/**
* Including + Weee
*/
$pricesXmlObj = $priceListXmlObj->addCustomChild('prices', null, array('id' => 'price'));
$exclTaxValue = $price + $weeeTaxAmount;
$pricesXmlObj->addCustomChild('price', $exclTaxValue, array('id' => 'excluding_tax', 'label' => $this->__('Excl. Tax'), 'formatted_value' => $coreHelper->currency($exclTaxValue, true, false)));
$inclTaxValue = $finalPriceInclTax + $weeeTaxAmount;
$pricesXmlObj->addCustomChild('price', $inclTaxValue, array('id' => 'including_tax', 'label' => $this->__('Incl. Tax'), 'formatted_value' => $coreHelper->currency($inclTaxValue, true, false)));
$priceWeeeXmlObj = $pricesXmlObj->addCustomChild('price', null, array('id' => 'weee'));
foreach ($weeeTaxAttributes as $weeeTaxAttribute) {
$priceWeeeXmlObj->addCustomChild('item', $weeeTaxAttribute->getAmount() * 1, array('id' => 'weee_tax', 'label' => $weeeTaxAttribute->getName(), 'formatted_value' => $coreHelper->currency($weeeTaxAttribute->getAmount(), true, false)));
}
} elseif ($weeeTaxAmount && $weeeHelper->typeOfDisplay($product, 4)) {
/**
* Including + Weee
*/
$pricesXmlObj = $priceListXmlObj->addCustomChild('prices', null, array('id' => 'price'));
$exclTaxValue = $price + $weeeTaxAmount;
$pricesXmlObj->addCustomChild('price', $exclTaxValue, array('id' => 'excluding_tax', 'label' => $this->__('Excl. Tax'), 'formatted_value' => $coreHelper->currency($exclTaxValue, true, false)));
$inclTaxValue = $finalPriceInclTax + $weeeTaxAmount;
$pricesXmlObj->addCustomChild('price', $inclTaxValue, array('id' => 'including_tax', 'label' => $this->__('Incl. Tax'), 'formatted_value' => $coreHelper->currency($inclTaxValue, true, false)));
$priceWeeeXmlObj = $pricesXmlObj->addCustomChild('price', null, array('id' => 'weee'));
foreach ($weeeTaxAttributes as $weeeTaxAttribute) {
$amount = $weeeTaxAttribute->getAmount() + $weeeTaxAttribute->getTaxAmount();
$priceWeeeXmlObj->addCustomChild('item', $amount * 1, array('id' => 'weee_tax', 'label' => $weeeTaxAttribute->getName(), 'formatted_value' => $coreHelper->currency($amount, true, false)));
}
} elseif ($weeeTaxAmount && $weeeHelper->typeOfDisplay($product, 2)) {
/**
* Excluding + Weee + Final
*/
$pricesXmlObj = $priceListXmlObj->addCustomChild('prices', null, array('id' => 'price'));
$pricesXmlObj->addCustomChild('price', $price, array('id' => 'excluding_tax', 'label' => $this->__('Excl. Tax'), 'formatted_value' => $coreHelper->currency($price, true, false)));
$priceWeeeXmlObj = $pricesXmlObj->addCustomChild('price', null, array('id' => 'weee'));
foreach ($weeeTaxAttributes as $weeeTaxAttribute) {
$priceWeeeXmlObj->addCustomChild('item', $weeeTaxAttribute->getAmount() * 1, array('id' => 'weee_tax', 'label' => $weeeTaxAttribute->getName(), 'formatted_value' => $coreHelper->currency($weeeTaxAttribute->getAmount(), true, false)));
}
$inclTaxValue = $finalPriceInclTax + $weeeTaxAmount;
$pricesXmlObj->addCustomChild('price', $inclTaxValue, array('id' => 'including_tax', 'label' => $this->__('Incl. Tax'), 'formatted_value' => $coreHelper->currency($inclTaxValue, true, false)));
} else {
$pricesXmlObj = $priceListXmlObj->addCustomChild('prices', null, array('id' => 'price'));
$pricesXmlObj->addCustomChild('price', $price, array('id' => 'excluding_tax', 'label' => $this->__('Excl. Tax'), 'formatted_value' => $coreHelper->currency($price, true, false)));
$pricesXmlObj->addCustomChild('price', $finalPriceInclTax, array('id' => 'including_tax', 'label' => $this->__('Incl. Tax'), 'formatted_value' => $coreHelper->currency($finalPriceInclTax, true, false)));
}
/**
* if ($taxHelper->displayBothPrices()) {
*/
} else {
/**
* Including
*/
if ($weeeTaxAmount && $weeeHelper->typeOfDisplay($product, 0)) {
$pricesXmlObj = $priceListXmlObj->addCustomChild('prices', null, array('id' => 'price'));
$pricesXmlObj->addCustomChild('price', $price + $weeeTaxAmount, array('id' => 'regular', 'label' => $this->__('Unit Price'), 'formatted_value' => $coreHelper->currency($price + $weeeTaxAmount, true, false)));
//.........这里部分代码省略.........