Version Notes
1.7.0.1.23.0 version of package
internal svn revision #3cd616975d5927903d4f34bde0d9e5e2e727e9ba
Download this release
Release Info
Developer | Magento Core Team |
Extension | Magento_Mobile |
Version | 1.7.0.1.23.0 |
Comparing to | |
See all releases |
Code changes from version 1.7.0.1.22.1 to 1.7.0.1.23.0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit.php +71 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Form.php +55 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Tab/Settings.php +108 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Tabs.php +62 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Config.php +68 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard.php +249 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/BestSellers.php +113 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/Customers.php +129 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphAmountsData.php +71 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphDataAbstract.php +350 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphInfo.php +160 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphOrderData.php +71 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphTotalsData.php +123 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/LastOrders.php +85 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/LastSearchTerms.php +118 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/MostViewedProducts.php +117 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/NewCustomers.php +129 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/SalesInfo.php +119 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/StoreSwitcher.php +198 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/TopSearchTerms.php +114 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Loginform.php +70 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/History.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/History/Grid.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile.php +3 -7
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Form.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Submission.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Cache.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Content.php +55 -35
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion.php +2 -2
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php +24 -9
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Tabs.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Themes.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Images.php +192 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Preview.php +4 -7
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Themes.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php +9 -9
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/OfflineCatalog.php +115 -0
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php +3 -15
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Settings.php +11 -15
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php +12 -27
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Submission/History.php +2 -2
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tabs.php +3 -6
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Addrow.php +9 -19
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Color.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Datetime.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Font.php +3 -6
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Image.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Page.php +5 -8
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Tabs.php +4 -7
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Theme.php +4 -6
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Bool.php +3 -7
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Type.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Content.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Tabitems.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Form.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Androidmarket.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Istore.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container/Submission.php +18 -18
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tabs.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Widget/Form.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php +3 -5
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php +8 -11
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php +4 -5
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Action.php +3 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Application.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Id.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Msgtitle.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Pushtitle.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Status.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Template.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php +6 -5
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php +4 -9
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Application.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Name.php +2 -2
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview/Form.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Cart.php +31 -19
- app/code/core/Mage/XmlConnect/Block/Cart/CartTotals.php +95 -0
- app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Default.php +93 -0
- app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Grandtotal.php +107 -0
- app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Nodes/Default.php +63 -0
- app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Nodes/Giftcardaccount.php +69 -0
- app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Shipping.php +113 -0
- app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Subtotal.php +108 -0
- app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php +7 -8
- app/code/core/Mage/XmlConnect/Block/Cart/Info.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php +260 -66
- app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Configurable.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Grouped.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Cart/Items.php +254 -0
- app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php +6 -10
- app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/OrderDetails.php +83 -0
- app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php +16 -14
- app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php +105 -29
- app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mep/Totals.php +2 -5
- app/code/core/Mage/XmlConnect/Block/Cart/Totals.php +6 -9
- app/code/core/Mage/XmlConnect/Block/Catalog.php +60 -6
- app/code/core/Mage/XmlConnect/Block/Catalog/Category.php +11 -7
- app/code/core/Mage/XmlConnect/Block/Catalog/Category/Info.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Catalog/Filters.php +3 -2
- app/code/core/Mage/XmlConnect/Block/Catalog/Product.php +36 -26
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php +2 -2
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php +14 -15
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/ItemPrice.php +98 -0
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/ItemPrice/Bundle.php +426 -0
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/ItemPrice/Default.php +740 -0
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/ItemPrice/Giftcard.php +98 -0
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php +18 -10
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php +85 -2
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php +33 -17
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php +36 -27
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Downloadable.php +113 -0
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php +12 -12
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Simple.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Virtual.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php +141 -159
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Default.php +266 -268
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Giftcard.php +9 -8
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Related.php +3 -3
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review.php +2 -1
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review/List.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Catalog/Search.php +5 -5
- app/code/core/Mage/XmlConnect/Block/Catalog/Search/Suggest.php +2 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Address/Billing.php +3 -4
- app/code/core/Mage/XmlConnect/Block/Checkout/Address/Form.php +44 -95
- app/code/core/Mage/XmlConnect/Block/Checkout/Address/Shipping.php +2 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Agreements.php +2 -2
- app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer.php +48 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Bundle.php +49 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Configurable.php +53 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Downloadable.php +49 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Giftcard.php +49 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Grouped.php +52 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Onepage/Address.php +69 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Onepage/Address/Form.php +114 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Onepage/Address/List.php +112 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Onepage/Review.php +64 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review/Info.php +29 -19
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Authorizenet.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Ccsave.php +4 -4
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Checkmo.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Authorizenet.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Ccsave.php +3 -3
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Checkmo.php +2 -4
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Free.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Abstract.php +5 -8
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Express.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Mecl.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Authorizenet.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypal/Direct.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypaluk/Direct.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Verisign.php +4 -6
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Purchaseorder.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php +120 -61
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/ListApi23.php +133 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Direct.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Payflow.php +10 -10
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Abstract.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Authorizenet.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Paypal.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Paypaluk.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Verisign.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Purchaseorder.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Pbridge/Result.php +2 -2
- app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/Available.php +18 -17
- app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/AvailableList.php +82 -0
- app/code/core/Mage/XmlConnect/Block/Cms/Page.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Configuration.php +40 -21
- app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php +47 -80
- app/code/core/Mage/XmlConnect/Block/Customer/Address/List.php +13 -13
- app/code/core/Mage/XmlConnect/Block/Customer/Downloads.php +80 -0
- app/code/core/Mage/XmlConnect/Block/Customer/Form.php +151 -48
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Boolean.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Date.php +17 -15
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/File.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Image.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Multiline.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Multiselect.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Select.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Text.php +6 -5
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Textarea.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/GiftcardCheck.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Details.php +11 -14
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Bundle.php +143 -12
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Default.php +74 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Downloadable.php +85 -14
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Giftcard.php +3 -3
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Grouped.php +6 -4
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Items.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Customer/Order/List.php +14 -16
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals.php +61 -11
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance.php +26 -2
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance/Refunded.php +26 -4
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Giftcards.php +40 -6
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Tax.php +45 -4
- app/code/core/Mage/XmlConnect/Block/Customer/Storecredit.php +2 -2
- app/code/core/Mage/XmlConnect/Block/Home.php +6 -4
- app/code/core/Mage/XmlConnect/Block/Homebanners.php +156 -0
- app/code/core/Mage/XmlConnect/Block/Localization.php +55 -0
- app/code/core/Mage/XmlConnect/Block/Review/Form.php +3 -2
- app/code/core/Mage/XmlConnect/Block/ShoppingCart.php +108 -0
- app/code/core/Mage/XmlConnect/Block/Wishlist.php +7 -6
- app/code/core/Mage/XmlConnect/Controller/Action.php +37 -12
- app/code/core/Mage/XmlConnect/Controller/AdminAction.php +192 -0
- app/code/core/Mage/XmlConnect/Helper/AdminApplication.php +134 -0
- app/code/core/Mage/XmlConnect/Helper/Adminhtml/Dashboard/Order.php +68 -0
- app/code/core/Mage/XmlConnect/Helper/Android.php +43 -65
- app/code/core/Mage/XmlConnect/Helper/Catalog/Category/Image.php +59 -5
- app/code/core/Mage/XmlConnect/Helper/Catalog/Product/Image.php +46 -0
- app/code/core/Mage/XmlConnect/Helper/Customer/Form/Renderer.php +179 -1
- app/code/core/Mage/XmlConnect/Helper/Customer/Order.php +194 -32
- app/code/core/Mage/XmlConnect/Helper/Data.php +128 -33
- app/code/core/Mage/XmlConnect/Helper/Device/Abstract.php +309 -0
- app/code/core/Mage/XmlConnect/Helper/Image.php +50 -23
- app/code/core/Mage/XmlConnect/Helper/Ipad.php +66 -113
- app/code/core/Mage/XmlConnect/Helper/Iphone.php +40 -205
- app/code/core/Mage/XmlConnect/Helper/OfflineCatalog.php +307 -0
- app/code/core/Mage/XmlConnect/Helper/Payment.php +1 -1
- app/code/core/Mage/XmlConnect/Helper/Theme.php +49 -8
- app/code/core/Mage/XmlConnect/Helper/Translate.php +514 -0
- app/code/core/Mage/XmlConnect/Model/Adminhtml/Search/Catalog.php +71 -0
- app/code/core/Mage/XmlConnect/Model/Adminhtml/Search/Category.php +70 -0
- app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php +2 -2
- app/code/core/Mage/XmlConnect/Model/Application.php +195 -77
- app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php +29 -12
- app/code/core/Mage/XmlConnect/Model/Catalog/Category/Media/Config.php +1 -1
- app/code/core/Mage/XmlConnect/Model/ConfigData.php +122 -10
- app/code/core/Mage/XmlConnect/Model/Configuration.php +271 -0
- app/code/core/Mage/XmlConnect/Model/Device/Abstract.php +179 -0
- app/code/core/Mage/XmlConnect/Model/Device/Android.php +111 -0
- app/code/core/Mage/XmlConnect/Model/Device/Ipad.php +174 -0
- app/code/core/Mage/XmlConnect/Model/Device/Iphone.php +117 -0
- app/code/core/Mage/XmlConnect/Model/History.php +1 -1
- app/code/core/Mage/XmlConnect/Model/ImageAction.php +321 -0
- app/code/core/Mage/XmlConnect/Model/ImageLimits.php +366 -0
- app/code/core/Mage/XmlConnect/Model/ImageLimits/Abstract.php +295 -0
- app/code/core/Mage/XmlConnect/Model/Images.php +551 -0
- app/code/core/Mage/XmlConnect/Model/Mysql4/Application.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/Application/Collection.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/Cms/Page/Collection.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/ConfigData.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/ConfigData/Collection.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/Filter/Collection.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/History.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/History/Collection.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/Queue.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/Queue/Collection.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/Setup.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/Template.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Mysql4/Template/Collection.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Observer.php +78 -8
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog.php +117 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Abstract.php +66 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Category.php +120 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Category/Category.php +61 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Category/IndexCategory.php +61 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Config.php +77 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Home.php +61 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Homebanners.php +61 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Product.php +111 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Product/Gallery.php +61 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Product/Product.php +61 -0
- app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Product/Review.php +61 -0
- app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Config.php +16 -1
- app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mecl.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mep.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Paypal/Mecl/Checkout.php +25 -1
- app/code/core/Mage/XmlConnect/Model/Paypal/Mep/Checkout.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Preview/Abstract.php +58 -6
- app/code/core/Mage/XmlConnect/Model/Preview/Android.php +14 -7
- app/code/core/Mage/XmlConnect/Model/Preview/Ipad.php +50 -45
- app/code/core/Mage/XmlConnect/Model/Preview/Iphone.php +0 -0
app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Xmlconnect edit admin application settings block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Admin_Application_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Setting action buttons for admin application settings
|
38 |
+
*/
|
39 |
+
public function __construct()
|
40 |
+
{
|
41 |
+
$this->_objectId = 'id';
|
42 |
+
$this->_controller = 'adminhtml_admin_application';
|
43 |
+
$this->_blockGroup = 'xmlconnect';
|
44 |
+
parent::__construct();
|
45 |
+
|
46 |
+
$this->_removeButton('back');
|
47 |
+
$this->_removeButton('reset');
|
48 |
+
$this->_removeButton('delete');
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get header text
|
53 |
+
*
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function getHeaderText()
|
57 |
+
{
|
58 |
+
return $this->__('Admin Application Settings');
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Check permission for passed action
|
63 |
+
*
|
64 |
+
* @param string $action
|
65 |
+
* @return bool
|
66 |
+
*/
|
67 |
+
protected function _isAllowedAction($action)
|
68 |
+
{
|
69 |
+
return true;
|
70 |
+
}
|
71 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Form.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Admin application form block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Admin_Application_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Prepare form before rendering HTML
|
38 |
+
* Setting Form Fieldsets and fields
|
39 |
+
*
|
40 |
+
* @return Mage_Adminhtml_Block_Widget_Form
|
41 |
+
*/
|
42 |
+
protected function _prepareForm()
|
43 |
+
{
|
44 |
+
/** @var $form Varien_Data_Form */
|
45 |
+
$form = Mage::getModel('varien/data_form', array(
|
46 |
+
'id' => 'edit_form',
|
47 |
+
'action' => $this->getUrl('*/admin_application', array('_current' => true)),
|
48 |
+
'method' => 'post'
|
49 |
+
));
|
50 |
+
|
51 |
+
$form->setUseContainer(true);
|
52 |
+
$this->setForm($form);
|
53 |
+
return parent::_prepareForm();
|
54 |
+
}
|
55 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Tab/Settings.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Tab for Settings Management
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Admin_Application_Edit_Tab_Settings
|
35 |
+
extends Mage_Adminhtml_Block_Widget_Form
|
36 |
+
implements Mage_Adminhtml_Block_Widget_Tab_Interface
|
37 |
+
{
|
38 |
+
/**
|
39 |
+
* Prepare form before rendering HTML
|
40 |
+
* Setting Form Fieldsets and fields
|
41 |
+
*
|
42 |
+
* @return Mage_Adminhtml_Block_Widget_Form
|
43 |
+
*/
|
44 |
+
protected function _prepareForm()
|
45 |
+
{
|
46 |
+
/** @var $form Varien_Data_Form */
|
47 |
+
$form = Mage::getModel('varien/data_form', array(
|
48 |
+
'id' => 'edit_form',
|
49 |
+
'action' => $this->getUrl('*/admin_application', array('_current' => true)),
|
50 |
+
'method' => 'post'
|
51 |
+
));
|
52 |
+
|
53 |
+
$form->setHtmlIdPrefix('admin_app_');
|
54 |
+
$fieldset = $form->addFieldset('base_fieldset', array('legend' => $this->__('Admin Application Settings')));
|
55 |
+
|
56 |
+
$fieldset->addField('type', 'select', array(
|
57 |
+
'name' => 'is_active',
|
58 |
+
'label' => $this->__('Enable Admin Application'),
|
59 |
+
'title' => $this->__('Enable Admin Application'),
|
60 |
+
'values' => Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray(),
|
61 |
+
'required' => true,
|
62 |
+
'value' => (int)Mage::getSingleton('xmlconnect/configuration')->isActiveAdminApp()
|
63 |
+
));
|
64 |
+
|
65 |
+
$this->setForm($form);
|
66 |
+
return parent::_prepareForm();
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Tab label getter
|
71 |
+
*
|
72 |
+
* @return string
|
73 |
+
*/
|
74 |
+
public function getTabLabel()
|
75 |
+
{
|
76 |
+
return $this->__('Settings');
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Tab title getter
|
81 |
+
*
|
82 |
+
* @return string
|
83 |
+
*/
|
84 |
+
public function getTabTitle()
|
85 |
+
{
|
86 |
+
return $this->__('Settings');
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Check if tab can be shown
|
91 |
+
*
|
92 |
+
* @return bool
|
93 |
+
*/
|
94 |
+
public function canShowTab()
|
95 |
+
{
|
96 |
+
return true;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Check if tab hidden
|
101 |
+
*
|
102 |
+
* @return bool
|
103 |
+
*/
|
104 |
+
public function isHidden()
|
105 |
+
{
|
106 |
+
return false;
|
107 |
+
}
|
108 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Tabs.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Admin Application Settings Tabs block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Admin_Application_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Setting tab id, DOM destination element id, title
|
38 |
+
*/
|
39 |
+
public function __construct()
|
40 |
+
{
|
41 |
+
parent::__construct();
|
42 |
+
$this->setId('admin_application_app_tabs');
|
43 |
+
$this->setDestElementId('edit_form');
|
44 |
+
$this->setTitle($this->__('Admin Mobile Application'));
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Preparing global layout
|
49 |
+
*
|
50 |
+
* @return Mage_Core_Block_Abstract
|
51 |
+
*/
|
52 |
+
protected function _prepareLayout()
|
53 |
+
{
|
54 |
+
$this->addTab('set', array(
|
55 |
+
'label' => $this->__('Settings'),
|
56 |
+
'content' => $this->getLayout()->createBlock('xmlconnect/adminhtml_admin_application_edit_tab_settings')
|
57 |
+
->toHtml(),
|
58 |
+
'active' => true
|
59 |
+
));
|
60 |
+
return parent::_prepareLayout();
|
61 |
+
}
|
62 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Config.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Admin application config renderer
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Connect_Config extends Mage_Core_Block_Abstract
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Render login form xml
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
protected function _toHtml()
|
42 |
+
{
|
43 |
+
/** @var Mage_XmlConnect_Model_Simplexml_Element $configXmlObj */
|
44 |
+
$configXmlObj = Mage::getModel('xmlconnect/simplexml_element', '<configuration></configuration>');
|
45 |
+
$this->_addLocalization($configXmlObj);
|
46 |
+
$configXmlObj->addCustomChild('xmlconnect_version', Mage::getConfig()->getNode(
|
47 |
+
Mage_XmlConnect_Model_Application::XML_PATH_MODULE_VERSION
|
48 |
+
));
|
49 |
+
|
50 |
+
return $configXmlObj->asNiceXml();
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Add localization data to xml object
|
55 |
+
*
|
56 |
+
* @param Mage_XmlConnect_Model_Simplexml_Element $xml
|
57 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Config
|
58 |
+
*/
|
59 |
+
protected function _addLocalization(Mage_XmlConnect_Model_Simplexml_Element $xml)
|
60 |
+
{
|
61 |
+
/** @var $translateHelper Mage_XmlConnect_Helper_Translate */
|
62 |
+
$translateHelper = Mage::helper('xmlconnect/translate');
|
63 |
+
$xml->addCustomChild('localization', $this->getUrl('*/*/localization'), array(
|
64 |
+
'hash' => sha1(serialize($translateHelper->getLocalizationArray()))
|
65 |
+
));
|
66 |
+
return $this;
|
67 |
+
}
|
68 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard.php
ADDED
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Admin application dashboard renderer
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard extends Mage_Core_Block_Abstract
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Simple xml object
|
38 |
+
*
|
39 |
+
* @var Mage_XmlConnect_Model_Simplexml_Element
|
40 |
+
*/
|
41 |
+
protected $_xmlObject;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Render dashboard xml
|
45 |
+
*
|
46 |
+
* @return string
|
47 |
+
*/
|
48 |
+
protected function _toHtml()
|
49 |
+
{
|
50 |
+
return $this->setXmlObject(Mage::getModel('xmlconnect/simplexml_element', '<dashboard></dashboard>'))
|
51 |
+
->_addStoreSwitcher()->_addSalesInfo()->_addGraphInfo()->_addDashboardFormData()->getXmlObject()
|
52 |
+
->asNiceXml();
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Add store switcher xml
|
57 |
+
*
|
58 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
59 |
+
*/
|
60 |
+
protected function _addStoreSwitcher()
|
61 |
+
{
|
62 |
+
$this->getChild('store_switcher')->addSwitcherToXmlObj($this->getXmlObject());
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Add sales info
|
68 |
+
*
|
69 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
70 |
+
*/
|
71 |
+
protected function _addSalesInfo()
|
72 |
+
{
|
73 |
+
$this->getChild('sales_info')->addSalesInfoToXmlObj($this->getXmlObject());
|
74 |
+
return $this;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Add graph info to xml object
|
79 |
+
*
|
80 |
+
* Add orders and amounts info to show diagram by selected range in application
|
81 |
+
*
|
82 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
83 |
+
*/
|
84 |
+
protected function _addGraphInfo()
|
85 |
+
{
|
86 |
+
$this->getChild('graph_info')->addGraphInfoToXmlObj($this->getXmlObject());
|
87 |
+
return $this;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Add dashboard form data
|
92 |
+
*
|
93 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
94 |
+
*/
|
95 |
+
protected function _addDashboardFormData()
|
96 |
+
{
|
97 |
+
/** @var Mage_XmlConnect_Model_Simplexml_Form $fromXmlObj */
|
98 |
+
$fromXmlObj = Mage::getModel('xmlconnect/simplexml_form', array(
|
99 |
+
'xml_id' => 'dashboard_form', 'action' => '', 'use_container' => true
|
100 |
+
));
|
101 |
+
|
102 |
+
$recentActivityFieldset = $fromXmlObj->addFieldset('recent_activity', array(
|
103 |
+
'title' => $this->__('Recent Activity')
|
104 |
+
));
|
105 |
+
|
106 |
+
$this->_addLastOrders($recentActivityFieldset)->_addLastSearchTerms($recentActivityFieldset)
|
107 |
+
->_addNewCustomers($recentActivityFieldset);
|
108 |
+
|
109 |
+
$overallActivityFieldset = $fromXmlObj->addFieldset('overall_activity', array(
|
110 |
+
'title' => $this->__('Overall Activity')
|
111 |
+
));
|
112 |
+
|
113 |
+
$this->_addTopSearchTerms($overallActivityFieldset)->_addMostViewedProducts($overallActivityFieldset)
|
114 |
+
->_addBestSellers($overallActivityFieldset)->_addCustomers($overallActivityFieldset);
|
115 |
+
|
116 |
+
$this->getXmlObject()->appendChild($fromXmlObj->toXmlObject());
|
117 |
+
return $this;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Add last orders info to xml object
|
122 |
+
*
|
123 |
+
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $recentActivityFieldset
|
124 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
125 |
+
*/
|
126 |
+
protected function _addLastOrders(Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $recentActivityFieldset)
|
127 |
+
{
|
128 |
+
$lastOrdersField = $recentActivityFieldset->addField('last_orders', 'custom', array(
|
129 |
+
'label' => $this->__('Last 5 Orders')
|
130 |
+
));
|
131 |
+
$this->getChild('last_orders')->addLastOrdersToXmlObj($lastOrdersField->getXmlObject());
|
132 |
+
return $this;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Add last search terms data
|
137 |
+
*
|
138 |
+
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $recentActivityFieldset
|
139 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
140 |
+
*/
|
141 |
+
protected function _addLastSearchTerms(
|
142 |
+
Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $recentActivityFieldset
|
143 |
+
) {
|
144 |
+
$lastSearchTermsField = $recentActivityFieldset->addField('last_search', 'custom', array(
|
145 |
+
'label' => $this->__('Last 5 Search Terms')
|
146 |
+
));
|
147 |
+
$this->getChild('last_search_terms')->addLastSearchTermsToXmlObj($lastSearchTermsField->getXmlObject());
|
148 |
+
return $this;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Add new customers info to xml object
|
153 |
+
*
|
154 |
+
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $recentActivityFieldset
|
155 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
156 |
+
*/
|
157 |
+
protected function _addNewCustomers(Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $recentActivityFieldset)
|
158 |
+
{
|
159 |
+
$newCustomersField = $recentActivityFieldset->addField('new_customers', 'custom', array(
|
160 |
+
'label' => $this->__('New Customers')
|
161 |
+
));
|
162 |
+
$this->getChild('new_customers')->addNewCustomersToXmlObj($newCustomersField->getXmlObject());
|
163 |
+
return $this;
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Add top search queries info to xml object
|
168 |
+
*
|
169 |
+
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $overallActivityFieldset
|
170 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
171 |
+
*/
|
172 |
+
protected function _addTopSearchTerms(
|
173 |
+
Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $overallActivityFieldset
|
174 |
+
) {
|
175 |
+
$topSearchField = $overallActivityFieldset->addField('top_search', 'custom', array(
|
176 |
+
'label' => $this->__('Top Search Terms')
|
177 |
+
));
|
178 |
+
$this->getChild('top_search_terms')->addTopSearchTermsToXmlObj($topSearchField->getXmlObject());
|
179 |
+
return $this;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Add most viewed products to xml object
|
184 |
+
*
|
185 |
+
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $overallActivityFieldset
|
186 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
187 |
+
*/
|
188 |
+
protected function _addMostViewedProducts(
|
189 |
+
Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $overallActivityFieldset
|
190 |
+
) {
|
191 |
+
$mostViewedField = $overallActivityFieldset->addField('most_viewed', 'custom', array(
|
192 |
+
'label' => $this->__('Most Viewed Products')
|
193 |
+
));
|
194 |
+
$this->getChild('most_viewed')->addMostViewedProductsToXmlObj($mostViewedField->getXmlObject());
|
195 |
+
return $this;
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Add best sellers info to xml object
|
200 |
+
*
|
201 |
+
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $overallActivityFieldset
|
202 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
203 |
+
*/
|
204 |
+
protected function _addBestSellers(Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $overallActivityFieldset)
|
205 |
+
{
|
206 |
+
$bestSellersField = $overallActivityFieldset->addField('best_sellers', 'custom', array(
|
207 |
+
'label' => $this->__('Best Sellers')
|
208 |
+
));
|
209 |
+
$this->getChild('best_sellers')->addBestSellersToXmlObj($bestSellersField->getXmlObject());
|
210 |
+
return $this;
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Add customer info to xml object
|
215 |
+
*
|
216 |
+
* @param Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $overallActivityFieldset
|
217 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
218 |
+
*/
|
219 |
+
protected function _addCustomers(Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $overallActivityFieldset)
|
220 |
+
{
|
221 |
+
$customersField = $overallActivityFieldset->addField('customers', 'custom', array(
|
222 |
+
'label' => $this->__('Customers')
|
223 |
+
));
|
224 |
+
$this->getChild('customers')->addCustomersToXmlObj($customersField->getXmlObject());
|
225 |
+
return $this;
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Get xml object
|
230 |
+
*
|
231 |
+
* @return Mage_XmlConnect_Model_Simplexml_Element
|
232 |
+
*/
|
233 |
+
public function getXmlObject()
|
234 |
+
{
|
235 |
+
return $this->_xmlObject;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Set xml object
|
240 |
+
*
|
241 |
+
* @param Mage_XmlConnect_Model_Simplexml_Element $xmlObject
|
242 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard
|
243 |
+
*/
|
244 |
+
public function setXmlObject($xmlObject)
|
245 |
+
{
|
246 |
+
$this->_xmlObject = $xmlObject;
|
247 |
+
return $this;
|
248 |
+
}
|
249 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/BestSellers.php
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Best sellers products xml renderer block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_BestSellers
|
35 |
+
extends Mage_Adminhtml_Block_Dashboard_Tab_Products_Ordered
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Best sellers count to display
|
39 |
+
*/
|
40 |
+
const BESTSELLERS_COUNT_LIMIT = 5;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Get rid of unnecessary collection initialization
|
44 |
+
*
|
45 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_BestSellers
|
46 |
+
*/
|
47 |
+
protected function _prepareCollection()
|
48 |
+
{
|
49 |
+
return $this;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Init last search terms collection
|
54 |
+
*
|
55 |
+
* @param int|null $storeId
|
56 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_BestSellers
|
57 |
+
*/
|
58 |
+
protected function _initCollection($storeId)
|
59 |
+
{
|
60 |
+
/** @var $collection Mage_Sales_Model_Resource_Report_Bestsellers_Collection */
|
61 |
+
$collection = Mage::getResourceModel('sales/report_bestsellers_collection')->setModel('catalog/product')
|
62 |
+
->addStoreFilter($storeId)->setPageSize(self::BESTSELLERS_COUNT_LIMIT);
|
63 |
+
$this->setCollection($collection);
|
64 |
+
return $this;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Clear collection
|
69 |
+
*
|
70 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_BestSellers
|
71 |
+
*/
|
72 |
+
protected function _clearCollection()
|
73 |
+
{
|
74 |
+
$this->_collection = null;
|
75 |
+
return $this;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Add best sellers products to xml object
|
80 |
+
*
|
81 |
+
* @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
|
82 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_BestSellers
|
83 |
+
*/
|
84 |
+
public function addBestSellersToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $xmlObj)
|
85 |
+
{
|
86 |
+
foreach (Mage::helper('xmlconnect/adminApplication')->getSwitcherList() as $storeId) {
|
87 |
+
$this->_clearCollection()->_initCollection($storeId);
|
88 |
+
$valuesXml = $xmlObj->addCustomChild('values', null, array(
|
89 |
+
'store_id' => $storeId ? $storeId : Mage_XmlConnect_Helper_AdminApplication::ALL_STORE_VIEWS
|
90 |
+
));
|
91 |
+
|
92 |
+
if(!count($this->getCollection()->getItems()) > 0) {
|
93 |
+
continue;
|
94 |
+
}
|
95 |
+
|
96 |
+
/** @var $orderHelper Mage_XmlConnect_Helper_Adminhtml_Dashboard_Order */
|
97 |
+
$orderHelper = Mage::helper('xmlconnect/adminhtml_dashboard_order');
|
98 |
+
|
99 |
+
foreach ($this->getCollection()->getItems() as $item) {
|
100 |
+
$itemListXml = $valuesXml->addCustomChild('item');
|
101 |
+
$itemListXml->addCustomChild('name', $item->getName(), array(
|
102 |
+
'label' => Mage::helper('sales')->__('Product Name')
|
103 |
+
));
|
104 |
+
$itemListXml->addCustomChild('price', $orderHelper->preparePrice($item->getProductPrice(), $storeId),
|
105 |
+
array('label' => Mage::helper('sales')->__('Price')));
|
106 |
+
$itemListXml->addCustomChild('qty_ordered', $item->getQtyOrdered(), array(
|
107 |
+
'label' => Mage::helper('sales')->__('Quantity Ordered')
|
108 |
+
));
|
109 |
+
}
|
110 |
+
}
|
111 |
+
return $this;
|
112 |
+
}
|
113 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/Customers.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Customers xml renderer block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_Customers
|
35 |
+
extends Mage_Adminhtml_Block_Dashboard_Tab_Customers_Most
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Customers count to display
|
39 |
+
*/
|
40 |
+
const CUSTOMERS_COUNT_LIMIT = 5;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Get rid of unnecessary collection initialization
|
44 |
+
*
|
45 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_Customers
|
46 |
+
*/
|
47 |
+
protected function _prepareCollection()
|
48 |
+
{
|
49 |
+
return $this;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Init order collection
|
54 |
+
*
|
55 |
+
* @param int|null $storeId
|
56 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_Customers
|
57 |
+
*/
|
58 |
+
protected function _initCollection($storeId)
|
59 |
+
{
|
60 |
+
/** @var $collection Mage_Reports_Model_Resource_Order_Collection */
|
61 |
+
$collection = Mage::getResourceModel('reports/order_collection');
|
62 |
+
$collection->groupByCustomer()->addOrdersCount()->joinCustomerName()->setPageSize(self::CUSTOMERS_COUNT_LIMIT);
|
63 |
+
|
64 |
+
$storeFilter = 0;
|
65 |
+
if ($storeId) {
|
66 |
+
$collection->addAttributeToFilter('store_id', $storeId);
|
67 |
+
$storeFilter = 1;
|
68 |
+
}
|
69 |
+
|
70 |
+
$collection->addSumAvgTotals($storeFilter)->orderByTotalAmount();
|
71 |
+
$this->setCollection($collection);
|
72 |
+
return $this;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Clear collection
|
77 |
+
*
|
78 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_Customers
|
79 |
+
*/
|
80 |
+
protected function _clearCollection()
|
81 |
+
{
|
82 |
+
$this->_collection = null;
|
83 |
+
return $this;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Add customers statistic to xml object
|
88 |
+
*
|
89 |
+
* @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
|
90 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_Customers
|
91 |
+
*/
|
92 |
+
public function addCustomersToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $xmlObj)
|
93 |
+
{
|
94 |
+
foreach (Mage::helper('xmlconnect/adminApplication')->getSwitcherList() as $storeId) {
|
95 |
+
$this->_clearCollection()->_initCollection($storeId);
|
96 |
+
$valuesXml = $xmlObj->addCustomChild('values', null, array(
|
97 |
+
'store_id' => $storeId ? $storeId : Mage_XmlConnect_Helper_AdminApplication::ALL_STORE_VIEWS
|
98 |
+
));
|
99 |
+
|
100 |
+
if(!count($this->getCollection()->getItems()) > 0) {
|
101 |
+
continue;
|
102 |
+
}
|
103 |
+
|
104 |
+
/** @var $orderHelper Mage_XmlConnect_Helper_Adminhtml_Dashboard_Order */
|
105 |
+
$orderHelper = Mage::helper('xmlconnect/adminhtml_dashboard_order');
|
106 |
+
|
107 |
+
foreach ($this->getCollection()->getItems() as $item) {
|
108 |
+
$itemListXml = $valuesXml->addCustomChild('item');
|
109 |
+
$itemListXml->addCustomChild('name', $item->getName(), array(
|
110 |
+
'label' => $this->__('Customer Name')
|
111 |
+
));
|
112 |
+
$itemListXml->addCustomChild('orders_count', $item->getOrdersCount(), array(
|
113 |
+
'label' => $this->__('Number of Orders')
|
114 |
+
));
|
115 |
+
$itemListXml->addCustomChild(
|
116 |
+
'orders_avg_amount',
|
117 |
+
$orderHelper->preparePrice($item->getOrdersAvgAmount(), $storeId),
|
118 |
+
array('label' => $this->__('Average Order Amount'))
|
119 |
+
);
|
120 |
+
$itemListXml->addCustomChild(
|
121 |
+
'orders_sum_amount',
|
122 |
+
$orderHelper->preparePrice($item->getOrdersSumAmount(), $storeId),
|
123 |
+
array('label' => $this->__('Total Order Amount'))
|
124 |
+
);
|
125 |
+
}
|
126 |
+
}
|
127 |
+
return $this;
|
128 |
+
}
|
129 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphAmountsData.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2010 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 |
+
* Amounts chart data xml renderer block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphAmountsData
|
35 |
+
extends Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphDataAbstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Initialize object
|
39 |
+
*/
|
40 |
+
public function __construct()
|
41 |
+
{
|
42 |
+
$this->setHtmlId('amounts');
|
43 |
+
parent::__construct();
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Prepare chart data
|
48 |
+
*
|
49 |
+
* @return null
|
50 |
+
*/
|
51 |
+
protected function _prepareData()
|
52 |
+
{
|
53 |
+
$this->setDataHelperName('xmlconnect/adminhtml_dashboard_order');
|
54 |
+
$this->setDataRows('revenue');
|
55 |
+
$this->_axisMaps = array('x' => 'range', 'y' => 'revenue');
|
56 |
+
parent::_prepareData();
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Add order chart data to xml object
|
61 |
+
*
|
62 |
+
* @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
|
63 |
+
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphAmountsData
|
64 |
+
*/
|
65 |
+
public function addAmountsChartDataToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $xmlObj)
|
66 |
+
{
|
67 |
+
$this->_xmlObj = $xmlObj->addCustomChild('chart_data_details', null, array('id' => 'amounts'));
|
68 |
+
$this->_addAllStoreData();
|
69 |
+
return $this;
|
70 |
+
}
|
71 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphDataAbstract.php
ADDED
@@ -0,0 +1,350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|