Magento_Mobile - Version 1.7.0.0.22.1

Version Notes

1.7.0.0.22.1 version of package internal svn revision #121425

Download this release

Release Info

Developer Magento Core Team
Extension Magento_Mobile
Version 1.7.0.0.22.1
Comparing to
See all releases


Code changes from version 1.6.0.0.23.0 to 1.7.0.0.22.1

Files changed (304) hide show
  1. app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit.php +0 -71
  2. app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Form.php +0 -55
  3. app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Tab/Settings.php +0 -108
  4. app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit/Tabs.php +0 -62
  5. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Config.php +0 -68
  6. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard.php +0 -249
  7. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/BestSellers.php +0 -113
  8. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/Customers.php +0 -129
  9. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphAmountsData.php +0 -71
  10. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphDataAbstract.php +0 -350
  11. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphInfo.php +0 -160
  12. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphOrderData.php +0 -71
  13. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphTotalsData.php +0 -123
  14. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/LastOrders.php +0 -85
  15. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/LastSearchTerms.php +0 -118
  16. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/MostViewedProducts.php +0 -117
  17. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/NewCustomers.php +0 -129
  18. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/SalesInfo.php +0 -119
  19. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/StoreSwitcher.php +0 -198
  20. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/TopSearchTerms.php +0 -114
  21. app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Loginform.php +0 -70
  22. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile.php +6 -2
  23. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php +2 -1
  24. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Submission.php +2 -1
  25. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Content.php +34 -54
  26. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion.php +1 -1
  27. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php +8 -23
  28. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Images.php +0 -192
  29. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Preview.php +6 -3
  30. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php +8 -8
  31. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/OfflineCatalog.php +0 -115
  32. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php +14 -2
  33. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Settings.php +14 -10
  34. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php +26 -11
  35. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Submission/History.php +1 -1
  36. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tabs.php +5 -2
  37. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Addrow.php +18 -8
  38. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Color.php +2 -1
  39. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php +2 -1
  40. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Datetime.php +2 -1
  41. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Font.php +5 -2
  42. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Image.php +2 -1
  43. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Page.php +6 -3
  44. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Tabs.php +6 -3
  45. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Theme.php +5 -3
  46. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Bool.php +6 -2
  47. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Form.php +2 -1
  48. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container/Submission.php +17 -17
  49. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tabs.php +2 -1
  50. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php +4 -2
  51. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php +10 -7
  52. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php +4 -3
  53. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Action.php +2 -2
  54. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php +4 -5
  55. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php +8 -3
  56. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Name.php +1 -1
  57. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview/Form.php +2 -1
  58. app/code/core/Mage/XmlConnect/Block/Cart.php +18 -30
  59. app/code/core/Mage/XmlConnect/Block/Cart/CartTotals.php +0 -95
  60. app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Default.php +0 -93
  61. app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Grandtotal.php +0 -107
  62. app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Nodes/Default.php +0 -63
  63. app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Nodes/Giftcardaccount.php +0 -69
  64. app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Shipping.php +0 -113
  65. app/code/core/Mage/XmlConnect/Block/Cart/CartTotals/Subtotal.php +0 -108
  66. app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php +6 -6
  67. app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php +64 -259
  68. app/code/core/Mage/XmlConnect/Block/Cart/Items.php +0 -254
  69. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php +9 -5
  70. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/OrderDetails.php +0 -83
  71. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php +13 -15
  72. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php +28 -104
  73. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mep/Totals.php +4 -1
  74. app/code/core/Mage/XmlConnect/Block/Cart/Totals.php +8 -5
  75. app/code/core/Mage/XmlConnect/Block/Catalog.php +5 -59
  76. app/code/core/Mage/XmlConnect/Block/Catalog/Category.php +6 -10
  77. app/code/core/Mage/XmlConnect/Block/Catalog/Filters.php +1 -2
  78. app/code/core/Mage/XmlConnect/Block/Catalog/Product.php +25 -35
  79. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php +1 -1
  80. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php +14 -13
  81. app/code/core/Mage/XmlConnect/Block/Catalog/Product/ItemPrice.php +0 -98
  82. app/code/core/Mage/XmlConnect/Block/Catalog/Product/ItemPrice/Bundle.php +0 -426
  83. app/code/core/Mage/XmlConnect/Block/Catalog/Product/ItemPrice/Default.php +0 -740
  84. app/code/core/Mage/XmlConnect/Block/Catalog/Product/ItemPrice/Giftcard.php +0 -98
  85. app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php +9 -17
  86. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php +1 -84
  87. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php +16 -32
  88. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php +26 -35
  89. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Downloadable.php +0 -113
  90. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php +1 -0
  91. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php +11 -11
  92. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php +158 -140
  93. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Default.php +267 -265
  94. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Giftcard.php +7 -8
  95. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Related.php +2 -2
  96. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review.php +0 -1
  97. app/code/core/Mage/XmlConnect/Block/Catalog/Search.php +4 -4
  98. app/code/core/Mage/XmlConnect/Block/Catalog/Search/Suggest.php +0 -1
  99. app/code/core/Mage/XmlConnect/Block/Checkout/Address/Billing.php +3 -2
  100. app/code/core/Mage/XmlConnect/Block/Checkout/Address/Form.php +94 -43
  101. app/code/core/Mage/XmlConnect/Block/Checkout/Address/Shipping.php +0 -1
  102. app/code/core/Mage/XmlConnect/Block/Checkout/Agreements.php +1 -1
  103. app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer.php +0 -48
  104. app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Bundle.php +0 -49
  105. app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Configurable.php +0 -53
  106. app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Downloadable.php +0 -49
  107. app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Giftcard.php +0 -49
  108. app/code/core/Mage/XmlConnect/Block/Checkout/Cart/Item/Renderer/Grouped.php +0 -52
  109. app/code/core/Mage/XmlConnect/Block/Checkout/Onepage/Address.php +0 -69
  110. app/code/core/Mage/XmlConnect/Block/Checkout/Onepage/Address/Form.php +0 -114
  111. app/code/core/Mage/XmlConnect/Block/Checkout/Onepage/Address/List.php +0 -112
  112. app/code/core/Mage/XmlConnect/Block/Checkout/Onepage/Review.php +0 -64
  113. app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review/Info.php +18 -28
  114. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Ccsave.php +3 -3
  115. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Ccsave.php +2 -2
  116. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Checkmo.php +3 -1
  117. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Abstract.php +7 -4
  118. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Verisign.php +5 -3
  119. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php +60 -119
  120. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/ListApi23.php +0 -133
  121. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Payflow.php +9 -9
  122. app/code/core/Mage/XmlConnect/Block/Checkout/Pbridge/Result.php +1 -1
  123. app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/Available.php +16 -17
  124. app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/AvailableList.php +0 -82
  125. app/code/core/Mage/XmlConnect/Block/Configuration.php +20 -39
  126. app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php +78 -45
  127. app/code/core/Mage/XmlConnect/Block/Customer/Address/List.php +12 -12
  128. app/code/core/Mage/XmlConnect/Block/Customer/Downloads.php +0 -80
  129. app/code/core/Mage/XmlConnect/Block/Customer/Form.php +47 -150
  130. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Date.php +14 -16
  131. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Text.php +4 -5
  132. app/code/core/Mage/XmlConnect/Block/Customer/Order/Details.php +13 -10
  133. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Bundle.php +11 -142
  134. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Default.php +0 -73
  135. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Downloadable.php +13 -84
  136. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Giftcard.php +2 -2
  137. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Grouped.php +3 -5
  138. app/code/core/Mage/XmlConnect/Block/Customer/Order/Items.php +2 -1
  139. app/code/core/Mage/XmlConnect/Block/Customer/Order/List.php +15 -13
  140. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals.php +10 -60
  141. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance.php +1 -25
  142. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance/Refunded.php +3 -25
  143. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Giftcards.php +5 -39
  144. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Tax.php +3 -44
  145. app/code/core/Mage/XmlConnect/Block/Customer/Storecredit.php +1 -1
  146. app/code/core/Mage/XmlConnect/Block/Home.php +3 -5
  147. app/code/core/Mage/XmlConnect/Block/Homebanners.php +0 -156
  148. app/code/core/Mage/XmlConnect/Block/Localization.php +0 -55
  149. app/code/core/Mage/XmlConnect/Block/Review/Form.php +1 -2
  150. app/code/core/Mage/XmlConnect/Block/ShoppingCart.php +0 -108
  151. app/code/core/Mage/XmlConnect/Block/Wishlist.php +5 -6
  152. app/code/core/Mage/XmlConnect/Controller/Action.php +11 -36
  153. app/code/core/Mage/XmlConnect/Controller/AdminAction.php +0 -192
  154. app/code/core/Mage/XmlConnect/Helper/AdminApplication.php +0 -134
  155. app/code/core/Mage/XmlConnect/Helper/Adminhtml/Dashboard/Order.php +0 -68
  156. app/code/core/Mage/XmlConnect/Helper/Android.php +64 -42
  157. app/code/core/Mage/XmlConnect/Helper/Catalog/Category/Image.php +4 -58
  158. app/code/core/Mage/XmlConnect/Helper/Catalog/Product/Image.php +0 -46
  159. app/code/core/Mage/XmlConnect/Helper/Customer/Form/Renderer.php +0 -178
  160. app/code/core/Mage/XmlConnect/Helper/Customer/Order.php +31 -193
  161. app/code/core/Mage/XmlConnect/Helper/Data.php +32 -127
  162. app/code/core/Mage/XmlConnect/Helper/Device/Abstract.php +0 -309
  163. app/code/core/Mage/XmlConnect/Helper/Image.php +22 -49
  164. app/code/core/Mage/XmlConnect/Helper/Ipad.php +112 -65
  165. app/code/core/Mage/XmlConnect/Helper/Iphone.php +204 -39
  166. app/code/core/Mage/XmlConnect/Helper/OfflineCatalog.php +0 -307
  167. app/code/core/Mage/XmlConnect/Helper/Theme.php +8 -49
  168. app/code/core/Mage/XmlConnect/Helper/Translate.php +0 -514
  169. app/code/core/Mage/XmlConnect/Model/Adminhtml/Search/Catalog.php +0 -71
  170. app/code/core/Mage/XmlConnect/Model/Adminhtml/Search/Category.php +0 -70
  171. app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php +1 -1
  172. app/code/core/Mage/XmlConnect/Model/Application.php +76 -194
  173. app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php +11 -28
  174. app/code/core/Mage/XmlConnect/Model/ConfigData.php +9 -121
  175. app/code/core/Mage/XmlConnect/Model/Configuration.php +0 -271
  176. app/code/core/Mage/XmlConnect/Model/Device/Abstract.php +0 -179
  177. app/code/core/Mage/XmlConnect/Model/Device/Android.php +0 -111
  178. app/code/core/Mage/XmlConnect/Model/Device/Ipad.php +0 -174
  179. app/code/core/Mage/XmlConnect/Model/Device/Iphone.php +0 -117
  180. app/code/core/Mage/XmlConnect/Model/ImageAction.php +0 -321
  181. app/code/core/Mage/XmlConnect/Model/ImageLimits.php +0 -366
  182. app/code/core/Mage/XmlConnect/Model/ImageLimits/Abstract.php +0 -295
  183. app/code/core/Mage/XmlConnect/Model/Images.php +0 -551
  184. app/code/core/Mage/XmlConnect/Model/Observer.php +7 -77
  185. app/code/core/Mage/XmlConnect/Model/OfflineCatalog.php +0 -117
  186. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Abstract.php +0 -66
  187. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Category.php +0 -120
  188. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Category/Category.php +0 -61
  189. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Category/IndexCategory.php +0 -61
  190. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Config.php +0 -77
  191. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Home.php +0 -61
  192. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Homebanners.php +0 -61
  193. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Product.php +0 -111
  194. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Product/Gallery.php +0 -61
  195. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Product/Product.php +0 -61
  196. app/code/core/Mage/XmlConnect/Model/OfflineCatalog/Product/Review.php +0 -61
  197. app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Config.php +0 -15
  198. app/code/core/Mage/XmlConnect/Model/Paypal/Mecl/Checkout.php +0 -24
  199. app/code/core/Mage/XmlConnect/Model/Preview/Abstract.php +5 -57
  200. app/code/core/Mage/XmlConnect/Model/Preview/Android.php +6 -13
  201. app/code/core/Mage/XmlConnect/Model/Preview/Ipad.php +44 -49
  202. app/code/core/Mage/XmlConnect/Model/Preview/Iphone.php +5 -14
  203. app/code/core/Mage/XmlConnect/Model/Queue.php +2 -31
  204. app/code/core/Mage/XmlConnect/Model/Resource/Application.php +1 -17
  205. app/code/core/Mage/XmlConnect/Model/Resource/CategorySearch/Collection.php +0 -120
  206. app/code/core/Mage/XmlConnect/Model/Resource/ConfigData.php +3 -3
  207. app/code/core/Mage/XmlConnect/Model/Resource/ConfigData/Collection.php +3 -1
  208. app/code/core/Mage/XmlConnect/Model/Resource/Filter/Collection.php +1 -0
  209. app/code/core/Mage/XmlConnect/Model/Resource/Images.php +0 -89
  210. app/code/core/Mage/XmlConnect/Model/Resource/Images/Collection.php +0 -91
  211. app/code/core/Mage/XmlConnect/Model/Simplexml/Element.php +2 -2
  212. app/code/core/Mage/XmlConnect/Model/Simplexml/Form.php +1 -25
  213. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Abstract.php +1 -1
  214. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Abstract.php +3 -9
  215. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/CountryListSelect.php +18 -45
  216. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Custom.php +0 -71
  217. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Date.php +2 -1
  218. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Email.php +2 -1
  219. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Fieldset.php +0 -2
  220. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/File.php +2 -1
  221. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Image.php +2 -1
  222. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiline.php +4 -1
  223. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiselect.php +5 -1
  224. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Password.php +0 -47
  225. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Select.php +13 -4
  226. app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Text.php +2 -1
  227. app/code/core/Mage/XmlConnect/Model/Simplexml/Message.php +0 -267
  228. app/code/core/Mage/XmlConnect/Model/Simplexml/Message/Abstract.php +0 -142
  229. app/code/core/Mage/XmlConnect/Model/Simplexml/Message/Error.php +0 -125
  230. app/code/core/Mage/XmlConnect/Model/Simplexml/Message/Success.php +0 -56
  231. app/code/core/Mage/XmlConnect/Model/Theme.php +5 -6
  232. app/code/core/Mage/XmlConnect/controllers/Adminhtml/Admin/ApplicationController.php +0 -69
  233. app/code/core/Mage/XmlConnect/controllers/Adminhtml/Connect/ConfigController.php +0 -126
  234. app/code/core/Mage/XmlConnect/controllers/Adminhtml/Connect/DashboardController.php +0 -55
  235. app/code/core/Mage/XmlConnect/controllers/Adminhtml/Connect/UserController.php +0 -165
  236. app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php +72 -282
  237. app/code/core/Mage/XmlConnect/controllers/CartController.php +2 -145
  238. app/code/core/Mage/XmlConnect/controllers/CatalogController.php +17 -144
  239. app/code/core/Mage/XmlConnect/controllers/CheckoutController.php +23 -224
  240. app/code/core/Mage/XmlConnect/controllers/CmsController.php +0 -27
  241. app/code/core/Mage/XmlConnect/controllers/ConfigurationController.php +8 -12
  242. app/code/core/Mage/XmlConnect/controllers/CustomerController.php +75 -139
  243. app/code/core/Mage/XmlConnect/controllers/HomebannersController.php +0 -53
  244. app/code/core/Mage/XmlConnect/controllers/LocalizationController.php +0 -54
  245. app/code/core/Mage/XmlConnect/controllers/OfflineCatalogController.php +0 -63
  246. app/code/core/Mage/XmlConnect/controllers/Paypal/MeclController.php +7 -53
  247. app/code/core/Mage/XmlConnect/controllers/Paypal/MepController.php +4 -2
  248. app/code/core/Mage/XmlConnect/controllers/PbridgeController.php +11 -13
  249. app/code/core/Mage/XmlConnect/controllers/WishlistController.php +0 -22
  250. app/code/core/Mage/XmlConnect/etc/adminhtml.xml +0 -9
  251. app/code/core/Mage/XmlConnect/etc/config.xml +162 -69
  252. app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-data-upgrade-1.4.0.13-1.4.0.14.php +17 -6
  253. app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-data-upgrade-1.5.9.9-1.6.0.0.php +0 -63
  254. app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-data-upgrade-1.6.0.0-1.6.0.0.1.php +0 -51
  255. app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-install-1.4.0.8.php +6 -6
  256. app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-upgrade-1.4.0.9-1.4.0.10.php +1 -6
  257. app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +2 -0
  258. app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/upgrade-1.6.0.0-1.6.0.0.1.php +0 -73
  259. app/design/adminhtml/default/default/layout/xmlconnect.xml +3 -48
  260. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/content.phtml +0 -148
  261. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design.phtml +6 -496
  262. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/autocomplete.phtml +0 -42
  263. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/image_edit.phtml +0 -319
  264. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/images_android.phtml +0 -79
  265. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/images_ipad.phtml +0 -78
  266. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/images_iphone.phtml +0 -78
  267. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/banner_rotator.phtml +0 -49
  268. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/catalog_hor_ipad.phtml +1 -1
  269. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/catalog_ipad.phtml +1 -1
  270. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/catalog_iphone.phtml +1 -1
  271. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/home_android.phtml +2 -10
  272. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/home_hor_ipad.phtml +3 -11
  273. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/home_ipad.phtml +3 -11
  274. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/home_iphone.phtml +2 -8
  275. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview_android.phtml +1 -1
  276. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview_ipad.phtml +1 -1
  277. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview_iphone.phtml +1 -1
  278. app/design/adminhtml/default/default/template/xmlconnect/edit/tab/offlinecatalog.phtml +0 -46
  279. app/design/adminhtml/default/default/template/xmlconnect/form/element/themes.phtml +131 -132
  280. app/design/adminhtml/default/default/template/xmlconnect/mobile/notification_helper.phtml +1 -1
  281. app/design/adminhtml/default/default/template/xmlconnect/submission/app_icons_preview.phtml +2 -0
  282. app/design/frontend/base/default/layout/xmlconnect.xml +16 -174
  283. app/design/frontend/base/default/template/xmlconnect/centinel/authentication.phtml +0 -55
  284. app/locale/en_US/Mage_XmlConnect.csv +19 -316
  285. js/scriptaculous/builder.js +0 -136
  286. js/scriptaculous/controls.js +0 -965
  287. js/scriptaculous/dragdrop.js +0 -974
  288. js/scriptaculous/effects.js +0 -1130
  289. js/scriptaculous/scriptaculous.js +0 -60
  290. js/scriptaculous/slider.js +0 -277
  291. js/scriptaculous/sound.js +0 -55
  292. js/scriptaculous/unittest.js +0 -568
  293. media/xmlconnect/custom/ok.gif +0 -0
  294. media/xmlconnect/original/ok.gif +0 -0
  295. media/xmlconnect/system/ok.gif +0 -0
  296. package.xml +7 -8
  297. skin/adminhtml/default/default/images/xmlconnect/btn_edit.gif +0 -0
  298. skin/adminhtml/default/default/images/xmlconnect/mobile_preview/buttons.php +27 -0
  299. skin/adminhtml/default/default/images/xmlconnect/mobile_preview/imageFrame.php +38 -0
  300. skin/adminhtml/default/default/images/xmlconnect/mobile_preview/lightStar.php +39 -0
  301. skin/adminhtml/default/default/images/xmlconnect/remove.png +0 -0
  302. skin/adminhtml/default/default/xmlconnect/boxes.css +1 -67
  303. skin/adminhtml/default/default/xmlconnect/iestyles.css +0 -39
  304. skin/adminhtml/default/default/xmlconnect/remove.png +0 -0
