Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_XmlConnect_Adminhtml_MobileController
  • Mage_XmlConnect_Block_Adminhtml_History
  • Mage_XmlConnect_Block_Adminhtml_History_Grid
  • Mage_XmlConnect_Block_Adminhtml_Mobile
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Cache
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Content
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Images
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Themes
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Preview
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Themes
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Flurryanalytics
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_General
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Notification
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Payment
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Settings
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Social
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Submission_History
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Addrow
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Color
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Country
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Datetime
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Font
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Image
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Page
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Theme
  • Mage_Xmlconnect_Block_Adminhtml_Mobile_Grid
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Grid_Renderer_Bool
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Grid_Renderer_Type
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Content
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Tabitems
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Form
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Androidmarket
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Istore
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tab_Container
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tab_Container_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
  • Mage_XmlConnect_Block_Adminhtml_Queue
  • Mage_XmlConnect_Block_Adminhtml_Queue_Edit
  • Mage_XmlConnect_Block_Adminhtml_Queue_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Action
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Application
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Id
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Msgtitle
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Pushtitle
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Status
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Template
  • Mage_XmlConnect_Block_Adminhtml_Template
  • Mage_XmlConnect_Block_Adminhtml_Template_Edit
  • Mage_XmlConnect_Block_Adminhtml_Template_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid_Renderer_Application
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid_Renderer_Name
  • Mage_XmlConnect_Block_Adminhtml_Template_Preview
  • Mage_XmlConnect_Block_Adminhtml_Template_Preview_Form
  • Mage_XmlConnect_Block_Cart
  • Mage_XmlConnect_Block_Cart_Crosssell
  • Mage_XmlConnect_Block_Cart_Info
  • Mage_XmlConnect_Block_Cart_Item_Renderer
  • Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable
  • Mage_XmlConnect_Block_Cart_Item_Renderer_Grouped
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Details
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Review
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Shippingmethods
  • Mage_XmlConnect_Block_Cart_Paypal_Mep_Totals
  • Mage_XmlConnect_Block_Cart_Totals
  • Mage_XmlConnect_Block_Catalog
  • Mage_XmlConnect_Block_Catalog_Category
  • Mage_XmlConnect_Block_Catalog_Category_Info
  • Mage_XmlConnect_Block_Catalog_Filters
  • Mage_XmlConnect_Block_Catalog_Product
  • Mage_XmlConnect_Block_Catalog_Product_Attributes
  • Mage_XmlConnect_Block_Catalog_Product_Gallery
  • Mage_XmlConnect_Block_Catalog_Product_List
  • Mage_XmlConnect_Block_Catalog_Product_Options
  • Mage_XmlConnect_Block_Catalog_Product_Options_Bundle
  • Mage_XmlConnect_Block_Catalog_Product_Options_Configurable
  • Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
  • Mage_XmlConnect_Block_Catalog_Product_Options_Grouped
  • Mage_XmlConnect_Block_Catalog_Product_Options_Simple
  • Mage_XmlConnect_Block_Catalog_Product_Options_Virtual
  • Mage_XmlConnect_Block_Catalog_Product_Price
  • Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
  • Mage_XmlConnect_Block_Catalog_Product_Price_Default
  • Mage_XmlConnect_Block_Catalog_Product_Price_Giftcard
  • Mage_XmlConnect_Block_Catalog_Product_Related
  • Mage_XmlConnect_Block_Catalog_Product_Review
  • Mage_XmlConnect_Block_Catalog_Product_Review_List
  • Mage_XmlConnect_Block_Catalog_Search
  • Mage_XmlConnect_Block_Catalog_Search_Suggest
  • Mage_XmlConnect_Block_Checkout_Address_Billing
  • Mage_XmlConnect_Block_Checkout_Address_Form
  • Mage_XmlConnect_Block_Checkout_Address_Shipping
  • Mage_XmlConnect_Block_Checkout_Agreements
  • Mage_XmlConnect_Block_Checkout_Order_Review
  • Mage_XmlConnect_Block_Checkout_Order_Review_Info
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Ccsave
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Checkmo
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Ccsave
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Checkmo
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Free
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Abstract
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Express
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Mecl
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Paypal_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Paypaluk_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Verisign
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Purchaseorder
  • Mage_XmlConnect_Block_Checkout_Payment_Method_List
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Paypal_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Paypal_Payflow
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Abstract
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Paypal
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Paypaluk
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Verisign
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Purchaseorder
  • Mage_XmlConnect_Block_Checkout_Pbridge_Result
  • Mage_XmlConnect_Block_Checkout_Shipping_Method_Available
  • Mage_XmlConnect_Block_Cms_Page
  • Mage_XmlConnect_Block_Configuration
  • Mage_XmlConnect_Block_Customer_Address_Form
  • Mage_XmlConnect_Block_Customer_Address_List
  • Mage_XmlConnect_Block_Customer_Form
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Boolean
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Date
  • Mage_XmlConnect_Block_Customer_Form_Renderer_File
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Image
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Multiline
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Multiselect
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Select
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Text
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Textarea
  • Mage_XmlConnect_Block_Customer_GiftcardCheck
  • Mage_XmlConnect_Block_Customer_Order_Details
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Bundle
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Default
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Downloadable
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Giftcard
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Grouped
  • Mage_XmlConnect_Block_Customer_Order_Items
  • Mage_XmlConnect_Block_Customer_Order_List
  • Mage_XmlConnect_Block_Customer_Order_Totals
  • Mage_XmlConnect_Block_Customer_Order_Totals_Customerbalance
  • Mage_XmlConnect_Block_Customer_Order_Totals_Customerbalance_Refunded
  • Mage_XmlConnect_Block_Customer_Order_Totals_Giftcards
  • Mage_XmlConnect_Block_Customer_Order_Totals_Tax
  • Mage_XmlConnect_Block_Customer_Storecredit
  • Mage_XmlConnect_Block_Home
  • Mage_XmlConnect_Block_Review_Form
  • Mage_XmlConnect_Block_Wishlist
  • Mage_XmlConnect_CartController
  • Mage_XmlConnect_CatalogController
  • Mage_XmlConnect_CheckoutController
  • Mage_XmlConnect_CmsController
  • Mage_XmlConnect_ConfigurationController
  • Mage_XmlConnect_Controller_Action
  • Mage_XmlConnect_CustomerController
  • Mage_XmlConnect_Helper_Android
  • Mage_XmlConnect_Helper_Catalog_Category_Image
  • Mage_XmlConnect_Helper_Customer_Form_Renderer
  • Mage_XmlConnect_Helper_Customer_Order
  • Mage_XmlConnect_Helper_Data
  • Mage_XmlConnect_Helper_Image
  • Mage_XmlConnect_Helper_Ipad
  • Mage_XmlConnect_Helper_Iphone
  • Mage_XmlConnect_Helper_Theme
  • Mage_XmlConnect_IndexController
  • Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Baseurl
  • Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Currency_Default
  • Mage_XmlConnect_Model_Application
  • Mage_XmlConnect_Model_Catalog_Category_Image
  • Mage_XmlConnect_Model_ConfigData
  • Mage_XmlConnect_Model_History
  • Mage_XmlConnect_Model_Mysql4_Application
  • Mage_XmlConnect_Model_Mysql4_Application_Collection
  • Mage_XmlConnect_Model_Mysql4_Cms_Page_Collection
  • Mage_XmlConnect_Model_Mysql4_ConfigData
  • Mage_XmlConnect_Model_Mysql4_ConfigData_Collection
  • Mage_XmlConnect_Model_Mysql4_Filter_Collection
  • Mage_XmlConnect_Model_Mysql4_History
  • Mage_XmlConnect_Model_Mysql4_History_Collection
  • Mage_XmlConnect_Model_Mysql4_Queue
  • Mage_XmlConnect_Model_Mysql4_Queue_Collection
  • Mage_XmlConnect_Model_Mysql4_Setup
  • Mage_XmlConnect_Model_Mysql4_Template
  • Mage_XmlConnect_Model_Mysql4_Template_Collection
  • Mage_XmlConnect_Model_Observer
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Config
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Mecl
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Mep
  • Mage_XmlConnect_Model_Paypal_Mecl_Checkout
  • Mage_XmlConnect_Model_Paypal_Mep_Checkout
  • Mage_XmlConnect_Model_Preview_Abstract
  • Mage_XmlConnect_Model_Preview_Android
  • Mage_XmlConnect_Model_Preview_Ipad
  • Mage_XmlConnect_Model_Preview_Iphone
  • Mage_XmlConnect_Model_Queue
  • Mage_XmlConnect_Model_Resource_Application
  • Mage_XmlConnect_Model_Resource_Application_Collection
  • Mage_XmlConnect_Model_Resource_Cms_Page_Collection
  • Mage_XmlConnect_Model_Resource_ConfigData
  • Mage_XmlConnect_Model_Resource_ConfigData_Collection
  • Mage_XmlConnect_Model_Resource_Filter_Collection
  • Mage_XmlConnect_Model_Resource_History
  • Mage_XmlConnect_Model_Resource_History_Collection
  • Mage_XmlConnect_Model_Resource_Queue
  • Mage_XmlConnect_Model_Resource_Queue_Collection
  • Mage_XmlConnect_Model_Resource_Setup
  • Mage_XmlConnect_Model_Resource_Template
  • Mage_XmlConnect_Model_Resource_Template_Collection
  • Mage_XmlConnect_Model_Simplexml_Element
  • Mage_XmlConnect_Model_Simplexml_Form
  • Mage_XmlConnect_Model_Simplexml_Form_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Checkbox
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Collection
  • Mage_XmlConnect_Model_Simplexml_Form_Element_CountryListSelect
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Date
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Email
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset
  • Mage_XmlConnect_Model_Simplexml_Form_Element_File
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Image
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Multiline
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Multiselect
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Select
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Text
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Textarea
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator_Rule
  • Mage_XmlConnect_Model_Tabs
  • Mage_XmlConnect_Model_Template
  • Mage_XmlConnect_Model_Theme
  • Mage_XmlConnect_Paypal_MeclController
  • Mage_XmlConnect_Paypal_MepController
  • Mage_XmlConnect_PbridgeController
  • Mage_XmlConnect_ReviewController
  • Mage_XmlConnect_WishlistController