app/code/core/Mage/XmlConnect/Block/Adminhtml/Admin/Application/Edit.php DELETED
@@ -1,71 +0,0 @@
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 DELETED
@@ -1,55 +0,0 @@
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 DELETED
@@ -1,108 +0,0 @@
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 DELETED
@@ -1,62 +0,0 @@
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 DELETED
@@ -1,68 +0,0 @@
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 DELETED
@@ -1,249 +0,0 @@
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 DELETED
@@ -1,113 +0,0 @@
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 DELETED
@@ -1,129 +0,0 @@
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 DELETED
@@ -1,71 +0,0 @@
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 DELETED
@@ -1,350 +0,0 @@
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
- * Chart data xml renderer block abstract
29
- *
30
- * @category Mage
31
- * @package Mage_XmlConnect
32
- * @author Magento Core Team <core@magentocommerce.com>
33
- */
34
- abstract class Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphDataAbstract
35
- extends Mage_Adminhtml_Block_Dashboard_Graph
36
- {
37
- /**
38
- * X axis param
39
- */
40
- const AXIS_X = 'x';
41
-
42
- /**
43
- * Y axis param
44
- */
45
- const AXIS_Y = 'y';
46
-
47
- /**
48
- * Date range param for 24 hours
49
- */
50
- const DATE_RANGE_24H = '24h';
51
-
52
- /**
53
- * Date range param for 7 days
54
- */
55
- const DATE_RANGE_7D = '7d';
56
-
57
- /**
58
- * Date range param for 1 month
59
- */
60
- const DATE_RANGE_1M = '1m';
61
-
62
- /**
63
- * Date range param for 1 year
64
- */
65
- const DATE_RANGE_1Y = '1y';
66
-
67
- /**
68
- * Date range param for 2 years
69
- */
70
- const DATE_RANGE_2Y = '2y';
71
-
72
- /**
73
- * Chart xml object
74
- *
75
- * @var Mage_XmlConnect_Model_Simplexml_Element
76
- */
77
- protected $_xmlObj;
78
-
79
- /**
80
- * Add chart data from all stores
81
- *
82
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphDataAbstract
83
- */
84
- protected function _addAllStoreData()
85
- {
86
- $dataValuesXml = $this->getXmlObj()->addCustomChild('chart_data_values');
87
- $dataDescriptionXml = $this->getXmlObj()->addCustomChild('chart_data_description');
88
-
89
- foreach (Mage::helper('xmlconnect/adminApplication')->getSwitcherList() as $storeFilter) {
90
- $this->getDataHelper()->setParam('store', $storeFilter ? $storeFilter : null);
91
- $storeId = $this->getDataHelper()->getParam('store');
92
- $storeId = $storeId ? $storeId : Mage_XmlConnect_Helper_AdminApplication::ALL_STORE_VIEWS;
93
-
94
- $valuesXml = $dataValuesXml->addCustomChild('values', null, array(
95
- 'store_id' => $storeId
96
- ));
97
-
98
- $descriptionXml = $dataDescriptionXml->addCustomChild('values', null, array(
99
- 'store_id' => $storeId
100
- ));
101
-
102
- foreach ($this->getRangeOptions() as $rangeFilter) {
103
- $this->getDataHelper()->setParam('period', $rangeFilter['value']);
104
- $this->getDataHelper()->initCollection();
105
- $chartData = $this->getChartData();
106
- $valuesXml->addCustomChild('item', $chartData['values'], array(
107
- 'range_id' => $this->getDataHelper()->getParam('period')
108
- ));
109
- $descriptionXml->addCustomChild('item', $chartData['description'], array(
110
- 'range_id' => $this->getDataHelper()->getParam('period')
111
- ));
112
- }
113
- }
114
- return $this;
115
- }
116
-
117
- /**
118
- * Get chart data array as chart values => chart reference axis description
119
- *
120
- * @throws Mage_Core_Exception
121
- * @return array
122
- */
123
- public function getChartData()
124
- {
125
- if (!$this->getCount()) {
126
- return array('values' => '', 'description' => '');
127
- }
128
-
129
- $this->_allSeries = $this->getRowsData($this->_dataRows);
130
-
131
- foreach ($this->_axisMaps as $axis => $attr) {
132
- $this->setAxisLabels($axis, $this->getRowsData($attr, true));
133
- }
134
-
135
- list($dateSeries, $dataSeries) = $this->_getRangeAndData();
136
-
137
- $this->_axisLabels[self::AXIS_X] = $this->_normalizeDateSeries($dateSeries);
138
- $this->_allSeries = $dataSeries;
139
-
140
- $valueBuffer = array();
141
- $params = array();
142
-
143
- if (sizeof($this->_axisLabels) > 0) {
144
- $indexId = 0;
145
- foreach ($this->_axisLabels as $idx => $labels) {
146
- if ($idx == self::AXIS_X) {
147
- $valueBuffer[] = $indexId . ":|" . implode('|', $this->_getXLabels());
148
- } elseif ($idx == self::AXIS_Y) {
149
- $valueBuffer[] = $indexId . ":|" . implode('|', $this->_getYLabels());
150
- }
151
- $indexId++;
152
- }
153
- $params['description'] = implode('|', $valueBuffer);
154
- };
155
-
156
- foreach ($this->getAllSeries() as $row) {
157
- array_walk($row, create_function('&$val', '$val = ceil($val);'));
158
- $params['values'] = implode('|', $row);
159
- }
160
- return $params;
161
- }
162
-
163
- /**
164
- * Get array of date range and values range series
165
- *
166
- * @return array
167
- */
168
- protected function _getRangeAndData()
169
- {
170
- $timezoneLocal = Mage::app()->getStore()->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
171
-
172
- list ($dateStart, $dateEnd) = Mage::getResourceModel('reports/order_collection')
173
- ->getDateRange($this->getDataHelper()->getParam('period'), '', '', true);
174
-
175
- $dateStart->setTimezone($timezoneLocal);
176
- $dateEnd->setTimezone($timezoneLocal);
177
-
178
- $dateSeries = array();
179
- $dataSeries = array();
180
- while ($dateStart->compare($dateEnd) < 0) {
181
- switch ($this->getDataHelper()->getParam('period')) {
182
- case self::DATE_RANGE_24H:
183
- $date = $dateStart->toString('yyyy-MM-dd HH:00');
184
- $dateStart->addHour(1);
185
- break;
186
- case self::DATE_RANGE_7D:
187
- case self::DATE_RANGE_1M:
188
- $date = $dateStart->toString('yyyy-MM-dd');
189
- $dateStart->addDay(1);
190
- break;
191
- case self::DATE_RANGE_1Y:
192
- case self::DATE_RANGE_2Y:
193
- $date = $dateStart->toString('yyyy-MM');
194
- $dateStart->addMonth(1);
195
- break;
196
- }
197
- foreach ($this->getAllSeries() as $index => $series) {
198
- if (in_array($date, $this->_axisLabels[self::AXIS_X])) {
199
- $dataSeries[$index][] = (float)array_shift($this->_allSeries[$index]);
200
- } else {
201
- $dataSeries[$index][] = 0;
202
- }
203
- }
204
- $dateSeries[] = $date;
205
- }
206
- return array($dateSeries, $dataSeries);
207
- }
208
-
209
- /**
210
- * Skip excess values of date series
211
- *
212
- * Keep count of date series up to 15 items
213
- *
214
- * @param array $dateSeries
215
- * @return array
216
- */
217
- protected function _normalizeDateSeries($dateSeries)
218
- {
219
- /**
220
- * setting skip step
221
- */
222
- if (count($dateSeries) > 8 && count($dateSeries) < 15) {
223
- $skipStep = 1;
224
- } elseif (count($dateSeries) >= 15) {
225
- $skipStep = 2;
226
- } else {
227
- $skipStep = 0;
228
- }
229
- /**
230
- * skipping some x labels for good reading
231
- */
232
- $i = 0;
233
- foreach ($dateSeries as $index => $date) {
234
- if ($i == $skipStep) {
235
- $dateSeries[$index] = $date;
236
- $i = 0;
237
- } else {
238
- $dateSeries[$index] = '';
239
- ++$i;
240
- }
241
- }
242
- return $dateSeries;
243
- }
244
-
245
- /**
246
- * Get X axis params array
247
- *
248
- * @return array
249
- */
250
- protected function _getXLabels()
251
- {
252
- /**
253
- * Format date
254
- */
255
- foreach ($this->_axisLabels[self::AXIS_X] as $index => $label) {
256
- if ($label != '') {
257
- switch ($this->getDataHelper()->getParam('period')) {
258
- case self::DATE_RANGE_24H:
259
- $this->_axisLabels[self::AXIS_X][$index] = $this->formatTime(
260
- new Zend_Date($label, 'yyyy-MM-dd HH:00'), 'short', false
261
- );
262
- break;
263
- case self::DATE_RANGE_7D:
264
- case self::DATE_RANGE_1M:
265
- $this->_axisLabels[self::AXIS_X][$index] = $this->formatDate(
266
- new Zend_Date($label, 'yyyy-MM-dd')
267
- );
268
- break;
269
- case self::DATE_RANGE_1Y:
270
- case self::DATE_RANGE_2Y:
271
- $formats = Mage::app()->getLocale()->getTranslationList('datetime');
272
- $format = isset($formats['yyMM']) ? $formats['yyMM'] : 'MM/yyyy';
273
- $format = str_replace(array("yyyy", "yy", "MM"), array("Y", "y", "m"), $format);
274
- $this->_axisLabels[self::AXIS_X][$index] = date($format, strtotime($label));
275
- break;
276
- default:
277
- Mage::throwException($this->__('Range param doesn\'t recognized'));
278
- break;
279
- }
280
- } else {
281
- $this->_axisLabels[self::AXIS_X][$index] = '';
282
- }
283
- }
284
- return $this->_axisLabels[self::AXIS_X];
285
- }
286
-
287
- /**
288
- * Get Y axis params array
289
- *
290
- * @return array
291
- */
292
- protected function _getYLabels()
293
- {
294
- $localMaxValue = $localMinValue = array();
295
- // process each string in the array, and find the max length
296
- foreach ($this->getAllSeries() as $index => $series) {
297
- $localMaxValue[$index] = max($series);
298
- $localMinValue[$index] = min($series);
299
- }
300
-
301
- if (is_numeric($this->_max)) {
302
- $maxvalue = $this->_max;
303
- } else {
304
- $maxvalue = max($localMaxValue);
305
- }
306
- if (is_numeric($this->_min)) {
307
- $minvalue = $this->_min;
308
- } else {
309
- $minvalue = min($localMinValue);
310
- }
311
-
312
- // default values
313
- $yLabels = array();
314
-
315
- if ($minvalue >= 0 && $maxvalue >= 0) {
316
- $miny = 0;
317
- if ($maxvalue > 10) {
318
- $p = pow(10, $this->_getPow($maxvalue));
319
- $maxy = ceil($maxvalue / $p) * $p;
320
- $yLabels = range($miny, $maxy, $p);
321
- } else {
322
- $maxy = ceil($maxvalue + 1);
323
- $yLabels = range($miny, $maxy, 1);
324
- }
325
- }
326
- return $yLabels;
327
- }
328
-
329
- /**
330
- * Get chart xml object
331
- *
332
- * @return Mage_XmlConnect_Model_Simplexml_Element
333
- */
334
- public function getXmlObj()
335
- {
336
- return $this->_xmlObj;
337
- }
338
-
339
- /**
340
- * Set chart xml object
341
- *
342
- * @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
343
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphDataAbstract
344
- */
345
- public function setXmlObj($xmlObj)
346
- {
347
- $this->_xmlObj = $xmlObj;
348
- return $this;
349
- }
350
- }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphInfo.php DELETED
@@ -1,160 +0,0 @@
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 diagram info 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_GraphInfo extends Mage_Core_Block_Abstract
35
- {
36
- /**
37
- * Time range filter options
38
- *
39
- * @var array
40
- */
41
- protected $_timeRangeOptions;
42
-
43
- /**
44
- * Add last orders info to xml object
45
- *
46
- * @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
47
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphInfo
48
- */
49
- public function addGraphInfoToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $xmlObj)
50
- {
51
- /** @var $graphInfoXmlObj Mage_XmlConnect_Model_Simplexml_Element */
52
- $graphInfoXmlObj = $xmlObj->addCustomChild('chart');
53
- $this->_addRangeValues($graphInfoXmlObj)->_addDataSelector($graphInfoXmlObj)->_addTotalsBar($graphInfoXmlObj);
54
-
55
- $graphInfoXmlObj = $graphInfoXmlObj->addCustomChild('chart_data');
56
- $this->_addChartDataOrders($graphInfoXmlObj)->_addChartDataAmounts($graphInfoXmlObj);
57
- return $this;
58
- }
59
-
60
- /**
61
- * Add time range select filed to xml object
62
- *
63
- * @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
64
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphInfo
65
- */
66
- protected function _addRangeValues(Mage_XmlConnect_Model_Simplexml_Element $xmlObj)
67
- {
68
- $options = $this->_getRangeOptions();
69
-
70
- /** @var $rangeXmlObj Mage_XmlConnect_Model_Simplexml_Form_Element_Select */
71
- $rangeXmlObj = Mage::getModel('xmlconnect/simplexml_form_element_select', array(
72
- 'label' => $this->__('Select Range'),
73
- 'options' => $options,
74
- 'value' => $options[0]['value']
75
- ));
76
- $rangeXmlObj->setId('range_id');
77
- $xmlObj->appendChild($rangeXmlObj->toXmlObject());
78
- return $this;
79
- }
80
-
81
- /**
82
- * Get range filter options
83
- *
84
- * @return array
85
- */
86
- protected function _getRangeOptions()
87
- {
88
- if (null === $this->_timeRangeOptions) {
89
- $options = array();
90
- foreach ($this->helper('adminhtml/dashboard_data')->getDatePeriods() as $value => $label) {
91
- if (in_array($value, array('custom'))) {
92
- continue;
93
- }
94
- $options[] = array('label' => $label, 'value' => $value);
95
- }
96
- $this->_timeRangeOptions = $options;
97
- }
98
- return $this->_timeRangeOptions;
99
- }
100
-
101
- /**
102
- * Add data select field to xml object
103
- *
104
- * @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
105
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphInfo
106
- */
107
- protected function _addDataSelector(Mage_XmlConnect_Model_Simplexml_Element $xmlObj)
108
- {
109
- /** @var $rangeXmlObj Mage_XmlConnect_Model_Simplexml_Form_Element_Select */
110
- $rangeXmlObj = Mage::getModel('xmlconnect/simplexml_form_element_select', array(
111
- 'label' => $this->__('Select Chart'),
112
- 'value' => 'orders',
113
- 'options' => array(
114
- array('label' => $this->__('Orders'), 'value' => 'orders'),
115
- array('label' => $this->__('Amounts'), 'value' => 'amounts')
116
- )));
117
- $rangeXmlObj->setId('data_details_id');
118
- $xmlObj->appendChild($rangeXmlObj->toXmlObject());
119
- return $this;
120
- }
121
-
122
- /**
123
- * Add orders chart data to xml object
124
- *
125
- * @param Mage_XmlConnect_Model_Simplexml_Element $graphInfoXmlObj
126
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphInfo
127
- */
128
- protected function _addChartDataOrders(Mage_XmlConnect_Model_Simplexml_Element $graphInfoXmlObj)
129
- {
130
- $this->getChild('graph_order_data')->setRangeOptions($this->_getRangeOptions())
131
- ->addOrderChartDataToXmlObj($graphInfoXmlObj);
132
- return $this;
133
- }
134
-
135
- /**
136
- * Add amounts chart data to xml object
137
- *
138
- * @param Mage_XmlConnect_Model_Simplexml_Element $graphInfoXmlObj
139
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphInfo
140
- */
141
- protected function _addChartDataAmounts(Mage_XmlConnect_Model_Simplexml_Element $graphInfoXmlObj)
142
- {
143
- $this->getChild('graph_amounts_data')->setRangeOptions($this->_getRangeOptions())
144
- ->addAmountsChartDataToXmlObj($graphInfoXmlObj);
145
- return $this;
146
- }
147
-
148
- /**
149
- * Add totals chart data to xml object
150
- *
151
- * @param Mage_XmlConnect_Model_Simplexml_Element $graphInfoXmlObj
152
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphInfo
153
- */
154
- protected function _addTotalsBar(Mage_XmlConnect_Model_Simplexml_Element $graphInfoXmlObj)
155
- {
156
- $this->getChild('graph_totals_data')->setRangeOptions($this->_getRangeOptions())
157
- ->addTotalsDataToXmlObj($graphInfoXmlObj);
158
- return $this;
159
- }
160
- }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphOrderData.php DELETED
@@ -1,71 +0,0 @@
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
- * Orders 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_GraphOrderData
35
- extends Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphDataAbstract
36
- {
37
- /**
38
- * Initialize object
39
- */
40
- public function __construct()
41
- {
42
- $this->setHtmlId('orders');
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('quantity');
55
- $this->_axisMaps = array('x' => 'range', 'y' => 'quantity');
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_GraphOrderData
64
- */
65
- public function addOrderChartDataToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $xmlObj)
66
- {
67
- $this->_xmlObj = $xmlObj->addCustomChild('chart_data_details', null, array('id' => 'orders'));
68
- $this->_addAllStoreData();
69
- return $this;
70
- }
71
- }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Connect/Dashboard/GraphTotalsData.php DELETED
@@ -1,123 +0,0 @@
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
- * Totals 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_GraphTotalsData extends Mage_Adminhtml_Block_Dashboard_Totals
35
- {
36
- /**
37
- * Get rid of unnecessary collection initialization by parent
38
- *
39
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphTotalsData
40
- */
41
- protected function _prepareLayout()
42
- {
43
- return $this;
44
- }
45
-
46
- /**
47
- * Init totals collection and assign totals values
48
- *
49
- * @param null|int $storeId
50
- * @param string $rangeId
51
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphTotalsData
52
- */
53
- protected function _initCollection($storeId, $rangeId)
54
- {
55
- if (!Mage::helper('core')->isModuleEnabled('Mage_Reports')) {
56
- return $this;
57
- }
58
-
59
- /* @var $collection Mage_Reports_Model_Mysql4_Order_Collection */
60
- $collection = Mage::getResourceModel('reports/order_collection')->addCreateAtPeriodFilter($rangeId)
61
- ->calculateTotals((bool)$storeId);
62
-
63
- if ($storeId) {
64
- $collection->addFieldToFilter('store_id', $storeId);
65
- } elseif (!$collection->isLive()) {
66
- $collection->addFieldToFilter('store_id', array(
67
- 'eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId()
68
- ));
69
- }
70
-
71
- $collection->load();
72
- $totals = $collection->getFirstItem();
73
-
74
- $this->addTotal($this->__('Revenue'), $totals->getRevenue());
75
- $this->addTotal($this->__('Tax'), $totals->getTax());
76
- $this->addTotal($this->__('Shipping'), $totals->getShipping());
77
- $this->addTotal($this->__('Quantity'), $totals->getQuantity() * 1, true);
78
- return $this;
79
- }
80
-
81
- /**
82
- * Add cart totals data to xml object
83
- *
84
- * @param Mage_XmlConnect_Model_Simplexml_Element $xmlObj
85
- * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_GraphTotalsData
86
- */
87
- public function addTotalsDataToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $xmlObj)
88
- {
89
- $dataValuesXml = $xmlObj->addCustomChild('chart_totals');
90
-
91
- foreach (Mage::helper('xmlconnect/adminApplication')->getSwitcherList() as $storeFilter) {
92
- $storeId = $storeFilter ? $storeFilter : null;
93
-
94
- $totalsXml = $dataValuesXml->addCustomChild('totals', null, array(
95
- 'store_id' => $storeId ? $storeId : Mage_XmlConnect_Helper_AdminApplication::ALL_STORE_VIEWS
96