Interfaces

  • Mage_XmlConnect_Model_Simplexml_Form_Element_Renderer_Interface
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Magento
  4:  *
  5:  * NOTICE OF LICENSE
  6:  *
  7:  * This source file is subject to the Open Software License (OSL 3.0)
  8:  * that is bundled with this package in the file LICENSE.txt.
  9:  * It is also available through the world-wide-web at this URL:
 10:  * http://opensource.org/licenses/osl-3.0.php
 11:  * If you did not receive a copy of the license and are unable to
 12:  * obtain it through the world-wide-web, please send an email
 13:  * to license@magentocommerce.com so we can send you a copy immediately.
 14:  *
 15:  * DISCLAIMER
 16:  *
 17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
 18:  * versions in the future. If you wish to customize Magento for your
 19:  * needs please refer to http://www.magentocommerce.com for more information.
 20:  *
 21:  * @category    Mage
 22:  * @package     Mage_XmlConnect
 23:  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 24:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 25:  */
 26: 
 27: /**
 28:  * Shopping cart xml renderer
 29:  *
 30:  * @category    Mage
 31:  * @package     Mage_Xmlconnect
 32:  * @author      Magento Core Team <core@magentocommerce.com>
 33:  */
 34: class Mage_XmlConnect_Block_Cart extends Mage_Checkout_Block_Cart_Abstract
 35: {
 36:     /**
 37:      * Render shopping cart xml
 38:      *
 39:      * @return string
 40:      */
 41:     protected function _toHtml()
 42:     {
 43:         $cartMessages   = $this->getMessages();
 44:         $quote          = $this->getQuote();
 45:         /** @var $xmlObject Mage_XmlConnect_Model_Simplexml_Element */
 46:         $xmlObject      = Mage::getModel('xmlconnect/simplexml_element', '<cart></cart>');
 47:         $xmlObject->addAttribute('is_virtual', (int)$this->helper('checkout/cart')->getIsVirtualQuote());
 48:         $xmlObject->addAttribute('summary_qty', (int)$this->helper('checkout/cart')->getSummaryCount());
 49:         if (strlen($quote->getCouponCode())) {
 50:             $xmlObject->addAttribute('has_coupon_code', 1);
 51:         }
 52:         $products = $xmlObject->addChild('products');
 53:          /* @var $item Mage_Sales_Model_Quote_Item */
 54:         foreach ($this->getItems() as $item) {
 55:             $type = $item->getProductType();
 56:             $renderer = $this->getItemRenderer($type)->setItem($item);
 57:             /**
 58:              * General information
 59:              */
 60:             $itemXml = $products->addChild('item');
 61:             $itemXml->addChild('entity_id', $item->getProduct()->getId());
 62:             $itemXml->addChild('entity_type', $type);
 63:             $itemXml->addChild('item_id', $item->getId());
 64:             $itemXml->addChild('name', $xmlObject->escapeXml($renderer->getProductName()));
 65:             $itemXml->addChild('code', 'cart[' . $item->getId() . '][qty]');
 66:             $itemXml->addChild('qty', $renderer->getQty());
 67:             $icon = $renderer->getProductThumbnail()->resize(
 68:                 Mage::helper('xmlconnect/image')->getImageSizeForContent('product_small')
 69:             );
 70:             $iconXml = $itemXml->addChild('icon', $icon);
 71:             $file = Mage::helper('xmlconnect')->urlToPath($icon);
 72:             $iconXml->addAttribute('modification_time', filemtime($file));
 73:             /**
 74:              * Price
 75:              */
 76:             $exclPrice = $inclPrice = 0;
 77:             if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) {
 78:                 if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales')
 79:                     && $item->getWeeeTaxAppliedAmount()
 80:                 ) {
 81:                     $exclPrice = $item->getCalculationPrice() + $item->getWeeeTaxAppliedAmount()
 82:                         + $item->getWeeeTaxDisposition();
 83:                 } else {
 84:                     $exclPrice = $item->getCalculationPrice();
 85:                 }
 86:             }
 87:             if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()) {
 88:                 $_incl = $this->helper('checkout')->getPriceInclTax($item);
 89:                 if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales')
 90:                     && $item->getWeeeTaxAppliedAmount()
 91:                 ) {
 92:                     $inclPrice = $_incl + $item->getWeeeTaxAppliedAmount();
 93:                 } else {
 94:                     $inclPrice = $_incl - $item->getWeeeTaxDisposition();
 95:                 }
 96:             }
 97:             $exclPrice = Mage::helper('xmlconnect')->formatPriceForXml($exclPrice);
 98:             $paypalPrice = Mage::helper('xmlconnect')->formatPriceForXml($item->getCalculationPrice());
 99:             $formattedExclPrice = $quote->getStore()->formatPrice($exclPrice, false);
100:             $inclPrice = Mage::helper('xmlconnect')->formatPriceForXml($inclPrice);
101:             $formattedInclPrice = $quote->getStore()->formatPrice($inclPrice, false);
102: 
103:             $priceXmlObj = $itemXml->addChild('price');
104:             $formattedPriceXmlObj = $itemXml->addChild('formated_price');
105: 
106:             if ($this->helper('tax')->displayCartBothPrices()) {
107:                 $priceXmlObj->addAttribute('excluding_tax', $exclPrice);
108:                 $priceXmlObj->addAttribute('including_tax', $inclPrice);
109: 
110:                 $formattedPriceXmlObj->addAttribute('excluding_tax', $formattedExclPrice);
111:                 $formattedPriceXmlObj->addAttribute('including_tax', $formattedInclPrice);
112:             } else {
113:                 if ($this->helper('tax')->displayCartPriceExclTax()) {
114:                     $priceXmlObj->addAttribute('regular', $exclPrice);
115:                     $formattedPriceXmlObj->addAttribute('regular', $formattedExclPrice);
116:                 }
117:                 if ($this->helper('tax')->displayCartPriceInclTax()) {
118:                     $priceXmlObj->addAttribute('regular', $inclPrice);
119:                     $formattedPriceXmlObj->addAttribute('regular', $formattedInclPrice);
120:                 }
121:             }
122: 
123:             /**
124:              * Info for paypal MEP if it's enabled
125:              */
126:             $appConfig = Mage::helper('xmlconnect')->getApplication()->loadConfiguration()->getRenderConf();
127: 
128:             $isMepActive = $appConfig['paypal']['isActive'];
129: 
130:             $paypalMepIsAvailable = Mage::getModel('xmlconnect/payment_method_paypal_mep')->isAvailable(null);
131:             if ($paypalMepIsAvailable && $isMepActive) {
132:                 $paypalPriceXmlObj = $itemXml->addChild('paypal_price');
133:                 $paypalPriceXmlObj->addAttribute('regular', $paypalPrice);
134:                 $paypalPriceXmlObj->addAttribute(
135:                     'subtotal', Mage::helper('xmlconnect')->formatPriceForXml($item->getRowTotal())
136:                 );
137:             }
138: 
139:             /**
140:              * Subtotal
141:              */
142:             $exclPrice = $inclPrice = 0;
143:             if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) {
144:                 if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales')
145:                     && $item->getWeeeTaxAppliedAmount()
146:                 ) {
147:                     $exclPrice = $item->getRowTotal() + $item->getWeeeTaxAppliedRowAmount()
148:                         + $item->getWeeeTaxRowDisposition();
149:                 } else {
150:                      $exclPrice = $item->getRowTotal();
151:                 }
152:             }
153:             if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()) {
154:                 $_incl = $this->helper('checkout')->getSubtotalInclTax($item);
155:                 if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales')
156:                     && $item->getWeeeTaxAppliedAmount()
157:                 ) {
158:                     $inclPrice = $_incl + $item->getWeeeTaxAppliedRowAmount();
159:                 } else {
160:                     $inclPrice = $_incl - $item->getWeeeTaxRowDisposition();
161:                 }
162:             }
163: 
164:             $exclPrice = Mage::helper('xmlconnect')->formatPriceForXml($exclPrice);
165:             $formattedExclPrice = $quote->getStore()->formatPrice($exclPrice, false);
166: 
167:             $inclPrice = Mage::helper('xmlconnect')->formatPriceForXml($inclPrice);
168:             $formattedInclPrice = $quote->getStore()->formatPrice($inclPrice, false);
169: 
170:             $subtotalPriceXmlObj = $itemXml->addChild('subtotal');
171:             $subtotalFormattedPriceXmlObj = $itemXml->addChild('formated_subtotal');
172: 
173:             if ($this->helper('tax')->displayCartBothPrices()) {
174:                 $subtotalPriceXmlObj->addAttribute('excluding_tax', $exclPrice);
175:                 $subtotalPriceXmlObj->addAttribute('including_tax', $inclPrice);
176: 
177:                 $subtotalFormattedPriceXmlObj->addAttribute('excluding_tax', $formattedExclPrice);
178:                 $subtotalFormattedPriceXmlObj->addAttribute('including_tax', $formattedInclPrice);
179:             } else {
180:                 if ($this->helper('tax')->displayCartPriceExclTax()) {
181:                     $subtotalPriceXmlObj->addAttribute('regular', $exclPrice);
182:                     $subtotalFormattedPriceXmlObj->addAttribute('regular', $formattedExclPrice);
183:                 }
184:                 if ($this->helper('tax')->displayCartPriceInclTax()) {
185:                     $subtotalPriceXmlObj->addAttribute('regular', $inclPrice);
186:                     $subtotalFormattedPriceXmlObj->addAttribute('regular', $formattedInclPrice);
187:                 }
188:             }
189: 
190:             /**
191:              * Options list
192:              */
193:             $_options = $renderer->getOptionList();
194:             if ($_options) {
195:                 $itemOptionsXml = $itemXml->addChild('options');
196:                 foreach ($_options as $_option) {
197:                     $_formattedOptionValue = $renderer->getFormatedOptionValue($_option);
198:                     $optionXml = $itemOptionsXml->addChild('option');
199:                     $optionXml->addAttribute('label', $xmlObject->xmlAttribute($_option['label']));
200:                     $optionXml->addAttribute('text', $xmlObject->xmlAttribute($_formattedOptionValue['value']));
201:                 }
202:             }
203: 
204:             /**
205:              * Item messages
206:              */
207:             $messages = $renderer->getMessages();
208:             if ($messages) {
209:                 $itemMessagesXml = $itemXml->addChild('messages');
210:                 foreach ($messages as $message) {
211:                     $messageXml = $itemMessagesXml->addChild('option');
212:                     $messageXml->addChild('type', $message['type']);
213:                     $messageXml->addChild('text', $xmlObject->escapeXml($message['text']));
214:                 }
215:             }
216:         }
217: 
218:         /**
219:          * Cart messages
220:          */
221:         if ($cartMessages) {
222:             $messagesXml = $xmlObject->addChild('messages');
223:             foreach ($cartMessages as $status => $messages) {
224:                 foreach ($messages as $message) {
225:                     $messageXml = $messagesXml->addChild('message');
226:                     $messageXml->addChild('status', $status);
227:                     $messageXml->addChild('text', strip_tags($message));
228:                 }
229:             }
230:         }
231: 
232:         /**
233:          * Cross Sell Products
234:          */
235:         if (count($this->getItems())) {
236:             $crossellXml = $this->getChildHtml('crosssell');
237:         } else {
238:             $crossellXml = '<crosssell></crosssell>';
239:         }
240: 
241:         $crossSellXmlObj = Mage::getModel('xmlconnect/simplexml_element', $crossellXml);
242:         $xmlObject->appendChild($crossSellXmlObj);
243: 
244:         return $xmlObject->asNiceXml();
245:     }
246: }
247: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0