Mage_Core_Adminhtml - Version 1.7.0.0

Version Notes

1.7.0.0

Download this release

Release Info

Developer Magento Core Team
Extension Mage_Core_Adminhtml
Version 1.7.0.0
Comparing to
See all releases


Code changes from version 1.6.2.0 to 1.7.0.0

Files changed (978) hide show
  1. app/code/core/Mage/Adminhtml/Block/Abstract.php +1 -1
  2. app/code/core/Mage/Adminhtml/Block/Api/Buttons.php +1 -1
  3. app/code/core/Mage/Adminhtml/Block/Api/Editroles.php +1 -1
  4. app/code/core/Mage/Adminhtml/Block/Api/Edituser.php +1 -1
  5. app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php +1 -1
  6. app/code/core/Mage/Adminhtml/Block/Api/Role.php +1 -1
  7. app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php +1 -1
  8. app/code/core/Mage/Adminhtml/Block/Api/Roles.php +1 -1
  9. app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php +1 -1
  10. app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php +4 -2
  11. app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php +1 -1
  12. app/code/core/Mage/Adminhtml/Block/Api/Tab/Userroles.php +1 -1
  13. app/code/core/Mage/Adminhtml/Block/Api/User.php +11 -1
  14. app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php +1 -1
  15. app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php +1 -1
  16. app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php +1 -1
  17. app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php +1 -1
  18. app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php +1 -1
  19. app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php +1 -1
  20. app/code/core/Mage/Adminhtml/Block/Api/Users.php +1 -1
  21. app/code/core/Mage/Adminhtml/Block/Backup.php +57 -9
  22. app/code/core/Mage/Adminhtml/Block/Backup/Dialogs.php +53 -0
  23. app/code/core/Mage/Adminhtml/Block/Backup/Grid.php +53 -19
  24. app/code/core/Mage/Adminhtml/Block/Cache.php +1 -1
  25. app/code/core/Mage/Adminhtml/Block/Cache/Additional.php +1 -1
  26. app/code/core/Mage/Adminhtml/Block/Cache/Grid.php +1 -1
  27. app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php +1 -1
  28. app/code/core/Mage/Adminhtml/Block/Catalog.php +1 -1
  29. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php +1 -1
  30. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php +1 -1
  31. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php +1 -1
  32. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php +1 -1
  33. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php +1 -1
  34. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php +5 -2
  35. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php +1 -1
  36. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php +1 -1
  37. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php +3 -1
  38. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php +1 -1
  39. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php +1 -1
  40. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php +1 -1
  41. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php +1 -1
  42. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php +1 -1
  43. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php +1 -1
  44. app/code/core/Mage/Adminhtml/Block/Catalog/Form.php +1 -1
  45. app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php +1 -1
  46. app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php +5 -4
  47. app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php +1 -1
  48. app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php +17 -12
  49. app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php +4 -3
  50. app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php +1 -1
  51. app/code/core/Mage/Adminhtml/Block/Catalog/Product.php +1 -1
  52. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php +1 -1
  53. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php +1 -1
  54. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php +1 -1
  55. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php +1 -1
  56. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php +1 -1
  57. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php +1 -1
  58. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php +1 -1
  59. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php +1 -1
  60. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php +1 -1
  61. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php +1 -1
  62. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php +1 -1
  63. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php +1 -1
  64. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php +1 -1
  65. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php +1 -1
  66. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php +1 -1
  67. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php +21 -20
  68. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php +1 -1
  69. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php +1 -1
  70. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php +2 -2
  71. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php +1 -1
  72. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php +1 -1
  73. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php +1 -1
  74. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php +1 -1
  75. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php +1 -1
  76. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php +1 -1
  77. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php +1 -1
  78. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php +1 -1
  79. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php +1 -1
  80. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php +1 -1
  81. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php +1 -1
  82. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php +1 -1
  83. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php +1 -1
  84. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php +9 -3
  85. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php +1 -1
  86. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php +1 -1
  87. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php +1 -1
  88. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php +1 -1
  89. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php +1 -1
  90. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php +1 -1
  91. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php +1 -1
  92. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php +1 -1
  93. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php +50 -36
  94. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php +1 -1
  95. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php +76 -22
  96. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php +1 -1
  97. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php +11 -1
  98. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php +1 -1
  99. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php +1 -1
  100. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php +1 -1
  101. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php +1 -1
  102. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php +1 -1
  103. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php +1 -1
  104. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php +1 -1
  105. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php +1 -1
  106. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group.php +96 -0
  107. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php +347 -0
  108. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php +1 -1
  109. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php +15 -287
  110. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php +1 -1
  111. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php +1 -1
  112. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php +1 -1
  113. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php +23 -2
  114. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php +1 -1
  115. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php +1 -1
  116. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php +1 -1
  117. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php +1 -1
  118. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php +11 -9
  119. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php +1 -1
  120. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php +1 -1
  121. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag.php +1 -1
  122. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag/Customer.php +1 -1
  123. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php +1 -1
  124. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php +45 -6
  125. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php +1 -1
  126. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php +1 -1
  127. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php +1 -1
  128. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php +1 -1
  129. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php +42 -6
  130. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php +1 -1
  131. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php +1 -1
  132. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php +1 -1
  133. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php +7 -9
  134. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php +3 -1
  135. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php +1 -1
  136. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php +1 -1
  137. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php +1 -1
  138. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php +1 -1
  139. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight.php +46 -0
  140. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Price.php +1 -1
  141. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php +3 -3
  142. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php +1 -1
  143. app/code/core/Mage/Adminhtml/Block/Catalog/Search.php +1 -1
  144. app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php +1 -1
  145. app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php +26 -31
  146. app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php +1 -1
  147. app/code/core/Mage/Adminhtml/Block/Checkout/Agreement.php +2 -2
  148. app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php +2 -2
  149. app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php +4 -2
  150. app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php +1 -1
  151. app/code/core/Mage/Adminhtml/Block/Cms/Block.php +1 -1
  152. app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php +1 -1
  153. app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php +7 -3
  154. app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php +1 -1
  155. app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php +1 -1
  156. app/code/core/Mage/Adminhtml/Block/Cms/Page.php +1 -1
  157. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php +16 -13
  158. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php +1 -1
  159. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php +1 -1
  160. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php +1 -1
  161. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php +5 -3
  162. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php +1 -1
  163. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php +1 -1
  164. app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php +1 -1
  165. app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php +1 -1
  166. app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php +1 -1
  167. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php +1 -1
  168. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php +1 -1
  169. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php +1 -1
  170. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php +1 -1
  171. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php +1 -1
  172. app/code/core/Mage/Adminhtml/Block/Customer.php +1 -1
  173. app/code/core/Mage/Adminhtml/Block/Customer/Edit.php +1 -1
  174. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Form.php +1 -1
  175. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php +105 -0
  176. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php +1 -1
  177. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php +19 -12
  178. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php +57 -13
  179. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php +4 -1
  180. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php +12 -2
  181. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php +1 -1
  182. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php +10 -3
  183. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php +1 -1
  184. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php +1 -1
  185. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php +1 -1
  186. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php +1 -1
  187. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php +1 -1
  188. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php +1 -1
  189. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tag.php +1 -1
  190. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php +1 -1
  191. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php +16 -6
  192. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php +4 -8
  193. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php +1 -1
  194. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php +1 -1
  195. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php +1 -1
  196. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php +1 -1
  197. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php +3 -5
  198. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php +13 -6
  199. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php +1 -1
  200. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php +1 -1
  201. app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php +1 -1
  202. app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php +1 -1
  203. app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Image.php +1 -1
  204. app/code/core/Mage/Adminhtml/Block/Customer/Grid.php +1 -1
  205. app/code/core/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php +1 -1
  206. app/code/core/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php +1 -1
  207. app/code/core/Mage/Adminhtml/Block/Customer/Group.php +1 -1
  208. app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php +1 -1
  209. app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php +2 -3
  210. app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php +1 -1
  211. app/code/core/Mage/Adminhtml/Block/Customer/Online.php +1 -1
  212. app/code/core/Mage/Adminhtml/Block/Customer/Online/Filter.php +1 -1
  213. app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php +1 -1
  214. app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php +1 -1
  215. app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php +1 -1
  216. app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php +1 -1
  217. app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php +98 -0
  218. app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php +79 -0
  219. app/code/core/Mage/Adminhtml/Block/Dashboard.php +1 -1
  220. app/code/core/Mage/Adminhtml/Block/Dashboard/Abstract.php +1 -1
  221. app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php +1 -1
  222. app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php +1 -1
  223. app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php +1 -1
  224. app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php +1 -1
  225. app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php +1 -1
  226. app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php +1 -1
  227. app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php +1 -1
  228. app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Last.php +1 -1
  229. app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php +1 -1
  230. app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Top.php +1 -1
  231. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php +1 -1
  232. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php +1 -1
  233. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php +1 -1
  234. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php +1 -1
  235. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php +1 -1
  236. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php +1 -1
  237. app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php +1 -1
  238. app/code/core/Mage/Adminhtml/Block/Denied.php +1 -1
  239. app/code/core/Mage/Adminhtml/Block/Html/Date.php +1 -1
  240. app/code/core/Mage/Adminhtml/Block/Html/Select.php +1 -1
  241. app/code/core/Mage/Adminhtml/Block/Media/Editor.php +1 -1
  242. app/code/core/Mage/Adminhtml/Block/Media/Uploader.php +5 -4
  243. app/code/core/Mage/Adminhtml/Block/Messages.php +1 -1
  244. app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php +1 -1
  245. app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php +1 -1
  246. app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php +1 -1
  247. app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php +1 -1
  248. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php +1 -1
  249. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php +1 -1
  250. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php +19 -11
  251. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php +1 -1
  252. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php +1 -1
  253. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php +1 -1
  254. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php +1 -1
  255. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php +1 -1
  256. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php +1 -1
  257. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php +1 -1
  258. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php +1 -1
  259. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php +1 -1
  260. app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php +1 -1
  261. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php +1 -1
  262. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php +1 -1
  263. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php +1 -1
  264. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php +1 -1
  265. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php +1 -1
  266. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php +1 -1
  267. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php +1 -1
  268. app/code/core/Mage/Adminhtml/Block/Notification/Baseurl.php +1 -1
  269. app/code/core/Mage/Adminhtml/Block/Notification/Grid.php +1 -1
  270. app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Actions.php +1 -1
  271. app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php +1 -1
  272. app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php +1 -1
  273. app/code/core/Mage/Adminhtml/Block/Notification/Inbox.php +1 -1
  274. app/code/core/Mage/Adminhtml/Block/Notification/Security.php +1 -1
  275. app/code/core/Mage/Adminhtml/Block/Notification/Survey.php +1 -1
  276. app/code/core/Mage/Adminhtml/Block/Notification/Toolbar.php +1 -1
  277. app/code/core/Mage/Adminhtml/Block/Notification/Window.php +10 -10
  278. app/code/core/Mage/Adminhtml/Block/Page.php +1 -1
  279. app/code/core/Mage/Adminhtml/Block/Page/Footer.php +1 -1
  280. app/code/core/Mage/Adminhtml/Block/Page/Head.php +1 -1
  281. app/code/core/Mage/Adminhtml/Block/Page/Header.php +1 -1
  282. app/code/core/Mage/Adminhtml/Block/Page/Menu.php +33 -1
  283. app/code/core/Mage/Adminhtml/Block/Page/Notices.php +1 -1
  284. app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php +1 -1
  285. app/code/core/Mage/Adminhtml/Block/Permissions/Editroles.php +1 -1
  286. app/code/core/Mage/Adminhtml/Block/Permissions/Edituser.php +1 -1
  287. app/code/core/Mage/Adminhtml/Block/Permissions/Grid/Role.php +1 -1
  288. app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php +1 -1
  289. app/code/core/Mage/Adminhtml/Block/Permissions/Role.php +1 -1
  290. app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php +1 -1
  291. app/code/core/Mage/Adminhtml/Block/Permissions/Roles.php +1 -1
  292. app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php +1 -1
  293. app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php +1 -1
  294. app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php +1 -1
  295. app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Useredit.php +1 -1
  296. app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Userroles.php +1 -1
  297. app/code/core/Mage/Adminhtml/Block/Permissions/User.php +11 -1
  298. app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php +1 -1
  299. app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Form.php +1 -1
  300. app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php +1 -1
  301. app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php +1 -1
  302. app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tabs.php +1 -1
  303. app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php +1 -1
  304. app/code/core/Mage/Adminhtml/Block/Permissions/Usernroles.php +1 -1
  305. app/code/core/Mage/Adminhtml/Block/Permissions/Users.php +1 -1
  306. app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php +1 -1
  307. app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit/Form.php +1 -1
  308. app/code/core/Mage/Adminhtml/Block/Poll/Edit.php +1 -1
  309. app/code/core/Mage/Adminhtml/Block/Poll/Edit/Form.php +1 -1
  310. app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers.php +1 -1
  311. app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Form.php +1 -1
  312. app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Grid.php +1 -1
  313. app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/List.php +1 -1
  314. app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php +3 -2
  315. app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tabs.php +1 -1
  316. app/code/core/Mage/Adminhtml/Block/Poll/Grid.php +1 -1
  317. app/code/core/Mage/Adminhtml/Block/Poll/Poll.php +1 -1
  318. app/code/core/Mage/Adminhtml/Block/Promo/Catalog.php +1 -1
  319. app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php +24 -33
  320. app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Form.php +1 -1
  321. app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Js.php +1 -1
  322. app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php +1 -1
  323. app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php +1 -1
  324. app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php +25 -35
  325. app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php +1 -1
  326. app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Grid.php +48 -11
  327. app/code/core/Mage/Adminhtml/Block/Promo/Quote.php +1 -1
  328. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php +23 -30
  329. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Form.php +1 -1
  330. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php +1 -1
  331. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php +1 -1
  332. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php +88 -0
  333. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php +146 -0
  334. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php +145 -0
  335. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php +42 -0
  336. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php +4 -1
  337. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php +52 -30
  338. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php +59 -0
  339. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tabs.php +1 -1
  340. app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php +47 -9
  341. app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser.php +5 -1
  342. app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php +1 -1
  343. app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php +1 -1
  344. app/code/core/Mage/Adminhtml/Block/Rating/Edit.php +1 -1
  345. app/code/core/Mage/Adminhtml/Block/Rating/Edit/Form.php +1 -1
  346. app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php +45 -46
  347. app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Options.php +1 -1
  348. app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tabs.php +1 -1
  349. app/code/core/Mage/Adminhtml/Block/Rating/Grid.php +13 -2
  350. app/code/core/Mage/Adminhtml/Block/Rating/Rating.php +1 -1
  351. app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php +1 -1
  352. app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php +2 -2
  353. app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts.php +1 -1
  354. app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php +1 -1
  355. app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders.php +1 -1
  356. app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php +1 -1
  357. app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals.php +1 -1
  358. app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php +6 -3
  359. app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php +8 -2
  360. app/code/core/Mage/Adminhtml/Block/Report/Grid.php +15 -3
  361. app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php +53 -6
  362. app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php +1 -1
  363. app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php +1 -1
  364. app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php +1 -1
  365. app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php +1 -1
  366. app/code/core/Mage/Adminhtml/Block/Report/Grid/Shopcart.php +84 -0
  367. app/code/core/Mage/Adminhtml/Block/Report/Product.php +1 -1
  368. app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php +1 -1
  369. app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Grid.php +1 -1
  370. app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php +1 -1
  371. app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php +1 -1
  372. app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php +1 -1
  373. app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock/Grid.php +1 -1
  374. app/code/core/Mage/Adminhtml/Block/Report/Product/Ordered.php +1 -1
  375. app/code/core/Mage/Adminhtml/Block/Report/Product/Ordered/Grid.php +9 -6
  376. app/code/core/Mage/Adminhtml/Block/Report/Product/Sold.php +1 -1
  377. app/code/core/Mage/Adminhtml/Block/Report/Product/Sold/Grid.php +1 -1
  378. app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed.php +17 -1
  379. app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed/Grid.php +72 -27
  380. app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php +1 -1
  381. app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php +8 -2
  382. app/code/core/Mage/Adminhtml/Block/Report/Review/Customer.php +1 -1
  383. app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php +1 -1
  384. app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php +1 -1
  385. app/code/core/Mage/Adminhtml/Block/Report/Review/Detail/Grid.php +1 -1
  386. app/code/core/Mage/Adminhtml/Block/Report/Review/Product.php +1 -1
  387. app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php +1 -1
  388. app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers.php +1 -1
  389. app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php +3 -2
  390. app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons.php +1 -1
  391. app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons/Grid.php +40 -7
  392. app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php +1 -1
  393. app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced.php +1 -1
  394. app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php +8 -4
  395. app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded.php +1 -1
  396. app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded/Grid.php +8 -4
  397. app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales.php +1 -1
  398. app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales/Grid.php +64 -50
  399. app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping.php +1 -1
  400. app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php +10 -5
  401. app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax.php +1 -1
  402. app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php +5 -3
  403. app/code/core/Mage/Adminhtml/Block/Report/Search.php +1 -1
  404. app/code/core/Mage/Adminhtml/Block/Report/Search/Grid.php +1 -1
  405. app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php +1 -1
  406. app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php +24 -21
  407. app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer.php +1 -1
  408. app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php +7 -5
  409. app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product.php +1 -1
  410. app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php +7 -4
  411. app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer.php +1 -1
  412. app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail.php +1 -1
  413. app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail/Grid.php +1 -1
  414. app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php +1 -1
  415. app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular.php +1 -1
  416. app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail.php +1 -1
  417. app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail/Grid.php +1 -1
  418. app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Grid.php +1 -1
  419. app/code/core/Mage/Adminhtml/Block/Report/Tag/Product.php +1 -1
  420. app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php +1 -1
  421. app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail/Grid.php +1 -1
  422. app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Grid.php +1 -1
  423. app/code/core/Mage/Adminhtml/Block/Report/Wishlist.php +1 -1
  424. app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php +1 -1
  425. app/code/core/Mage/Adminhtml/Block/Review/Add.php +1 -1
  426. app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php +8 -5
  427. app/code/core/Mage/Adminhtml/Block/Review/Edit.php +1 -1
  428. app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php +9 -9
  429. app/code/core/Mage/Adminhtml/Block/Review/Grid.php +27 -9
  430. app/code/core/Mage/Adminhtml/Block/Review/Grid/Filter/Type.php +1 -1
  431. app/code/core/Mage/Adminhtml/Block/Review/Grid/Renderer/Type.php +1 -1
  432. app/code/core/Mage/Adminhtml/Block/Review/Main.php +9 -1
  433. app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php +1 -1
  434. app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php +1 -1
  435. app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php +1 -1
  436. app/code/core/Mage/Adminhtml/Block/Sales.php +1 -1
  437. app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo.php +1 -1
  438. app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php +1 -1
  439. app/code/core/Mage/Adminhtml/Block/Sales/Invoice.php +1 -1
  440. app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php +1 -1
  441. app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php +1 -1
  442. app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Default.php +1 -1
  443. app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name.php +1 -1
  444. app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name/Grouped.php +1 -1
  445. app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Qty.php +1 -1
  446. app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Configurable.php +1 -1
  447. app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Default.php +1 -1
  448. app/code/core/Mage/Adminhtml/Block/Sales/Order.php +1 -1
  449. app/code/core/Mage/Adminhtml/Block/Sales/Order/Abstract.php +1 -1
  450. app/code/core/Mage/Adminhtml/Block/Sales/Order/Address.php +1 -1
  451. app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php +1 -1
  452. app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php +1 -1
  453. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php +17 -11
  454. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php +1 -1
  455. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Address.php +2 -1
  456. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php +1 -1
  457. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method/Form.php +1 -1
  458. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php +1 -1
  459. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php +1 -1
  460. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons/Form.php +1 -1
  461. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php +1 -1
  462. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php +1 -1
  463. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Data.php +1 -1
  464. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php +1 -1
  465. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php +2 -2
  466. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php +1 -1
  467. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php +25 -4
  468. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php +1 -1
  469. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php +1 -1
  470. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php +1 -1
  471. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items.php +49 -9
  472. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php +13 -1
  473. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Load.php +1 -1
  474. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Messages.php +1 -1
  475. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php +1 -1
  476. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter/Form.php +1 -1
  477. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php +1 -1
  478. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php +1 -1
  479. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Giftmessage.php +1 -1
  480. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php +4 -3
  481. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Product.php +1 -1
  482. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php +1 -1
  483. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Address.php +2 -1
  484. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php +1 -1
  485. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php +1 -1
  486. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php +1 -1
  487. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Abstract.php +1 -1
  488. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php +23 -2
  489. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php +1 -1
  490. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php +1 -1
  491. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php +1 -1
  492. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php +1 -1
  493. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php +1 -1
  494. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Wishlist.php +1 -1
  495. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php +1 -1
  496. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php +1 -1
  497. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php +1 -8
  498. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Default.php +1 -1
  499. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Discount.php +1 -1
  500. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php +1 -1
  501. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php +6 -5
  502. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Subtotal.php +1 -1
  503. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Table.php +1 -1
  504. app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Tax.php +1 -1
  505. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php +4 -12
  506. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php +1 -1
  507. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php +1 -1
  508. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php +1 -1
  509. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Totals.php +1 -1
  510. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php +1 -1
  511. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Comments.php +1 -1
  512. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Form.php +1 -1
  513. app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Items.php +1 -1
  514. app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php +1 -1
  515. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php +1 -1
  516. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Form.php +1 -1
  517. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php +1 -1
  518. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php +1 -1
  519. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Totals.php +1 -1
  520. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php +1 -1
  521. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Comments.php +1 -1
  522. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Form.php +1 -1
  523. app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Items.php +1 -1
  524. app/code/core/Mage/Adminhtml/Block/Sales/Order/Payment.php +1 -1
  525. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php +1 -1
  526. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php +1 -1
  527. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php +3 -2
  528. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php +1 -1
  529. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php +15 -2
  530. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php +1 -1
  531. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Tracking/Info.php +1 -1
  532. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php +1 -1
  533. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Comments.php +1 -1
  534. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php +4 -3
  535. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Items.php +1 -1
  536. app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php +1 -1
  537. app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php +1 -1
  538. app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign.php +1 -1
  539. app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign/Form.php +1 -1
  540. app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit.php +1 -1
  541. app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit/Form.php +1 -1
  542. app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Grid.php +1 -1
  543. app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New.php +1 -1
  544. app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php +3 -1
  545. app/code/core/Mage/Adminhtml/Block/Sales/Order/Totalbar.php +1 -1
  546. app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php +1 -1
  547. app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php +1 -1
  548. app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Tax.php +1 -1
  549. app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php +2 -2
  550. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Form.php +1 -1
  551. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php +1 -1
  552. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php +1 -1
  553. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php +10 -1
  554. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items.php +1 -1
  555. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php +1 -1
  556. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Messages.php +1 -1
  557. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php +1 -1
  558. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php +104 -26
  559. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php +1 -1
  560. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php +1 -1
  561. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php +1 -1
  562. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php +1 -1
  563. app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php +1 -1
  564. app/code/core/Mage/Adminhtml/Block/Sales/Reorder/Renderer/Action.php +1 -1
  565. app/code/core/Mage/Adminhtml/Block/Sales/Shipment.php +1 -1
  566. app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php +1 -1
  567. app/code/core/Mage/Adminhtml/Block/Sales/Totals.php +1 -1
  568. app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php +1 -1
  569. app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Child/Grid.php +1 -1
  570. app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php +2 -5
  571. app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail/Grid.php +3 -2
  572. app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php +1 -1
  573. app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php +1 -1
  574. app/code/core/Mage/Adminhtml/Block/Sitemap.php +1 -1
  575. app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php +1 -1
  576. app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php +5 -3
  577. app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php +1 -1
  578. app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php +1 -1
  579. app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php +1 -1
  580. app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php +1 -1
  581. app/code/core/Mage/Adminhtml/Block/Store/Switcher.php +53 -2
  582. app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php +83 -0
  583. app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php +84 -0
  584. app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php +1 -1
  585. app/code/core/Mage/Adminhtml/Block/System/Account/Edit/Form.php +1 -1
  586. app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php +1 -1
  587. app/code/core/Mage/Adminhtml/Block/System/Cache/Form.php +1 -1
  588. app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php +1 -1
  589. app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php +1 -1
  590. app/code/core/Mage/Adminhtml/Block/System/Config/Form.php +11 -5
  591. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php +1 -1
  592. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php +1 -1
  593. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php +1 -1
  594. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php +1 -1
  595. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php +1 -1
  596. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php +1 -1
  597. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php +1 -1
  598. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php +1 -1
  599. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php +1 -1
  600. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php +1 -1
  601. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php +1 -1
  602. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php +1 -1
  603. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php +1 -1
  604. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php +12 -9
  605. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php +8 -1
  606. app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php +1 -1
  607. app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php +10 -1
  608. app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php +1 -1
  609. app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php +3 -3
  610. app/code/core/Mage/Adminhtml/Block/System/Convert/Gui.php +1 -1
  611. app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php +1 -1
  612. app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Form.php +1 -1
  613. app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php +1 -1
  614. app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/View.php +1 -1
  615. app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php +1 -1
  616. app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php +1 -1
  617. app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php +1 -1
  618. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php +1 -1
  619. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php +1 -1
  620. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Filter/Action.php +1 -1
  621. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Form.php +1 -1
  622. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Renderer/Action.php +1 -1
  623. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Edit.php +1 -1
  624. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/History.php +1 -1
  625. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php +1 -1
  626. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tabs.php +1 -1
  627. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php +1 -1
  628. app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php +1 -1
  629. app/code/core/Mage/Adminhtml/Block/System/Currency.php +1 -1
  630. app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Form.php +1 -1
  631. app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Main.php +1 -1
  632. app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Rates.php +1 -1
  633. app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tabs.php +1 -1
  634. app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php +1 -1
  635. app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php +1 -1
  636. app/code/core/Mage/Adminhtml/Block/System/Design.php +1 -1
  637. app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php +1 -1
  638. app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php +4 -2
  639. app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tabs.php +1 -1
  640. app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php +1 -1
  641. app/code/core/Mage/Adminhtml/Block/System/Email/Template.php +1 -1
  642. app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php +1 -1
  643. app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php +6 -4
  644. app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php +1 -1
  645. app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php +9 -10
  646. app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php +1 -1
  647. app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php +1 -1
  648. app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php +5 -4
  649. app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php +16 -7
  650. app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php +1 -1
  651. app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Form.php +1 -1
  652. app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php +1 -1
  653. app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php +1 -1
  654. app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php +1 -1
  655. app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php +10 -4
  656. app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php +1 -1
  657. app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Group.php +6 -3
  658. app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Store.php +6 -3
  659. app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Website.php +7 -3
  660. app/code/core/Mage/Adminhtml/Block/System/Store/Store.php +1 -1
  661. app/code/core/Mage/Adminhtml/Block/System/Variable.php +1 -1
  662. app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php +1 -1
  663. app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php +1 -1
  664. app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php +1 -1
  665. app/code/core/Mage/Adminhtml/Block/Tag.php +1 -1
  666. app/code/core/Mage/Adminhtml/Block/Tag/Assigned/Grid.php +1 -1
  667. app/code/core/Mage/Adminhtml/Block/Tag/Customer.php +1 -1
  668. app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php +1 -1
  669. app/code/core/Mage/Adminhtml/Block/Tag/Edit.php +1 -1
  670. app/code/core/Mage/Adminhtml/Block/Tag/Edit/Accordion.php +1 -1
  671. app/code/core/Mage/Adminhtml/Block/Tag/Edit/Assigned.php +1 -1
  672. app/code/core/Mage/Adminhtml/Block/Tag/Edit/Form.php +11 -5
  673. app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php +1 -1
  674. app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php +1 -1
  675. app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php +1 -1
  676. app/code/core/Mage/Adminhtml/Block/Tag/Grid/Products.php +1 -1
  677. app/code/core/Mage/Adminhtml/Block/Tag/Pending.php +1 -1
  678. app/code/core/Mage/Adminhtml/Block/Tag/Product.php +1 -1
  679. app/code/core/Mage/Adminhtml/Block/Tag/Product/Grid.php +1 -1
  680. app/code/core/Mage/Adminhtml/Block/Tag/Store/Switcher.php +1 -1
  681. app/code/core/Mage/Adminhtml/Block/Tag/Tag.php +1 -1
  682. app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php +1 -1
  683. app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit/Form.php +1 -1
  684. app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php +1 -1
  685. app/code/core/Mage/Adminhtml/Block/Tax/Class.php +1 -1
  686. app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php +1 -1
  687. app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit/Form.php +1 -1
  688. app/code/core/Mage/Adminhtml/Block/Tax/Class/Grid.php +1 -1
  689. app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php +74 -115
  690. app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php +1 -1
  691. app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php +1 -1
  692. app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php +1 -1
  693. app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExport.php +1 -1
  694. app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title.php +1 -1
  695. app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title/Fieldset.php +1 -1
  696. app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php +1 -1
  697. app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php +1 -1
  698. app/code/core/Mage/Adminhtml/Block/Tax/Rule.php +1 -1
  699. app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php +1 -1
  700. app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit/Form.php +1 -1
  701. app/code/core/Mage/Adminhtml/Block/Tax/Rule/Grid.php +1 -1
  702. app/code/core/Mage/Adminhtml/Block/Template.php +1 -1
  703. app/code/core/Mage/Adminhtml/Block/Text/List.php +1 -1
  704. app/code/core/Mage/Adminhtml/Block/Urlrewrite.php +1 -1
  705. app/code/core/Mage/Adminhtml/Block/Urlrewrite/Category/Tree.php +1 -1
  706. app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php +1 -1
  707. app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php +3 -1
  708. app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php +1 -1
  709. app/code/core/Mage/Adminhtml/Block/Urlrewrite/Link.php +1 -1
  710. app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php +1 -1
  711. app/code/core/Mage/Adminhtml/Block/Urlrewrite/Selector.php +1 -1
  712. app/code/core/Mage/Adminhtml/Block/Widget.php +1 -1
  713. app/code/core/Mage/Adminhtml/Block/Widget/Accordion.php +1 -1
  714. app/code/core/Mage/Adminhtml/Block/Widget/Accordion/Item.php +1 -1
  715. app/code/core/Mage/Adminhtml/Block/Widget/Breadcrumbs.php +1 -1
  716. app/code/core/Mage/Adminhtml/Block/Widget/Button.php +5 -3
  717. app/code/core/Mage/Adminhtml/Block/Widget/Container.php +1 -1
  718. app/code/core/Mage/Adminhtml/Block/Widget/Form.php +3 -4
  719. app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php +1 -1
  720. app/code/core/Mage/Adminhtml/Block/Widget/Form/Element.php +1 -1
  721. app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php +1 -6
  722. app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Gallery.php +1 -1
  723. app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Element.php +1 -1
  724. app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php +1 -1
  725. app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php +3 -2
  726. app/code/core/Mage/Adminhtml/Block/Widget/Grid.php +40 -10
  727. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Block.php +1 -1
  728. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php +1 -1
  729. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php +1 -1
  730. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Checkbox.php +1 -1
  731. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Country.php +1 -1
  732. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php +1 -1
  733. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php +1 -1
  734. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Interface.php +1 -1
  735. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Massaction.php +1 -1
  736. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php +1 -1
  737. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Radio.php +1 -1
  738. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Range.php +1 -1
  739. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php +1 -1
  740. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Store.php +25 -10
  741. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php +1 -1
  742. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Theme.php +1 -1
  743. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php +2 -11
  744. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php +13 -11
  745. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Checkbox.php +31 -5
  746. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Concat.php +4 -3
  747. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php +6 -3
  748. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php +21 -3
  749. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php +11 -7
  750. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php +9 -6
  751. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php +4 -3
  752. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Interface.php +15 -2
  753. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php +5 -1
  754. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Longtext.php +6 -5
  755. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Massaction.php +33 -8
  756. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php +15 -4
  757. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php +8 -8
  758. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php +21 -4
  759. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Radio.php +13 -6
  760. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php +8 -5
  761. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php +5 -4
  762. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php +9 -8
  763. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Theme.php +4 -3
  764. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Wrapline.php +9 -6
  765. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php +1 -1
  766. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php +1 -1
  767. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php +14 -13
  768. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item.php +1 -1
  769. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Default.php +1 -1
  770. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Interface.php +1 -1
  771. app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php +1 -1
  772. app/code/core/Mage/Adminhtml/Block/Widget/Tab/Interface.php +1 -1
  773. app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php +1 -1
  774. app/code/core/Mage/Adminhtml/Block/Widget/Tree.php +1 -1
  775. app/code/core/Mage/Adminhtml/Block/Widget/View/Container.php +1 -1
  776. app/code/core/Mage/Adminhtml/Controller/Action.php +16 -4
  777. app/code/core/Mage/Adminhtml/Controller/Report/Abstract.php +124 -0
  778. app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php +1 -1
  779. app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php +1 -1
  780. app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php +1 -1
  781. app/code/core/Mage/Adminhtml/Exception.php +1 -1
  782. app/code/core/Mage/Adminhtml/Helper/Addresses.php +1 -1
  783. app/code/core/Mage/Adminhtml/Helper/Catalog.php +1 -1
  784. app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Composite.php +1 -1
  785. app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php +1 -1
  786. app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php +1 -1
  787. app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php +1 -1
  788. app/code/core/Mage/Adminhtml/Helper/Dashboard/Order.php +1 -1
  789. app/code/core/Mage/Adminhtml/Helper/Data.php +1 -1
  790. app/code/core/Mage/Adminhtml/Helper/Js.php +1 -1
  791. app/code/core/Mage/Adminhtml/Helper/Media/Js.php +3 -2
  792. app/code/core/Mage/Adminhtml/Helper/Rss.php +1 -1
  793. app/code/core/Mage/Adminhtml/Helper/Sales.php +1 -1
  794. app/code/core/Mage/Adminhtml/Model/Config.php +1 -1
  795. app/code/core/Mage/Adminhtml/Model/Config/Data.php +3 -1
  796. app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php +1 -1
  797. app/code/core/Mage/Adminhtml/Model/Email/Template.php +1 -1
  798. app/code/core/Mage/Adminhtml/Model/Extension.php +1 -1
  799. app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php +1 -1
  800. app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php +1 -1
  801. app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php +1 -1
  802. app/code/core/Mage/Adminhtml/Model/Observer.php +1 -1
  803. app/code/core/Mage/Adminhtml/Model/Report/Item.php +1 -1
  804. app/code/core/Mage/Adminhtml/Model/Sales/Order.php +2 -4
  805. app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php +109 -43
  806. app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php +1 -1
  807. app/code/core/Mage/Adminhtml/Model/Search/Catalog.php +1 -1
  808. app/code/core/Mage/Adminhtml/Model/Search/Customer.php +1 -1
  809. app/code/core/Mage/Adminhtml/Model/Search/Order.php +1 -1
  810. app/code/core/Mage/Adminhtml/Model/Session.php +1 -1
  811. app/code/core/Mage/Adminhtml/Model/Session/Quote.php +1 -1
  812. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php +1 -12
  813. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php +1 -1
  814. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php +1 -1
  815. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php +5 -5
  816. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php +26 -1
  817. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php +1 -1
  818. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php +1 -1
  819. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php +1 -1
  820. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php +1 -1
  821. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php +1 -1
  822. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php +1 -1
  823. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php +1 -1
  824. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cookie.php +37 -0
  825. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php +1 -1
  826. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php +1 -1
  827. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php +1 -1
  828. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php +1 -1
  829. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php +1 -1
  830. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php +1 -1
  831. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php +5 -5
  832. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php +1 -1
  833. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php +1 -1
  834. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php +1 -1
  835. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php +1 -1
  836. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Package.php +1 -1
  837. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php +1 -1
  838. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Logo.php +95 -0
  839. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php +1 -1
  840. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php +1 -1
  841. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php +27 -6
  842. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php +37 -0
  843. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php +1 -1
  844. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php +2 -2
  845. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php +1 -1
  846. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Layer/Children.php +1 -1
  847. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php +5 -6
  848. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php +15 -2
  849. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php +1 -1
  850. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php +1 -1
  851. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php +1 -1
  852. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php +1 -1
  853. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php +1 -1
  854. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php +1 -1
  855. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php +1 -1
  856. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php +1 -1
  857. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php +1 -1
  858. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php +1 -1
  859. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php +1 -1
  860. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php +1 -1
  861. app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php +1 -1
  862. app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php +1 -1
  863. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php +4 -3
  864. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php +1 -1
  865. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php +1 -1
  866. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php +1 -1
  867. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php +1 -1
  868. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php +1 -1
  869. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php +1 -1
  870. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php +1 -1
  871. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php +1 -1
  872. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php +1 -1
  873. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php +1 -1
  874. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php +1 -1
  875. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php +1 -1
  876. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php +1 -1
  877. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php +1 -1
  878. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php +1 -1
  879. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php +1 -1
  880. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php +48 -0
  881. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php +1 -1
  882. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php +50 -0
  883. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php +1 -1
  884. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php +1 -1
  885. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php +1 -1
  886. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php +4 -5
  887. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php +1 -1
  888. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php +1 -1
  889. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php +1 -1
  890. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php +1 -1
  891. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php +1 -1
  892. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php +1 -1
  893. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Language.php +1 -1
  894. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php +1 -1
  895. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php +1 -1
  896. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php +1 -1
  897. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php +1 -1
  898. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php +1 -1
  899. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php +1 -1
  900. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php +1 -1
  901. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php +1 -1
  902. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php +1 -1
  903. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php +1 -1
  904. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php +1 -1
  905. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php +1 -1
  906. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php +1 -1
  907. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php +1 -1
  908. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php +1 -1
  909. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php +1 -1
  910. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php +1 -1
  911. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php +6 -2
  912. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php +1 -1
  913. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php +7 -4
  914. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php +1 -1
  915. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php +1 -1
  916. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php +1 -1
  917. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allowedmethods.php +1 -1
  918. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php +1 -1
  919. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php +1 -1
  920. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php +1 -1
  921. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Taxclass.php +1 -1
  922. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php +1 -1
  923. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php +1 -1
  924. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php +1 -1
  925. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php +1 -1
  926. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php +1 -1
  927. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php +1 -1
  928. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php +1 -1
  929. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php +1 -1
  930. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php +1 -1
  931. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php +1 -1
  932. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php +14 -1
  933. app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php +1 -1
  934. app/code/core/Mage/Adminhtml/Model/System/Store.php +2 -2
  935. app/code/core/Mage/Adminhtml/Model/Url.php +1 -1
  936. app/code/core/Mage/Adminhtml/controllers/AjaxController.php +1 -1
  937. app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php +1 -1
  938. app/code/core/Mage/Adminhtml/controllers/Api/UserController.php +1 -1
  939. app/code/core/Mage/Adminhtml/controllers/CacheController.php +1 -1
  940. app/code/core/Mage/Adminhtml/controllers/Catalog/Category/WidgetController.php +1 -1
  941. app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php +18 -8
  942. app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php +12 -4
  943. app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +4 -21
  944. app/code/core/Mage/Adminhtml/controllers/Catalog/Product/DatafeedsController.php +1 -1
  945. app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php +6 -1
  946. app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GroupController.php +1 -1
  947. app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php +4 -2
  948. app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php +1 -1
  949. app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php +1 -1
  950. app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php +24 -10
  951. app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php +2 -4
  952. app/code/core/Mage/Adminhtml/controllers/CatalogController.php +1 -1
  953. app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php +6 -4
  954. app/code/core/Mage/Adminhtml/controllers/Cms/Block/WidgetController.php +1 -1
  955. app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php +1 -1
  956. app/code/core/Mage/Adminhtml/controllers/Cms/Page/WidgetController.php +1 -1
  957. app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php +1 -1
  958. app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php +1 -1
  959. app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php +1 -1
  960. app/code/core/Mage/Adminhtml/controllers/Customer/Cart/Product/Composite/CartController.php +1 -1
  961. app/code/core/Mage/Adminhtml/controllers/Customer/ConfigController.php +1 -1
  962. app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php +12 -7
  963. app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php +1 -1
  964. app/code/core/Mage/Adminhtml/controllers/Customer/System/Config/ValidatevatController.php +91 -0
  965. app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php +1 -1
  966. app/code/core/Mage/Adminhtml/controllers/CustomerController.php +82 -73
  967. app/code/core/Mage/Adminhtml/controllers/DashboardController.php +19 -4
  968. app/code/core/Mage/Adminhtml/controllers/IndexController.php +28 -37
  969. app/code/core/Mage/Adminhtml/controllers/JsonController.php +1 -1
  970. app/code/core/Mage/Adminhtml/controllers/Media/EditorController.php +1 -1
  971. app/code/core/Mage/Adminhtml/controllers/Media/UploaderController.php +1 -1
  972. app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php +1 -1
  973. app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php +1 -1
  974. app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php +3 -7
  975. app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php +1 -1
  976. app/code/core/Mage/Adminhtml/controllers/NotificationController.php +1 -1
  977. app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php +3 -3
  978. app/code/{core/Mage/Adminhtml/controllers/Permissions/UserController.php → core} +0 -0
app/code/core/Mage/Adminhtml/Block/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Buttons.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Editroles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Edituser.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -38,7 +38,9 @@ class Mage_Adminhtml_Block_Api_Tab_Rolesedit extends Mage_Adminhtml_Block_Widget
38
  $selrids = array();
39
 
40
  foreach ($rules_set->getItems() as $item) {
41
- if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getPermission() == 'allow') {
 
 
42
  $resources[$item->getResource_id()]['checked'] = true;
43
  array_push($selrids, $item->getResource_id());
44
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
38
  $selrids = array();
39
 
40
  foreach ($rules_set->getItems() as $item) {
41
+ if (array_key_exists(strtolower($item->getResource_id()), $resources)
42
+ && $item->getApiPermission() == 'allow')
43
+ {
44
  $resources[$item->getResource_id()]['checked'] = true;
45
  array_push($selrids, $item->getResource_id());
46
  }
app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Tab/Userroles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Api_Tab_Userroles extends Mage_Adminhtml_Block_Widget_Tabs
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Api_Tab_Userroles extends Mage_Adminhtml_Block_Widget_Tabs
app/code/core/Mage/Adminhtml/Block/Api/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -42,4 +42,14 @@ class Mage_Adminhtml_Block_Api_User extends Mage_Adminhtml_Block_Widget_Grid_Con
42
  parent::__construct();
43
  }
44
 
 
 
 
 
 
 
 
 
 
 
45
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
42
  parent::__construct();
43
  }
44
 
45
+ /**
46
+ * Prepare output HTML
47
+ *
48
+ * @return string
49
+ */
50
+ protected function _toHtml()
51
+ {
52
+ Mage::dispatchEvent('api_user_html_before', array('block' => $this));
53
+ return parent::_toHtml();
54
+ }
55
  }
app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Api/Users.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Backup.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,14 +31,14 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
-
35
  class Mage_Adminhtml_Block_Backup extends Mage_Adminhtml_Block_Template
36
  {
37
- public function __construct()
38
- {
39
- parent::__construct();
40
- $this->setTemplate('backup/list.phtml');
41
- }
 
42
 
43
  protected function _prepareLayout()
44
  {
@@ -46,14 +46,32 @@ class Mage_Adminhtml_Block_Backup extends Mage_Adminhtml_Block_Template
46
  $this->setChild('createButton',
47
  $this->getLayout()->createBlock('adminhtml/widget_button')
48
  ->setData(array(
49
- 'label' => Mage::helper('backup')->__('Create Backup'),
50
- 'onclick' => "window.location.href='" . $this->getUrl('*/*/create') . "'",
51
  'class' => 'task'
52
  ))
53
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  $this->setChild('backupsGrid',
55
  $this->getLayout()->createBlock('adminhtml/backup_grid')
56
  );
 
 
57
  }
58
 
59
  public function getCreateButtonHtml()
@@ -61,8 +79,38 @@ class Mage_Adminhtml_Block_Backup extends Mage_Adminhtml_Block_Template
61
  return $this->getChildHtml('createButton');
62
  }
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  public function getGridHtml()
65
  {
66
  return $this->getChildHtml('backupsGrid');
67
  }
 
 
 
 
 
 
 
 
 
 
68
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
 
34
  class Mage_Adminhtml_Block_Backup extends Mage_Adminhtml_Block_Template
35
  {
36
+ /**
37
+ * Block's template
38
+ *
39
+ * @var string
40
+ */
41
+ protected $_template = 'backup/list.phtml';
42
 
43
  protected function _prepareLayout()
44
  {
46
  $this->setChild('createButton',
47
  $this->getLayout()->createBlock('adminhtml/widget_button')
48
  ->setData(array(
49
+ 'label' => Mage::helper('backup')->__('Database Backup'),
50
+ 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_DB . "')",
51
  'class' => 'task'
52
  ))
53
  );
54
+ $this->setChild('createSnapshotButton',
55
+ $this->getLayout()->createBlock('adminhtml/widget_button')
56
+ ->setData(array(
57
+ 'label' => Mage::helper('backup')->__('System Backup'),
58
+ 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_SYSTEM_SNAPSHOT . "')",
59
+ 'class' => ''
60
+ ))
61
+ );
62
+ $this->setChild('createMediaBackupButton',
63
+ $this->getLayout()->createBlock('adminhtml/widget_button')
64
+ ->setData(array(
65
+ 'label' => Mage::helper('backup')->__('Database and Media Backup'),
66
+ 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_MEDIA . "')",
67
+ 'class' => ''
68
+ ))
69
+ );
70
  $this->setChild('backupsGrid',
71
  $this->getLayout()->createBlock('adminhtml/backup_grid')
72
  );
73
+
74
+ $this->setChild('dialogs', $this->getLayout()->createBlock('adminhtml/backup_dialogs'));
75
  }
76
 
77
  public function getCreateButtonHtml()
79
  return $this->getChildHtml('createButton');
80
  }
81
 
82
+ /**
83
+ * Generate html code for "Create System Snapshot" button
84
+ *
85
+ * @return string
86
+ */
87
+ public function getCreateSnapshotButtonHtml()
88
+ {
89
+ return $this->getChildHtml('createSnapshotButton');
90
+ }
91
+
92
+ /**
93
+ * Generate html code for "Create Media Backup" button
94
+ *
95
+ * @return string
96
+ */
97
+ public function getCreateMediaBackupButtonHtml()
98
+ {
99
+ return $this->getChildHtml('createMediaBackupButton');
100
+ }
101
+
102
  public function getGridHtml()
103
  {
104
  return $this->getChildHtml('backupsGrid');
105
  }
106
+
107
+ /**
108
+ * Generate html code for pop-up messages that will appear when user click on "Rollback" link
109
+ *
110
+ * @return string
111
+ */
112
+ public function getDialogsHtml()
113
+ {
114
+ return $this->getChildHtml('dialogs');
115
+ }
116
  }
app/code/core/Mage/Adminhtml/Block/Backup/Dialogs.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml rollback dialogs block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Backup_Dialogs extends Mage_Adminhtml_Block_Template
35
+ {
36
+ /**
37
+ * Block's template
38
+ *
39
+ * @var string
40
+ */
41
+ protected $_template = 'backup/dialogs.phtml';
42
+
43
+ /**
44
+ * Include backup.js file in page before rendering
45
+ *
46
+ * @see Mage_Core_Block_Abstract::_prepareLayout()
47
+ */
48
+ protected function _prepareLayout()
49
+ {
50
+ $this->getLayout()->getBlock('head')->addJs('mage/adminhtml/backup.js');
51
+ parent::_prepareLayout();
52
+ }
53
+ }
app/code/core/Mage/Adminhtml/Block/Backup/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -51,8 +51,29 @@ class Mage_Adminhtml_Block_Backup_Grid extends Mage_Adminhtml_Block_Widget_Grid
51
  return parent::_prepareCollection();
52
  }
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  /**
55
  * Configuration of grid
 
 
56
  */
57
  protected function _prepareColumns()
58
  {
@@ -62,45 +83,58 @@ class Mage_Adminhtml_Block_Backup_Grid extends Mage_Adminhtml_Block_Widget_Grid
62
  'header' => Mage::helper('backup')->__('Time'),
63
  'index' => 'date_object',
64
  'type' => 'datetime',
 
 
 
 
 
 
 
 
 
65
  ));
66
 
67
  $this->addColumn('size', array(
68
  'header' => Mage::helper('backup')->__('Size, Bytes'),
69
  'index' => 'size',
70
  'type' => 'number',
71
- 'sortable' => false,
72
  'filter' => false
73
  ));
74
 
75
  $this->addColumn('type', array(
76
  'header' => Mage::helper('backup')->__('Type'),
77
  'type' => 'options',
78
- 'options' => array('db' => Mage::helper('backup')->__('DB')),
79
- 'index' =>'type'
 
80
  ));
81
 
82
  $this->addColumn('download', array(
83
  'header' => Mage::helper('backup')->__('Download'),
84
- 'format' => '<a href="' . $this->getUrl('*/*/download', array('time' => '$time', 'type' => '$type')) .'">gz</a> &nbsp; <small>('.$url7zip.')</small>',
 
85
  'index' => 'type',
86
  'sortable' => false,
87
  'filter' => false
88
  ));
89
 
90
- $this->addColumn('action', array(
91
- 'header' => Mage::helper('backup')->__('Action'),
92
- 'type' => 'action',
93
- 'width' => '80px',
94
- 'filter' => false,
95
- 'sortable' => false,
96
- 'actions' => array(array(
97
- 'url' => $this->getUrl('*/*/delete', array('time' => '$time', 'type' => '$type')),
98
- 'caption' => Mage::helper('adminhtml')->__('Delete'),
99
- 'confirm' => Mage::helper('adminhtml')->__('Are you sure you want to do this?')
100
- )),
101
- 'index' => 'type',
102
- 'sortable' => false
103
- ));
 
 
104
 
105
  return $this;
106
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
51
  return parent::_prepareCollection();
52
  }
53
 
54
+ /**
55
+ * Prepare mass action controls
56
+ *
57
+ * @return Mage_Adminhtml_Block_Backup_Grid
58
+ */
59
+ protected function _prepareMassaction()
60
+ {
61
+ $this->setMassactionIdField('id');
62
+ $this->getMassactionBlock()->setFormFieldName('ids');
63
+
64
+ $this->getMassactionBlock()->addItem('delete', array(
65
+ 'label'=> Mage::helper('adminhtml')->__('Delete'),
66
+ 'url' => $this->getUrl('*/*/massDelete'),
67
+ 'confirm' => Mage::helper('backup')->__('Are you sure you want to delete the selected backup(s)?')
68
+ ));
69
+
70
+ return $this;
71
+ }
72
+
73
  /**
74
  * Configuration of grid
75
+ *
76
+ * @return Mage_Adminhtml_Block_Backup_Grid
77
  */
78
  protected function _prepareColumns()
79
  {
83
  'header' => Mage::helper('backup')->__('Time'),
84
  'index' => 'date_object',
85
  'type' => 'datetime',
86
+ 'width' => 200
87
+ ));
88
+
89
+ $this->addColumn('display_name', array(
90
+ 'header' => Mage::helper('backup')->__('Name'),
91
+ 'index' => 'display_name',
92
+ 'filter' => false,
93
+ 'sortable' => true,
94
+ 'width' => 350
95
  ));
96
 
97
  $this->addColumn('size', array(
98
  'header' => Mage::helper('backup')->__('Size, Bytes'),
99
  'index' => 'size',
100
  'type' => 'number',
101
+ 'sortable' => true,
102
  'filter' => false
103
  ));
104
 
105
  $this->addColumn('type', array(
106
  'header' => Mage::helper('backup')->__('Type'),
107
  'type' => 'options',
108
+ 'options' => Mage::helper('backup')->getBackupTypes(),
109
+ 'index' => 'type',
110
+ 'width' => 300
111
  ));
112
 
113
  $this->addColumn('download', array(
114
  'header' => Mage::helper('backup')->__('Download'),
115
+ 'format' => '<a href="' . $this->getUrl('*/*/download', array('time' => '$time', 'type' => '$type'))
116
+ . '">$extension</a> &nbsp; <small>('.$url7zip.')</small>',
117
  'index' => 'type',
118
  'sortable' => false,
119
  'filter' => false
120
  ));
121
 
122
+ if (Mage::helper('backup')->isRollbackAllowed()){
123
+ $this->addColumn('action', array(
124
+ 'header' => Mage::helper('backup')->__('Action'),
125
+ 'type' => 'action',
126
+ 'width' => '80px',
127
+ 'filter' => false,
128
+ 'sortable' => false,
129
+ 'actions' => array(array(
130
+ 'url' => '#',
131
+ 'caption' => Mage::helper('backup')->__('Rollback'),
132
+ 'onclick' => 'return backup.rollback(\'$type\', \'$time\');'
133
+ )),
134
+ 'index' => 'type',
135
+ 'sortable' => false
136
+ ));
137
+ }
138
 
139
  return $this;
140
  }
app/code/core/Mage/Adminhtml/Block/Cache.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cache/Additional.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cache/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -46,6 +46,7 @@ class Mage_Adminhtml_Block_Catalog_Category_Helper_Pricestep extends Varien_Data
46
  $this->setData('disabled', 'disabled');
47
  $disabled = true;
48
  }
 
49
  $html = parent::getElementHtml();
50
  $htmlId = 'use_config_' . $this->getHtmlId();
51
  $html .= '<br/><input id="'.$htmlId.'" name="use_config[]" value="' . $this->getId() . '"';
@@ -57,7 +58,9 @@ class Mage_Adminhtml_Block_Catalog_Category_Helper_Pricestep extends Varien_Data
57
 
58
  $html .= ' <label for="'.$htmlId.'" class="normal">'
59
  . Mage::helper('adminhtml')->__('Use Config Settings').'</label>';
60
- $html .= '<script type="text/javascript">toggleValueElements($(\''.$htmlId.'\'), $(\''.$htmlId.'\').parentNode);</script>';
 
 
61
 
62
  return $html;
63
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
46
  $this->setData('disabled', 'disabled');
47
  $disabled = true;
48
  }
49
+ parent::addClass('validate-number validate-number-range number-range-0.01-1000000000');
50
  $html = parent::getElementHtml();
51
  $htmlId = 'use_config_' . $this->getHtmlId();
52
  $html .= '<br/><input id="'.$htmlId.'" name="use_config[]" value="' . $this->getId() . '"';
58
 
59
  $html .= ' <label for="'.$htmlId.'" class="normal">'
60
  . Mage::helper('adminhtml')->__('Use Config Settings').'</label>';
61
+ $html .= '<script type="text/javascript">'
62
+ . 'toggleValueElements($(\''.$htmlId.'\'), $(\''.$htmlId.'\').parentNode);'
63
+ . '</script>';
64
 
65
  return $html;
66
  }
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -158,6 +158,8 @@ class Mage_Adminhtml_Block_Catalog_Category_Tab_Attributes extends Mage_Adminhtm
158
 
159
  $form->addValues($this->getCategory()->getData());
160
 
 
 
161
  $form->setFieldNameSuffix('general');
162
  $this->setForm($form);
163
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
158
 
159
  $form->addValues($this->getCategory()->getData());
160
 
161
+ Mage::dispatchEvent('adminhtml_catalog_category_edit_prepare_form', array('form'=>$form));
162
+
163
  $form->setFieldNameSuffix('general');
164
  $this->setForm($form);
165
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Catalog_Category_Tab_Design extends Mage_Adminhtml_Block_Catalog_Form
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Catalog_Category_Tab_Design extends Mage_Adminhtml_Block_Catalog_Form
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,8 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder extends Mage_Adminhtml_Block_System_Config_Form_Field
 
35
  {
36
 
37
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
@@ -43,7 +44,7 @@ class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder extends
43
  );
44
 
45
  $element->setValues($_options)
46
- ->setStyle('width:70px;')
47
  ->setName($element->getName() . '[]');
48
  if ($element->getValue()) {
49
  $values = explode(',', $element->getValue());
@@ -56,6 +57,6 @@ class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder extends
56
  $_parts[] = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
57
  $_parts[] = $element->setValue(isset($values[2]) ? $values[2] : null)->getElementHtml();
58
 
59
- return implode(' / ', $_parts);
60
  }
61
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder
35
+ extends Mage_Adminhtml_Block_System_Config_Form_Field
36
  {
37
 
38
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
44
  );
45
 
46
  $element->setValues($_options)
47
+ ->setClass('select-date')
48
  ->setName($element->getName() . '[]');
49
  if ($element->getValue()) {
50
  $values = explode(',', $element->getValue());
57
  $_parts[] = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
58
  $_parts[] = $element->setValue(isset($values[2]) ? $values[2] : null)->getElementHtml();
59
 
60
+ return implode(' <span>/</span> ', $_parts);
61
  }
62
  }
app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,8 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
 
35
  {
36
  /**
37
  * Initialize block template
@@ -101,8 +102,9 @@ class Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element extends Mage_A
101
 
102
  if (!$this->getDataObject()->getExistsStoreValueFlag($attributeCode)) {
103
  return true;
104
- } else if ($this->getElement()->getValue() == $defaultValue &&
105
- $this->getDataObject()->getStoreId() != $this->_getDefaultStoreId()) {
 
106
  return false;
107
  }
108
  if ($defaultValue === false && !$this->getAttribute()->getIsRequired() && $this->getElement()->getValue()) {
@@ -139,13 +141,11 @@ class Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element extends Mage_A
139
  return $html;
140
  }
141
  if ($attribute->isScopeGlobal()) {
142
- $html.= '[GLOBAL]';
143
- }
144
- elseif ($attribute->isScopeWebsite()) {
145
- $html.= '[WEBSITE]';
146
- }
147
- elseif ($attribute->isScopeStore()) {
148
- $html.= '[STORE VIEW]';
149
  }
150
 
151
  return $html;
@@ -158,7 +158,12 @@ class Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element extends Mage_A
158
  */
159
  public function getElementLabelHtml()
160
  {
161
- return $this->getElement()->getLabelHtml();
 
 
 
 
 
162
  }
163
 
164
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element
35
+ extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
36
  {
37
  /**
38
  * Initialize block template
102
 
103
  if (!$this->getDataObject()->getExistsStoreValueFlag($attributeCode)) {
104
  return true;
105
+ } else if ($this->getElement()->getValue() == $defaultValue &&
106
+ $this->getDataObject()->getStoreId() != $this->_getDefaultStoreId()
107
+ ) {
108
  return false;
109
  }
110
  if ($defaultValue === false && !$this->getAttribute()->getIsRequired() && $this->getElement()->getValue()) {
141
  return $html;
142
  }
143
  if ($attribute->isScopeGlobal()) {
144
+ $html .= Mage::helper('adminhtml')->__('[GLOBAL]');
145
+ } elseif ($attribute->isScopeWebsite()) {
146
+ $html .= Mage::helper('adminhtml')->__('[WEBSITE]');
147
+ } elseif ($attribute->isScopeStore()) {
148
+ $html .= Mage::helper('adminhtml')->__('[STORE VIEW]');
 
 
149
  }
150
 
151
  return $html;
158
  */
159
  public function getElementLabelHtml()
160
  {
161
+ $element = $this->getElement();
162
+ $label = $element->getLabel();
163
+ if (!empty($label)) {
164
+ $element->setLabel($this->__($label));
165
+ }
166
+ return $element->getLabelHtml();
167
  }
168
 
169
  /**
app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -48,7 +48,7 @@ class Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg extends Varien_Data_Form_
48
  'label' => Mage::helper('catalog')->__('WYSIWYG Editor'),
49
  'type' => 'button',
50
  'disabled' => $disabled,
51
- 'class' => ($disabled) ? 'disabled' : '',
52
  'onclick' => 'catalogWysiwygEditor.open(\''.Mage::helper('adminhtml')->getUrl('*/*/wysiwyg').'\', \''.$this->getHtmlId().'\')'
53
  ))->toHtml();
54
  }
@@ -63,7 +63,8 @@ class Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg extends Varien_Data_Form_
63
  public function getIsWysiwygEnabled()
64
  {
65
  if (Mage::helper('catalog')->isModuleEnabled('Mage_Cms')) {
66
- return (bool)(Mage::getSingleton('cms/wysiwyg_config')->isEnabled() && $this->getEntityAttribute()->getIsWysiwygEnabled());
 
67
  }
68
 
69
  return false;
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
48
  'label' => Mage::helper('catalog')->__('WYSIWYG Editor'),
49
  'type' => 'button',
50
  'disabled' => $disabled,
51
+ 'class' => ($disabled) ? 'disabled btn-wysiwyg' : 'btn-wysiwyg',
52
  'onclick' => 'catalogWysiwygEditor.open(\''.Mage::helper('adminhtml')->getUrl('*/*/wysiwyg').'\', \''.$this->getHtmlId().'\')'
53
  ))->toHtml();
54
  }
63
  public function getIsWysiwygEnabled()
64
  {
65
  if (Mage::helper('catalog')->isModuleEnabled('Mage_Cms')) {
66
+ return (bool)(Mage::getSingleton('cms/wysiwyg_config')->isEnabled()
67
+ && $this->getEntityAttribute()->getIsWysiwygEnabled());
68
  }
69
 
70
  return false;
app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -37,6 +37,10 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset extends Ma
37
  parent::__construct();
38
  }
39
 
 
 
 
 
40
  protected function _prepareForm()
41
  {
42
  $data = Mage::getModel('eav/entity_attribute_set')
@@ -44,21 +48,19 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset extends Ma
44
 
45
  $form = new Varien_Data_Form();
46
  $fieldset = $form->addFieldset('set_name', array('legend'=> Mage::helper('catalog')->__('Edit Set Name')));
47
- $fieldset->addField('attribute_set_name', 'text',
48
- array(
49
- 'label' => Mage::helper('catalog')->__('Name'),
50
- 'note' => Mage::helper('catalog')->__('For internal use.'),
51
- 'name' => 'attribute_set_name',
52
- 'required' => true,
53
- 'class' => 'required-entry',
54
- 'value' => $data->getAttributeSetName()
55
  ));
56
 
57
  if( !$this->getRequest()->getParam('id', false) ) {
58
- $fieldset->addField('gotoEdit', 'hidden',
59
- array(
60
- 'name' => 'gotoEdit',
61
- 'value' => '1'
62
  ));
63
 
64
  $sets = Mage::getModel('eav/entity_attribute_set')
@@ -67,13 +69,12 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset extends Ma
67
  ->load()
68
  ->toOptionArray();
69
 
70
- $fieldset->addField('skeleton_set', 'select',
71
- array(
72
- 'label' => Mage::helper('catalog')->__('Based On'),
73
- 'name' => 'skeleton_set',
74
- 'required' => true,
75
- 'class' => 'required-entry',
76
- 'values' => $sets,
77
  ));
78
  }
79
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
37
  parent::__construct();
38
  }
39
 
40
+ /**
41
+ * Prepares attribute set form
42
+ *
43
+ */
44
  protected function _prepareForm()
45
  {
46
  $data = Mage::getModel('eav/entity_attribute_set')
48
 
49
  $form = new Varien_Data_Form();
50
  $fieldset = $form->addFieldset('set_name', array('legend'=> Mage::helper('catalog')->__('Edit Set Name')));
51
+ $fieldset->addField('attribute_set_name', 'text', array(
52
+ 'label' => Mage::helper('catalog')->__('Name'),
53
+ 'note' => Mage::helper('catalog')->__('For internal use.'),
54
+ 'name' => 'attribute_set_name',
55
+ 'required' => true,
56
+ 'class' => 'required-entry validate-no-html-tags',
57
+ 'value' => $data->getAttributeSetName()
 
58
  ));
59
 
60
  if( !$this->getRequest()->getParam('id', false) ) {
61
+ $fieldset->addField('gotoEdit', 'hidden', array(
62
+ 'name' => 'gotoEdit',
63
+ 'value' => '1'
 
64
  ));
65
 
66
  $sets = Mage::getModel('eav/entity_attribute_set')
69
  ->load()
70
  ->toOptionArray();
71
 
72
+ $fieldset->addField('skeleton_set', 'select', array(
73
+ 'label' => Mage::helper('catalog')->__('Based On'),
74
+ 'name' => 'skeleton_set',
75
+ 'required' => true,
76
+ 'class' => 'required-entry',
77
+ 'values' => $sets,
 
78
  ));
79
  }
80
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -44,7 +44,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Toolbar_Add extends Mag
44
  $this->getLayout()->createBlock('adminhtml/widget_button')
45
  ->setData(array(
46
  'label' => Mage::helper('catalog')->__('Save Attribute Set'),
47
- 'onclick' => 'addSet.submit();',
48
  'class' => 'save'
49
  )));
50
  $this->setChild('back_button',
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
44
  $this->getLayout()->createBlock('adminhtml/widget_button')
45
  ->setData(array(
46
  'label' => Mage::helper('catalog')->__('Save Attribute Set'),
47
+ 'onclick' => 'if (addSet.submit()) disableElements(\'save\');',
48
  'class' => 'save'
49
  )));
50
  $this->setChild('back_button',
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -44,7 +44,9 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute_Tab_Attributes
44
 
45
  protected function _prepareForm()
46
  {
47
- $this->setFormExcludedFieldList(array('tier_price','gallery', 'media_gallery', 'recurring_profile'));
 
 
48
  Mage::dispatchEvent('adminhtml_catalog_product_form_prepare_excluded_field_list', array('object'=>$this));
49
 
50
  $form = new Varien_Data_Form();
@@ -79,6 +81,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute_Tab_Attributes
79
  {
80
  return array(
81
  'price' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_price'),
 
82
  'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_image'),
83
  'boolean' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_boolean')
84
  );
@@ -92,8 +95,11 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute_Tab_Attributes
92
  */
93
  protected function _getAdditionalElementHtml($element)
94
  {
 
 
 
95
  return '<span class="attribute-change-checkbox"><input type="checkbox" id="' . $element->getId()
96
- . '-checkbox" onclick="toogleFieldEditMode(this, \'' . $element->getId()
97
  . '\')" /><label for="' . $element->getId() . '-checkbox">' . Mage::helper('catalog')->__('Change')
98
  . '</label></span>
99
  <script type="text/javascript">initDisableFields(\''.$element->getId().'\')</script>';
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
44
 
45
  protected function _prepareForm()
46
  {
47
+ $this->setFormExcludedFieldList(array(
48
+ 'tier_price','gallery', 'media_gallery', 'recurring_profile', 'group_price'
49
+ ));
50
  Mage::dispatchEvent('adminhtml_catalog_product_form_prepare_excluded_field_list', array('object'=>$this));
51
 
52
  $form = new Varien_Data_Form();
81
  {
82
  return array(
83
  'price' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_price'),
84
+ 'weight' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_weight'),
85
  'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_image'),
86
  'boolean' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_boolean')
87
  );
95
  */
96
  protected function _getAdditionalElementHtml($element)
97
  {
98
+ // Add name attribute to checkboxes that correspond to multiselect elements
99
+ $nameAttributeHtml = ($element->getExtType() === 'multiple') ? 'name="' . $element->getId() . '_checkbox"'
100
+ : '';
101
  return '<span class="attribute-change-checkbox"><input type="checkbox" id="' . $element->getId()
102
+ . '-checkbox" ' . $nameAttributeHtml . ' onclick="toogleFieldEditMode(this, \'' . $element->getId()
103
  . '\')" /><label for="' . $element->getId() . '-checkbox">' . Mage::helper('catalog')->__('Change')
104
  . '</label></span>
105
  <script type="text/javascript">initDisableFields(\''.$element->getId().'\')</script>';
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,69 +29,79 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Adminhtml_Block_Catalog_Form
35
  {
36
  /**
37
- * Load Wysiwyg on demand and Prepare layout
38
  */
39
  protected function _prepareLayout()
40
  {
41
  parent::_prepareLayout();
42
- if (Mage::helper('catalog')->isModuleEnabled('Mage_Cms')) {
43
- if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
44
- $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
45
- }
46
  }
47
  }
48
 
 
 
 
 
 
49
  protected function _prepareForm()
50
  {
51
- if ($group = $this->getGroup()) {
 
52
  $form = new Varien_Data_Form();
53
- /**
54
- * Initialize product object as form property
55
- * for using it in elements generation
56
- */
57
  $form->setDataObject(Mage::registry('product'));
58
 
59
- $fieldset = $form->addFieldset('group_fields'.$group->getId(),
60
- array(
61
- 'legend'=>Mage::helper('catalog')->__($group->getAttributeGroupName()),
62
- 'class'=>'fieldset-wide',
63
  ));
64
 
65
  $attributes = $this->getGroupAttributes();
66
 
67
  $this->_setFieldset($attributes, $fieldset, array('gallery'));
68
 
69
- if ($urlKey = $form->getElement('url_key')) {
 
70
  $urlKey->setRenderer(
71
  $this->getLayout()->createBlock('adminhtml/catalog_form_renderer_attribute_urlkey')
72
  );
73
  }
74
 
75
- if ($tierPrice = $form->getElement('tier_price')) {
 
76
  $tierPrice->setRenderer(
77
  $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_price_tier')
78
  );
79
  }
80
 
81
- if ($recurringProfile = $form->getElement('recurring_profile')) {
 
 
 
 
 
 
 
 
82
  $recurringProfile->setRenderer(
83
  $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_price_recurring')
84
  );
85
  }
86
 
87
- /**
88
- * Add new attribute button if not image tab
89
- */
90
  if (!$form->getElement('media_gallery')
91
- && Mage::getSingleton('admin/session')->isAllowed('catalog/attributes/attributes')) {
92
- $headerBar = $this->getLayout()->createBlock(
93
- 'adminhtml/catalog_product_edit_tab_attributes_create'
94
- );
95
 
96
  $headerBar->getConfig()
97
  ->setTabId('group_' . $group->getId())
@@ -101,9 +111,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Admi
101
  ->setTypeId($form->getDataObject()->getTypeId())
102
  ->setProductId($form->getDataObject()->getId());
103
 
104
- $fieldset->setHeaderBar(
105
- $headerBar->toHtml()
106
- );
107
  }
108
 
109
  if ($form->getElement('meta_description')) {
@@ -111,9 +119,8 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Admi
111
  }
112
 
113
  $values = Mage::registry('product')->getData();
114
- /**
115
- * Set attribute default values for new product
116
- */
117
  if (!Mage::registry('product')->getId()) {
118
  foreach ($attributes as $attribute) {
119
  if (!isset($values[$attribute->getAttributeCode()])) {
@@ -124,7 +131,8 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Admi
124
 
125
  if (Mage::registry('product')->hasLockedAttributes()) {
126
  foreach (Mage::registry('product')->getLockedAttributes() as $attribute) {
127
- if ($element = $form->getElement($attribute)) {
 
128
  $element->setReadonly(true, true);
129
  }
130
  }
@@ -132,16 +140,22 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Admi
132
  $form->addValues($values);
133
  $form->setFieldNameSuffix('product');
134
 
135
- Mage::dispatchEvent('adminhtml_catalog_product_edit_prepare_form', array('form'=>$form));
136
 
137
  $this->setForm($form);
138
  }
139
  }
140
 
 
 
 
 
 
141
  protected function _getAdditionalElementTypes()
142
  {
143
  $result = array(
144
  'price' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_price'),
 
145
  'gallery' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_gallery'),
146
  'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_image'),
147
  'boolean' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_boolean'),
@@ -150,9 +164,9 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Admi
150
 
151
  $response = new Varien_Object();
152
  $response->setTypes(array());
153
- Mage::dispatchEvent('adminhtml_catalog_product_edit_element_types', array('response'=>$response));
154
 
155
- foreach ($response->getTypes() as $typeName=>$typeClass) {
156
  $result[$typeName] = $typeClass;
157
  }
158
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Adminhtml_Block_Catalog_Form
35
  {
36
  /**
37
+ * Load Wysiwyg on demand and prepare layout
38
  */
39
  protected function _prepareLayout()
40
  {
41
  parent::_prepareLayout();
42
+ if (Mage::helper('catalog')->isModuleEnabled('Mage_Cms')
43
+ && Mage::getSingleton('cms/wysiwyg_config')->isEnabled()
44
+ ) {
45
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
46
  }
47
  }
48
 
49
+ /**
50
+ * Prepare attributes form
51
+ *
52
+ * @return null
53
+ */
54
  protected function _prepareForm()
55
  {
56
+ $group = $this->getGroup();
57
+ if ($group) {
58
  $form = new Varien_Data_Form();
59
+
60
+ // Initialize product object as form property to use it during elements generation
 
 
61
  $form->setDataObject(Mage::registry('product'));
62
 
63
+ $fieldset = $form->addFieldset('group_fields' . $group->getId(), array(
64
+ 'legend' => Mage::helper('catalog')->__($group->getAttributeGroupName()),
65
+ 'class' => 'fieldset-wide'
 
66
  ));
67
 
68
  $attributes = $this->getGroupAttributes();
69
 
70
  $this->_setFieldset($attributes, $fieldset, array('gallery'));
71
 
72
+ $urlKey = $form->getElement('url_key');
73
+ if ($urlKey) {
74
  $urlKey->setRenderer(
75
  $this->getLayout()->createBlock('adminhtml/catalog_form_renderer_attribute_urlkey')
76
  );
77
  }
78
 
79
+ $tierPrice = $form->getElement('tier_price');
80
+ if ($tierPrice) {
81
  $tierPrice->setRenderer(
82
  $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_price_tier')
83
  );
84
  }
85
 
86
+ $groupPrice = $form->getElement('group_price');
87
+ if ($groupPrice) {
88
+ $groupPrice->setRenderer(
89
+ $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_price_group')
90
+ );
91
+ }
92
+
93
+ $recurringProfile = $form->getElement('recurring_profile');
94
+ if ($recurringProfile) {
95
  $recurringProfile->setRenderer(
96
  $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_price_recurring')
97
  );
98
  }
99
 
100
+ // Add new attribute button if it is not an image tab
 
 
101
  if (!$form->getElement('media_gallery')
102
+ && Mage::getSingleton('admin/session')->isAllowed('catalog/attributes/attributes')
103
+ ) {
104
+ $headerBar = $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_attributes_create');
 
105
 
106
  $headerBar->getConfig()
107
  ->setTabId('group_' . $group->getId())
111
  ->setTypeId($form->getDataObject()->getTypeId())
112
  ->setProductId($form->getDataObject()->getId());
113
 
114
+ $fieldset->setHeaderBar($headerBar->toHtml());
 
 
115
  }
116
 
117
  if ($form->getElement('meta_description')) {
119
  }
120
 
121
  $values = Mage::registry('product')->getData();
122
+
123
+ // Set default attribute values for new product
 
124
  if (!Mage::registry('product')->getId()) {
125
  foreach ($attributes as $attribute) {
126
  if (!isset($values[$attribute->getAttributeCode()])) {
131
 
132
  if (Mage::registry('product')->hasLockedAttributes()) {
133
  foreach (Mage::registry('product')->getLockedAttributes() as $attribute) {
134
+ $element = $form->getElement($attribute);
135
+ if ($element) {
136
  $element->setReadonly(true, true);
137
  }
138
  }
140
  $form->addValues($values);
141
  $form->setFieldNameSuffix('product');
142
 
143
+ Mage::dispatchEvent('adminhtml_catalog_product_edit_prepare_form', array('form' => $form));
144
 
145
  $this->setForm($form);
146
  }
147
  }
148
 
149
+ /**
150
+ * Retrieve additional element types
151
+ *
152
+ * @return array
153
+ */
154
  protected function _getAdditionalElementTypes()
155
  {
156
  $result = array(
157
  'price' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_price'),
158
+ 'weight' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_weight'),
159
  'gallery' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_gallery'),
160
  'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_image'),
161
  'boolean' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_boolean'),
164
 
165
  $response = new Varien_Object();
166
  $response->setTypes(array());
167
+ Mage::dispatchEvent('adminhtml_catalog_product_edit_element_types', array('response' => $response));
168
 
169
+ foreach ($response->getTypes() as $typeName => $typeClass) {
170
  $result[$typeName] = $typeClass;
171
  }
172
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,13 +29,16 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories extends Mage_Adminhtml_Block_Catalog_Category_Tree
35
  {
36
  protected $_categoryIds;
37
  protected $_selectedNodes = null;
38
 
 
 
 
39
  public function __construct()
40
  {
41
  parent::__construct();
@@ -62,19 +65,33 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories extends Mage_Admi
62
  return $this->getProduct()->getCategoriesReadonly();
63
  }
64
 
 
 
 
 
 
65
  protected function getCategoryIds()
66
  {
67
  return $this->getProduct()->getCategoryIds();
68
  }
69
 
 
 
 
 
 
70
  public function getIdsString()
71
  {
72
  return implode(',', $this->getCategoryIds());
73
  }
74
 
 
 
 
 
 
75
  public function getRootNode()
76
  {
77
- // $root = parent::getRoot();
78
  $root = $this->getRoot();
79
  if ($root && in_array($root->getId(), $this->getCategoryIds())) {
80
  $root->setChecked(true);
@@ -82,7 +99,14 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories extends Mage_Admi
82
  return $root;
83
  }
84
 
85
- public function getRoot($parentNodeCategory=null, $recursionLevel=3)
 
 
 
 
 
 
 
86
  {
87
  if (!is_null($parentNodeCategory) && $parentNodeCategory->getId()) {
88
  return $this->getNode($parentNodeCategory, $recursionLevel);
@@ -127,21 +151,21 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories extends Mage_Admi
127
  return $root;
128
  }
129
 
130
- protected function _getNodeJson($node, $level=1)
 
 
 
 
 
 
 
131
  {
132
  $item = parent::_getNodeJson($node, $level);
133
 
134
- $isParent = $this->_isParentSelectedCategory($node);
135
-
136
- if ($isParent) {
137
  $item['expanded'] = true;
138
  }
139
 
140
- // if ($node->getLevel() > 1 && !$isParent && isset($item['children'])) {
141
- // $item['children'] = array();
142
- // }
143
-
144
-
145
  if (in_array($node->getId(), $this->getCategoryIds())) {
146
  $item['checked'] = true;
147
  }
@@ -149,23 +173,41 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories extends Mage_Admi
149
  if ($this->isReadonly()) {
150
  $item['disabled'] = true;
151
  }
 
152
  return $item;
153
  }
154
 
 
 
 
 
 
 
155
  protected function _isParentSelectedCategory($node)
156
  {
157
- foreach ($this->_getSelectedNodes() as $selected) {
158
- if ($selected) {
159
- $pathIds = explode('/', $selected->getPathId());
160
- if (in_array($node->getId(), $pathIds)) {
161
- return true;
 
 
 
 
 
 
162
  }
163
  }
164
  }
165
 
166
- return false;
167
  }
168
 
 
 
 
 
 
169
  protected function _getSelectedNodes()
170
  {
171
  if ($this->_selectedNodes === null) {
@@ -181,6 +223,12 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories extends Mage_Admi
181
  return $this->_selectedNodes;
182
  }
183
 
 
 
 
 
 
 
184
  public function getCategoryChildrenJson($categoryId)
185
  {
186
  $category = Mage::getModel('catalog/category')->load($categoryId);
@@ -198,15 +246,21 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories extends Mage_Admi
198
  return Mage::helper('core')->jsonEncode($children);
199
  }
200
 
201
- public function getLoadTreeUrl($expanded=null)
 
 
 
 
 
 
202
  {
203
- return $this->getUrl('*/*/categoriesJson', array('_current'=>true));
204
  }
205
 
206
  /**
207
  * Return distinct path ids of selected categories
208
  *
209
- * @param int $rootId Root category Id for context
210
  * @return array
211
  */
212
  public function getSelectedCategoriesPathIds($rootId = false)
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories extends Mage_Adminhtml_Block_Catalog_Category_Tree
35
  {
36
  protected $_categoryIds;
37
  protected $_selectedNodes = null;
38
 
39
+ /**
40
+ * Specify template to use
41
+ */
42
  public function __construct()
43
  {
44
  parent::__construct();
65
  return $this->getProduct()->getCategoriesReadonly();
66
  }
67
 
68
+ /**
69
+ * Return array with category IDs which the product is assigned to
70
+ *
71
+ * @return array
72
+ */
73
  protected function getCategoryIds()
74
  {
75
  return $this->getProduct()->getCategoryIds();
76
  }
77
 
78
+ /**
79
+ * Forms string out of getCategoryIds()
80
+ *
81
+ * @return string
82
+ */
83
  public function getIdsString()
84
  {
85
  return implode(',', $this->getCategoryIds());
86
  }
87
 
88
+ /**
89
+ * Returns root node and sets 'checked' flag (if necessary)
90
+ *
91
+ * @return Varien_Data_Tree_Node
92
+ */
93
  public function getRootNode()
94
  {
 
95
  $root = $this->getRoot();
96
  if ($root && in_array($root->getId(), $this->getCategoryIds())) {
97
  $root->setChecked(true);
99
  return $root;
100
  }
101
 
102
+ /**
103
+ * Returns root node
104
+ *
105
+ * @param Mage_Catalog_Model_Category|null $parentNodeCategory
106
+ * @param int $recursionLevel
107
+ * @return Varien_Data_Tree_Node
108
+ */
109
+ public function getRoot($parentNodeCategory = null, $recursionLevel = 3)
110
  {
111
  if (!is_null($parentNodeCategory) && $parentNodeCategory->getId()) {
112
  return $this->getNode($parentNodeCategory, $recursionLevel);
151
  return $root;
152
  }
153
 
154
+ /**
155
+ * Returns array with configuration of current node
156
+ *
157
+ * @param Varien_Data_Tree_Node $node
158
+ * @param int $level How deep is the node in the tree
159
+ * @return array
160
+ */
161
+ protected function _getNodeJson($node, $level = 1)
162
  {
163
  $item = parent::_getNodeJson($node, $level);
164
 
165
+ if ($this->_isParentSelectedCategory($node)) {
 
 
166
  $item['expanded'] = true;
167
  }
168
 
 
 
 
 
 
169
  if (in_array($node->getId(), $this->getCategoryIds())) {
170
  $item['checked'] = true;
171
  }
173
  if ($this->isReadonly()) {
174
  $item['disabled'] = true;
175
  }
176
+
177
  return $item;
178
  }
179
 
180
+ /**
181
+ * Returns whether $node is a parent (not exactly direct) of a selected node
182
+ *
183
+ * @param Varien_Data_Tree_Node $node
184
+ * @return bool
185
+ */
186
  protected function _isParentSelectedCategory($node)
187
  {
188
+ $result = false;
189
+ // Contains string with all category IDs of children (not exactly direct) of the node
190
+ $allChildren = $node->getAllChildren();
191
+ if ($allChildren) {
192
+ $selectedCategoryIds = $this->getCategoryIds();
193
+ $allChildrenArr = explode(',', $allChildren);
194
+ for ($i = 0, $cnt = count($selectedCategoryIds); $i < $cnt; $i++) {
195
+ $isSelf = $node->getId() == $selectedCategoryIds[$i];
196
+ if (!$isSelf && in_array($selectedCategoryIds[$i], $allChildrenArr)) {
197
+ $result = true;
198
+ break;
199
  }
200
  }
201
  }
202
 
203
+ return $result;
204
  }
205
 
206
+ /**
207
+ * Returns array with nodes those are selected (contain current product)
208
+ *
209
+ * @return array
210
+ */
211
  protected function _getSelectedNodes()
212
  {
213
  if ($this->_selectedNodes === null) {
223
  return $this->_selectedNodes;
224
  }
225
 
226
+ /**
227
+ * Returns JSON-encoded array of category children
228
+ *
229
+ * @param int $categoryId
230
+ * @return string
231
+ */
232
  public function getCategoryChildrenJson($categoryId)
233
  {
234
  $category = Mage::getModel('catalog/category')->load($categoryId);
246
  return Mage::helper('core')->jsonEncode($children);
247
  }
248
 
249
+ /**
250
+ * Returns URL for loading tree
251
+ *
252
+ * @param null $expanded
253
+ * @return string
254
+ */
255
+ public function getLoadTreeUrl($expanded = null)
256
  {
257
+ return $this->getUrl('*/*/categoriesJson', array('_current' => true));
258
  }
259
 
260
  /**
261
  * Return distinct path ids of selected categories
262
  *
263
+ * @param mixed $rootId Root category Id for context
264
  * @return array
265
  */
266
  public function getSelectedCategoriesPathIds($rootId = false)
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -142,4 +142,14 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Inventory extends Mage_Admin
142
  {
143
  return $this->getProduct()->getTypeInstance()->canUseQtyDecimals();
144
  }
 
 
 
 
 
 
 
 
 
 
145
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
142
  {
143
  return $this->getProduct()->getTypeInstance()->canUseQtyDecimals();
144
  }
145
+
146
+ /**
147
+ * Check if product type is virtual
148
+ *
149
+ * @return boolean
150
+ */
151
+ public function isVirtual()
152
+ {
153
+ return $this->getProduct()->getTypeInstance()->isVirtual();
154
+ }
155
  }
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml group price item renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group
35
+ extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract
36
+ {
37
+ /**
38
+ * Initialize block
39
+ */
40
+ public function __construct()
41
+ {
42
+ $this->setTemplate('catalog/product/edit/price/group.phtml');
43
+ }
44
+
45
+ /**
46
+ * Sort values
47
+ *
48
+ * @param array $data
49
+ * @return array
50
+ */
51
+ protected function _sortValues($data)
52
+ {
53
+ usort($data, array($this, '_sortGroupPrices'));
54
+ return $data;
55
+ }
56
+
57
+ /**
58
+ * Sort group price values callback method
59
+ *
60
+ * @param array $a
61
+ * @param array $b
62
+ * @return int
63
+ */
64
+ protected function _sortGroupPrices($a, $b)
65
+ {
66
+ if ($a['website_id'] != $b['website_id']) {
67
+ return $a['website_id'] < $b['website_id'] ? -1 : 1;
68
+ }
69
+ if ($a['cust_group'] != $b['cust_group']) {
70
+ return $this->getCustomerGroups($a['cust_group']) < $this->getCustomerGroups($b['cust_group']) ? -1 : 1;
71
+ }
72
+ return 0;
73
+ }
74
+
75
+ /**
76
+ * Prepare global layout
77
+ *
78
+ * Add "Add Group Price" button to layout
79
+ *
80
+ * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group
81
+ */
82
+ protected function _prepareLayout()
83
+ {
84
+ $button = $this->getLayout()->createBlock('adminhtml/widget_button')
85
+ ->setData(array(
86
+ 'label' => Mage::helper('catalog')->__('Add Group Price'),
87
+ 'onclick' => 'return groupPriceControl.addItem()',
88
+ 'class' => 'add'
89
+ ));
90
+ $button->setName('add_group_price_item_button');
91
+
92
+ $this->setChild('add_button', $button);
93
+ return parent::_prepareLayout();
94
+ }
95
+
96
+ }
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml group price item abstract renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ abstract class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract
35
+ extends Mage_Adminhtml_Block_Widget
36
+ implements Varien_Data_Form_Element_Renderer_Interface
37
+ {
38
+ /**
39
+ * Form element instance
40
+ *
41
+ * @var Varien_Data_Form_Element_Abstract
42
+ */
43
+ protected $_element;
44
+
45
+ /**
46
+ * Customer groups cache
47
+ *
48
+ * @var array
49
+ */
50
+ protected $_customerGroups;
51
+
52
+ /**
53
+ * Websites cache
54
+ *
55
+ * @var array
56
+ */
57
+ protected $_websites;
58
+
59
+ /**
60
+ * Retrieve current product instance
61
+ *
62
+ * @return Mage_Catalog_Model_Product
63
+ */
64
+ public function getProduct()
65
+ {
66
+ return Mage::registry('product');
67
+ }
68
+
69
+ /**
70
+ * Render HTML
71
+ *
72
+ * @param Varien_Data_Form_Element_Abstract $element
73
+ * @return string
74
+ */
75
+ public function render(Varien_Data_Form_Element_Abstract $element)
76
+ {
77
+ $this->setElement($element);
78
+ return $this->toHtml();
79
+ }
80
+
81
+ /**
82
+ * Set form element instance
83
+ *
84
+ * @param Varien_Data_Form_Element_Abstract $element
85
+ * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract
86
+ */
87
+ public function setElement(Varien_Data_Form_Element_Abstract $element)
88
+ {
89
+ $this->_element = $element;
90
+ return $this;
91
+ }
92
+
93
+ /**
94
+ * Retrieve form element instance
95
+ *
96
+ * @return Varien_Data_Form_Element_Abstract
97
+ */
98
+ public function getElement()
99
+ {
100
+ return $this->_element;
101
+ }
102
+
103
+ /**
104
+ * Prepare group price values
105
+ *
106
+ * @return array
107
+ */
108
+ public function getValues()
109
+ {
110
+ $values = array();
111
+ $data = $this->getElement()->getValue();
112
+
113
+ if (is_array($data)) {
114
+ $values = $this->_sortValues($data);
115
+ }
116
+
117
+ foreach ($values as &$value) {
118
+ $value['readonly'] = ($value['website_id'] == 0)
119
+ && $this->isShowWebsiteColumn()
120
+ && !$this->isAllowChangeWebsite();
121
+ }
122
+
123
+ return $values;
124
+ }
125
+
126
+ /**
127
+ * Sort values
128
+ *
129
+ * @param array $data
130
+ * @return array
131
+ */
132
+ protected function _sortValues($data)
133
+ {
134
+ return $data;
135
+ }
136
+
137
+ /**
138
+ * Retrieve allowed customer groups
139
+ *
140
+ * @param int|null $groupId return name by customer group id
141
+ * @return array|string
142
+ */
143
+ public function getCustomerGroups($groupId = null)
144
+ {
145
+ if ($this->_customerGroups === null) {
146
+ if (!Mage::helper('catalog')->isModuleEnabled('Mage_Customer')) {
147
+ return array();
148
+ }
149
+ $collection = Mage::getModel('customer/group')->getCollection();
150
+ $this->_customerGroups = $this->_getInitialCustomerGroups();
151
+
152
+ foreach ($collection as $item) {
153
+ /** @var $item Mage_Customer_Model_Group */
154
+ $this->_customerGroups[$item->getId()] = $item->getCustomerGroupCode();
155
+ }
156
+ }
157
+
158
+ if ($groupId !== null) {
159
+ return isset($this->_customerGroups[$groupId]) ? $this->_customerGroups[$groupId] : array();
160
+ }
161
+
162
+ return $this->_customerGroups;
163
+ }
164
+
165
+ /**
166
+ * Retrieve list of initial customer groups
167
+ *
168
+ * @return array
169
+ */
170
+ protected function _getInitialCustomerGroups()
171
+ {
172
+ return array();
173
+ }
174
+
175
+ /**
176
+ * Retrieve number of websites
177
+ *
178
+ * @return int
179
+ */
180
+ public function getWebsiteCount()
181
+ {
182
+ return count($this->getWebsites());
183
+ }
184
+
185
+ /**
186
+ * Show website column and switcher for group price table
187
+ *
188
+ * @return bool
189
+ */
190
+ public function isMultiWebsites()
191
+ {
192
+ return !Mage::app()->isSingleStoreMode();
193
+ }
194
+
195
+ /**
196
+ * Retrieve allowed for edit websites
197
+ *
198
+ * @return array
199
+ */
200
+ public function getWebsites()
201
+ {
202
+ if (!is_null($this->_websites)) {
203
+ return $this->_websites;
204
+ }
205
+
206
+ $this->_websites = array(
207
+ 0 => array(
208
+ 'name' => Mage::helper('catalog')->__('All Websites'),
209
+ 'currency' => Mage::app()->getBaseCurrencyCode()
210
+ )
211
+ );
212
+
213
+ if (!$this->isScopeGlobal() && $this->getProduct()->getStoreId()) {
214
+ /** @var $website Mage_Core_Model_Website */
215
+ $website = Mage::app()->getStore($this->getProduct()->getStoreId())->getWebsite();
216
+
217
+ $this->_websites[$website->getId()] = array(
218
+ 'name' => $website->getName(),
219
+ 'currency' => $website->getBaseCurrencyCode()
220
+ );
221
+ } elseif (!$this->isScopeGlobal()) {
222
+ $websites = Mage::app()->getWebsites(false);
223
+ $productWebsiteIds = $this->getProduct()->getWebsiteIds();
224
+ foreach ($websites as $website) {
225
+ /** @var $website Mage_Core_Model_Website */
226
+ if (!in_array($website->getId(), $productWebsiteIds)) {
227
+ continue;
228
+ }
229
+ $this->_websites[$website->getId()] = array(
230
+ 'name' => $website->getName(),
231
+ 'currency' => $website->getBaseCurrencyCode()
232
+ );
233
+ }
234
+ }
235
+
236
+ return $this->_websites;
237
+ }
238
+
239
+ /**
240
+ * Retrieve default value for customer group
241
+ *
242
+ * @return int
243
+ */
244
+ public function getDefaultCustomerGroup()
245
+ {
246
+ return Mage_Customer_Model_Group::CUST_GROUP_ALL;
247
+ }
248
+
249
+ /**
250
+ * Retrieve default value for website
251
+ *
252
+ * @return int
253
+ */
254
+ public function getDefaultWebsite()
255
+ {
256
+ if ($this->isShowWebsiteColumn() && !$this->isAllowChangeWebsite()) {
257
+ return Mage::app()->getStore($this->getProduct()->getStoreId())->getWebsiteId();
258
+ }
259
+ return 0;
260
+ }
261
+
262
+ /**
263
+ * Retrieve 'add group price item' button HTML
264
+ *
265
+ * @return string
266
+ */
267
+ public function getAddButtonHtml()
268
+ {
269
+ return $this->getChildHtml('add_button');
270
+ }
271
+
272
+ /**
273
+ * Retrieve customized price column header
274
+ *
275
+ * @param string $default
276
+ * @return string
277
+ */
278
+ public function getPriceColumnHeader($default)
279
+ {
280
+ if ($this->hasData('price_column_header')) {
281
+ return $this->getData('price_column_header');
282
+ } else {
283
+ return $default;
284
+ }
285
+ }
286
+
287
+ /**
288
+ * Retrieve customized price column header
289
+ *
290
+ * @param string $default
291
+ * @return string
292
+ */
293
+ public function getPriceValidation($default)
294
+ {
295
+ if ($this->hasData('price_validation')) {
296
+ return $this->getData('price_validation');
297
+ } else {
298
+ return $default;
299
+ }
300
+ }
301
+
302
+ /**
303
+ * Retrieve Group Price entity attribute
304
+ *
305
+ * @return Mage_Catalog_Model_Resource_Eav_Attribute
306
+ */
307
+ public function getAttribute()
308
+ {
309
+ return $this->getElement()->getEntityAttribute();
310
+ }
311
+
312
+ /**
313
+ * Check group price attribute scope is global
314
+ *
315
+ * @return bool
316
+ */
317
+ public function isScopeGlobal()
318
+ {
319
+ return $this->getAttribute()->isScopeGlobal();
320
+ }
321
+
322
+ /**
323
+ * Show group prices grid website column
324
+ *
325
+ * @return bool
326
+ */
327
+ public function isShowWebsiteColumn()
328
+ {
329
+ if ($this->isScopeGlobal() || Mage::app()->isSingleStoreMode()) {
330
+ return false;
331
+ }
332
+ return true;
333
+ }
334
+
335
+ /**
336
+ * Check is allow change website value for combination
337
+ *
338
+ * @return bool
339
+ */
340
+ public function isAllowChangeWebsite()
341
+ {
342
+ if (!$this->isShowWebsiteColumn() || $this->getProduct()->getStoreId()) {
343
+ return false;
344
+ }
345
+ return true;
346
+ }
347
+ }
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -32,33 +32,11 @@
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
35
- extends Mage_Adminhtml_Block_Widget
36
- implements Varien_Data_Form_Element_Renderer_Interface
37
  {
38
- /**
39
- * Form element instance
40
- *
41
- * @var Varien_Data_Form_Element
42
- */
43
- protected $_element;
44
 
45
  /**
46
- * Customer Groups cache
47
- *
48
- * @var array
49
- */
50
- protected $_customerGroups;
51
-
52
- /**
53
- * Websites cache
54
- *
55
- * @var array
56
- */
57
- protected $_websites;
58
-
59
- /**
60
- * Define tier price template file
61
- *
62
  */
63
  public function __construct()
64
  {
@@ -66,69 +44,25 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
66
  }
67
 
68
  /**
69
- * Retrieve current edit product instance
70
- *
71
- * @return Mage_Catalog_Model_Product
72
- */
73
- public function getProduct()
74
- {
75
- return Mage::registry('product');
76
- }
77
-
78
- /**
79
- * Render HTML
80
  *
81
- * @param Varien_Data_Form_Element_Abstract $element
82
- * @return string
83
- */
84
- public function render(Varien_Data_Form_Element_Abstract $element)
85
- {
86
- $this->setElement($element);
87
- return $this->toHtml();
88
- }
89
-
90
- /**
91
- * Set form element instance
92
- *
93
- * @param Varien_Data_Form_Element_Abstract $element
94
- * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
95
- */
96
- public function setElement(Varien_Data_Form_Element_Abstract $element)
97
- {
98
- $this->_element = $element;
99
- return $this;
100
- }
101
-
102
- /**
103
- * Retrieve form element instance
104
- *
105
- * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
106
  */
107
- public function getElement()
108
  {
109
- return $this->_element;
110
  }
111
 
112
  /**
113
- * Prepare Tier Price values
114
  *
 
115
  * @return array
116
  */
117
- public function getValues()
118
  {
119
- $values = array();
120
- $data = $this->getElement()->getValue();
121
-
122
- if (is_array($data)) {
123
- usort($data, array($this, '_sortTierPrices'));
124
- $values = $data;
125
- }
126
-
127
- foreach ($values as &$v) {
128
- $v['readonly'] = $v['website_id'] == 0 && $this->isShowWebsiteColumn() && !$this->isAllowChangeWebsite();
129
- }
130
-
131
- return $values;
132
  }
133
 
134
  /**
@@ -153,123 +87,6 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
153
  return 0;
154
  }
155
 
156
- /**
157
- * Retrieve allowed customer groups
158
- *
159
- * @param int $groupId return name by customer group id
160
- * @return array|string
161
- */
162
- public function getCustomerGroups($groupId = null)
163
- {
164
- if ($this->_customerGroups === null) {
165
- if (!Mage::helper('catalog')->isModuleEnabled('Mage_Customer')) {
166
- return array();
167
- }
168
- $collection = Mage::getModel('customer/group')->getCollection();
169
- $this->_customerGroups = array(
170
- Mage_Customer_Model_Group::CUST_GROUP_ALL => Mage::helper('catalog')->__('ALL GROUPS')
171
- );
172
-
173
- foreach ($collection as $item) {
174
- /* @var $item Mage_Customer_Model_Group */
175
- $this->_customerGroups[$item->getId()] = $item->getCustomerGroupCode();
176
- }
177
- }
178
-
179
- if ($groupId !== null) {
180
- return isset($this->_customerGroups[$groupId]) ? $this->_customerGroups[$groupId] : array();
181
- }
182
-
183
- return $this->_customerGroups;
184
- }
185
-
186
- /**
187
- * Retrieve count of websites
188
- *
189
- * @return int
190
- */
191
- public function getWebsiteCount()
192
- {
193
- return count($this->getWebsites());
194
- }
195
-
196
- /**
197
- * Show Website column and switcher for tier price table
198
- *
199
- * @return bool
200
- */
201
- public function isMultiWebsites()
202
- {
203
- return !Mage::app()->isSingleStoreMode();
204
- }
205
-
206
- /**
207
- * Retrieve allowed for edit websites
208
- *
209
- * @return array
210
- */
211
- public function getWebsites()
212
- {
213
- if (!is_null($this->_websites)) {
214
- return $this->_websites;
215
- }
216
-
217
- $this->_websites = array(
218
- 0 => array(
219
- 'name' => Mage::helper('catalog')->__('All Websites'),
220
- 'currency' => Mage::app()->getBaseCurrencyCode()
221
- )
222
- );
223
-
224
- if (!$this->isScopeGlobal() && $this->getProduct()->getStoreId()) {
225
- /* @var $website Mage_Core_Model_Website */
226
- $website = Mage::app()->getStore($this->getProduct()->getStoreId())->getWebsite();
227
-
228
- $this->_websites[$website->getId()] = array(
229
- 'name' => $website->getName(),
230
- 'currency' => $website->getBaseCurrencyCode()
231
- );
232
- } else if (!$this->isScopeGlobal()) {
233
- $websites = Mage::app()->getWebsites(false);
234
- $productWebsiteIds = $this->getProduct()->getWebsiteIds();
235
- foreach ($websites as $website) {
236
- /* @var $website Mage_Core_Model_Website */
237
- if (!in_array($website->getId(), $productWebsiteIds)) {
238
- continue;
239
- }
240
- $this->_websites[$website->getId()] = array(
241
- 'name' => $website->getName(),
242
- 'currency' => $website->getBaseCurrencyCode()
243
- );
244
- }
245
- }
246
-
247
- return $this->_websites;
248
- }
249
-
250
- /**
251
- * Retrieve default value for customer group
252
- *
253
- * @return int
254
- */
255
- public function getDefaultCustomerGroup()
256
- {
257
- return Mage_Customer_Model_Group::CUST_GROUP_ALL;
258
- }
259
-
260
- /**
261
- * Retrieve default value for website
262
- *
263
- * @return int
264
- */
265
- public function getDefaultWebsite()
266
- {
267
- if ($this->isShowWebsiteColumn() && !$this->isAllowChangeWebsite()) {
268
- return Mage::app()->getStore($this->getProduct()->getStoreId())->getWebsiteId();
269
- }
270
- return 0;
271
- }
272
-
273
  /**
274
  * Prepare global layout
275
  * Add "Add tier" button to layout
@@ -280,9 +97,9 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
280
  {
281
  $button = $this->getLayout()->createBlock('adminhtml/widget_button')
282
  ->setData(array(
283
- 'label' => Mage::helper('catalog')->__('Add Tier'),
284
- 'onclick' => 'return tierPriceControl.addItem()',
285
- 'class' => 'add'
286
  ));
287
  $button->setName('add_tier_price_item_button');
288
 
@@ -290,93 +107,4 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
290
  return parent::_prepareLayout();
291
  }
292
 
293
- /**
294
- * Retrieve Add Tier Price Item button HTML
295
- *
296
- * @return string
297
- */
298
- public function getAddButtonHtml()
299
- {
300
- return $this->getChildHtml('add_button');
301
- }
302
-
303
- /**
304
- * Returns customized price column header
305
- * that was seted through set...
306
- *
307
- * @param string $default
308
- * @return string
309
- */
310
- public function getPriceColumnHeader($default)
311
- {
312
- if ($this->hasData('price_column_header')) {
313
- return $this->getData('price_column_header');
314
- } else {
315
- return $default;
316
- }
317
- }
318
-
319
- /**
320
- * Returns customized price column header
321
- * that was seted through set...
322
- *
323
- * @param string $default
324
- * @return string
325
- */
326
- public function getPriceValidation($default)
327
- {
328
- if ($this->hasData('price_validation')) {
329
- return $this->getData('price_validation');
330
- } else {
331
- return $default;
332
- }
333
- }
334
-
335
- /**
336
- * Retrieve Tier Price entity attribute
337
- *
338
- * @return Mage_Catalog_Model_Resource_Eav_Attribute
339
- */
340
- public function getAttribute()
341
- {
342
- return $this->getElement()->getEntityAttribute();
343
- }
344
-
345
- /**
346
- * Check tier price attribute scope is global
347
- *
348
- * @return bool
349
- */
350
- public function isScopeGlobal()
351
- {
352
- return $this->getAttribute()->isScopeGlobal();
353
- }
354
-
355
- /**
356
- * Show tier prices grid website column
357
- *
358
- * @return bool
359
- */
360
- public function isShowWebsiteColumn()
361
- {
362
- if ($this->isScopeGlobal()) {
363
- return false;
364
- } else if (Mage::app()->isSingleStoreMode()) {
365
- return false;
366
- }
367
- return true;
368
- }
369
-
370
- /**
371
- * Check is allow change website value for combination
372
- *
373
- * @return bool
374
- */
375
- public function isAllowChangeWebsite()
376
- {
377
- if (!$this->isShowWebsiteColumn() || $this->getProduct()->getStoreId()) {
378
- return false;
379
- }
380
- return true;
381
- }
382
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier
35
+ extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract
 
36
  {
 
 
 
 
 
 
37
 
38
  /**
39
+ * Initialize block
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  */
41
  public function __construct()
42
  {
44
  }
45
 
46
  /**
47
+ * Retrieve list of initial customer groups
 
 
 
 
 
 
 
 
 
 
48
  *
49
+ * @return array
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  */
51
+ protected function _getInitialCustomerGroups()
52
  {
53
+ return array(Mage_Customer_Model_Group::CUST_GROUP_ALL => Mage::helper('catalog')->__('ALL GROUPS'));
54
  }
55
 
56
  /**
57
+ * Sort values
58
  *
59
+ * @param array $data
60
  * @return array
61
  */
62
+ protected function _sortValues($data)
63
  {
64
+ usort($data, array($this, '_sortTierPrices'));
65
+ return $data;
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
  /**
87
  return 0;
88
  }
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  /**
91
  * Prepare global layout
92
  * Add "Add tier" button to layout
97
  {
98
  $button = $this->getLayout()->createBlock('adminhtml/widget_button')
99
  ->setData(array(
100
+ 'label' => Mage::helper('catalog')->__('Add Tier'),
101
+ 'onclick' => 'return tierPriceControl.addItem()',
102
+ 'class' => 'add'
103
  ));
104
  $button->setName('add_tier_price_item_button');
105
 
107
  return parent::_prepareLayout();
108
  }
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -66,7 +66,28 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config extends Mage_Ad
66
  */
67
  public function isReadonly()
68
  {
69
- return $this->_getProduct()->getCompositeReadonly();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
 
72
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
66
  */
67
  public function isReadonly()
68
  {
69
+ return (bool) $this->_getProduct()->getCompositeReadonly();
70
+ }
71
+
72
+ /**
73
+ * Check whether attributes of configurable products can be editable
74
+ *
75
+ * @return boolean
76
+ */
77
+ public function isAttributesConfigurationReadonly()
78
+ {
79
+ return (bool) $this->_getProduct()->getAttributesConfigurationReadonly();
80
+ }
81
+
82
+ /**
83
+ * Check whether prices of configurable products can be editable
84
+ *
85
+ * @return boolean
86
+ */
87
+ public function isAttributesPricesReadonly()
88
+ {
89
+ return $this->_getProduct()->getAttributesConfigurationReadonly() ||
90
+ (Mage::helper('catalog')->isPriceGlobal() && $this->isReadonly());
91
  }
92
 
93
  /**
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,8 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes
 
35
  {
36
  /**
37
  * Link to currently editing product
@@ -56,7 +57,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple extends
56
  'additional' => array('name', 'sku', 'visibility', 'status')
57
  );
58
 
59
- $availableTypes = array('text', 'select', 'multiselect', 'textarea', 'price');
60
 
61
  $attributes = Mage::getModel('catalog/product')
62
  ->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE)
@@ -70,10 +71,12 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple extends
70
  // If not applied to configurable
71
  && !in_array(Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE, $attribute->getApplyTo())
72
  // If not used in configurable
73
- && !in_array($attribute->getId(),$this->_getProduct()->getTypeInstance(true)->getUsedProductAttributeIds($this->_getProduct())))
 
 
74
  // Or in additional
75
- || in_array($attribute->getAttributeCode(), $attributesConfig['additional'])) {
76
-
77
  $inputType = $attribute->getFrontend()->getInputType();
78
  if (!in_array($inputType, $availableTypes)) {
79
  continue;
@@ -112,7 +115,8 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple extends
112
  }
113
 
114
  /* Configurable attributes */
115
- foreach ($this->_getProduct()->getTypeInstance(true)->getUsedProductAttributes($this->_getProduct()) as $attribute) {
 
116
  $attributeCode = $attribute->getAttributeCode();
117
  $fieldset->addField( 'simple_product_' . $attributeCode, 'select', array(
118
  'label' => $attribute->getFrontend()->getLabel(),
@@ -176,8 +180,6 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple extends
176
  )
177
  ));
178
 
179
-
180
-
181
  $this->setForm($form);
182
  }
183
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple
35
+ extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes
36
  {
37
  /**
38
  * Link to currently editing product
57
  'additional' => array('name', 'sku', 'visibility', 'status')
58
  );
59
 
60
+ $availableTypes = array('text', 'select', 'multiselect', 'textarea', 'price', 'weight');
61
 
62
  $attributes = Mage::getModel('catalog/product')
63
  ->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE)
71
  // If not applied to configurable
72
  && !in_array(Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE, $attribute->getApplyTo())
73
  // If not used in configurable
74
+ && !in_array($attribute->getId(),
75
+ $this->_getProduct()->getTypeInstance(true)->getUsedProductAttributeIds($this->_getProduct()))
76
+ )
77
  // Or in additional
78
+ || in_array($attribute->getAttributeCode(), $attributesConfig['additional'])
79
+ ) {
80
  $inputType = $attribute->getFrontend()->getInputType();
81
  if (!in_array($inputType, $availableTypes)) {
82
  continue;
115
  }
116
 
117
  /* Configurable attributes */
118
+ $usedAttributes = $this->_getProduct()->getTypeInstance(true)->getUsedProductAttributes($this->_getProduct());
119
+ foreach ($usedAttributes as $attribute) {
120
  $attributeCode = $attribute->getAttributeCode();
121
  $fieldset->addField( 'simple_product_' . $attributeCode, 'select', array(
122
  'label' => $attribute->getFrontend()->getLabel(),
180
  )
181
  ));
182
 
 
 
183
  $this->setForm($form);
184
  }
185
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,12 +29,15 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Websites extends Mage_Adminhtml_Block_Store_Switcher
35
  {
36
  protected $_storeFromHtml;
37
 
 
 
 
38
  public function __construct()
39
  {
40
  parent::__construct();
@@ -51,21 +54,42 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Websites extends Mage_Adminh
51
  return Mage::registry('product');
52
  }
53
 
 
 
 
 
 
54
  public function getStoreId()
55
  {
56
  return $this->getProduct()->getStoreId();
57
  }
58
 
 
 
 
 
 
59
  public function getProductId()
60
  {
61
  return $this->getProduct()->getId();
62
  }
63
 
 
 
 
 
 
64
  public function getWebsites()
65
  {
66
  return $this->getProduct()->getWebsiteIds();
67
  }
68
 
 
 
 
 
 
 
69
  public function hasWebsite($websiteId)
70
  {
71
  return in_array($websiteId, $this->getProduct()->getWebsiteIds());
@@ -81,11 +105,23 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Websites extends Mage_Adminh
81
  return $this->getProduct()->getWebsitesReadonly();
82
  }
83
 
 
 
 
 
 
 
84
  public function getStoreName($storeId)
85
  {
86
  return Mage::app()->getStore($storeId)->getName();
87
  }
88
 
 
 
 
 
 
 
89
  public function getChooseFromStoreHtml($storeTo)
90
  {
91
  if (!$this->_storeFromHtml) {
@@ -95,16 +131,19 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Websites extends Mage_Adminh
95
  if (!$this->hasWebsite($_website->getId())) {
96
  continue;
97
  }
98
- $this->_storeFromHtml .= '<optgroup label="' . $_website->getName() . '"></optgroup>';
 
99
  foreach ($this->getGroupCollection($_website) as $_group) {
100
- $this->_storeFromHtml .= '<optgroup label="&nbsp;&nbsp;&nbsp;&nbsp;' . $_group->getName() . '">';
 
101
  foreach ($this->getStoreCollection($_group) as $_store) {
102
- $this->_storeFromHtml .= '<option value="' . $_store->getId() . '">&nbsp;&nbsp;&nbsp;&nbsp;' . $_store->getName() . '</option>';
 
103
  }
104
  }
105
  $this->_storeFromHtml .= '</optgroup>';
106
  }
107
- $this->_storeFromHtml.= '</select>';
108
  }
109
  return str_replace('__store_identifier__', $storeTo->getId(), $this->_storeFromHtml);
110
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Websites extends Mage_Adminhtml_Block_Store_Switcher
35
  {
36
  protected $_storeFromHtml;
37
 
38
+ /**
39
+ * Constructor
40
+ */
41
  public function __construct()
42
  {
43
  parent::__construct();
54
  return Mage::registry('product');
55
  }
56
 
57
+ /**
58
+ * Get store ID of current product
59
+ *
60
+ * @return int
61
+ */
62
  public function getStoreId()
63
  {
64
  return $this->getProduct()->getStoreId();
65
  }
66
 
67
+ /**
68
+ * Get ID of current product
69
+ *
70
+ * @return int
71
+ */
72
  public function getProductId()
73
  {
74
  return $this->getProduct()->getId();
75
  }
76
 
77
+ /**
78
+ * Retrieve array of website IDs of current product
79
+ *
80
+ * @return array
81
+ */
82
  public function getWebsites()
83
  {
84
  return $this->getProduct()->getWebsiteIds();
85
  }
86
 
87
+ /**
88
+ * Returns whether product associated with website with $websiteId
89
+ *
90
+ * @param int $websiteId
91
+ * @return bool
92
+ */
93
  public function hasWebsite($websiteId)
94
  {
95
  return in_array($websiteId, $this->getProduct()->getWebsiteIds());
105
  return $this->getProduct()->getWebsitesReadonly();
106
  }
107
 
108
+ /**
109
+ * Retrieve store name by its ID
110
+ *
111
+ * @param int $storeId
112
+ * @return null|string
113
+ */
114
  public function getStoreName($storeId)
115
  {
116
  return Mage::app()->getStore($storeId)->getName();
117
  }
118
 
119
+ /**
120
+ * Get HTML of store chooser
121
+ *
122
+ * @param Mage_Core_Model_Store $storeTo
123
+ * @return string
124
+ */
125
  public function getChooseFromStoreHtml($storeTo)
126
  {
127
  if (!$this->_storeFromHtml) {
131
  if (!$this->hasWebsite($_website->getId())) {
132
  continue;
133
  }
134
+ $optGroupLabel = $this->escapeHtml($_website->getName());
135
+ $this->_storeFromHtml .= '<optgroup label="' . $optGroupLabel . '"></optgroup>';
136
  foreach ($this->getGroupCollection($_website) as $_group) {
137
+ $optGroupName = $this->escapeHtml($_group->getName());
138
+ $this->_storeFromHtml .= '<optgroup label="&nbsp;&nbsp;&nbsp;&nbsp;' . $optGroupName . '">';
139
  foreach ($this->getStoreCollection($_group) as $_store) {
140
+ $this->_storeFromHtml .= '<option value="' . $_store->getId() . '">&nbsp;&nbsp;&nbsp;&nbsp;';
141
+ $this->_storeFromHtml .= $this->escapeHtml($_store->getName()) . '</option>';
142
  }
143
  }
144
  $this->_storeFromHtml .= '</optgroup>';
145
  }
146
+ $this->_storeFromHtml .= '</select>';
147
  }
148
  return str_replace('__store_identifier__', $storeTo->getId(), $this->_storeFromHtml);
149
  }
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -73,11 +73,46 @@ class Mage_Adminhtml_Block_Catalog_Product_Grid extends Mage_Adminhtml_Block_Wid
73
  //$collection->setStoreId($store->getId());
74
  $adminStore = Mage_Core_Model_App::ADMIN_STORE_ID;
75
  $collection->addStoreFilter($store);
76
- $collection->joinAttribute('name', 'catalog_product/name', 'entity_id', null, 'inner', $adminStore);
77
- $collection->joinAttribute('custom_name', 'catalog_product/name', 'entity_id', null, 'inner', $store->getId());
78
- $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner', $store->getId());
79
- $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner', $store->getId());
80
- $collection->joinAttribute('price', 'catalog_product/price', 'entity_id', null, 'left', $store->getId());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
82
  else {
83
  $collection->addAttributeToSelect('price');
@@ -273,6 +308,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Grid extends Mage_Adminhtml_Block_Wid
273
  ));
274
  }
275
 
 
276
  return $this;
277
  }
278
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
73
  //$collection->setStoreId($store->getId());
74
  $adminStore = Mage_Core_Model_App::ADMIN_STORE_ID;
75
  $collection->addStoreFilter($store);
76
+ $collection->joinAttribute(
77
+ 'name',
78
+ 'catalog_product/name',
79
+ 'entity_id',
80
+ null,
81
+ 'inner',
82
+ $adminStore
83
+ );
84
+ $collection->joinAttribute(
85
+ 'custom_name',
86
+ 'catalog_product/name',
87
+ 'entity_id',
88
+ null,
89
+ 'inner',
90
+ $store->getId()
91
+ );
92
+ $collection->joinAttribute(
93
+ 'status',
94
+ 'catalog_product/status',
95
+ 'entity_id',
96
+ null,
97
+ 'inner',
98
+ $store->getId()
99
+ );
100
+ $collection->joinAttribute(
101
+ 'visibility',
102
+ 'catalog_product/visibility',
103
+ 'entity_id',
104
+ null,
105
+ 'inner',
106
+ $store->getId()
107
+ );
108
+ $collection->joinAttribute(
109
+ 'price',
110
+ 'catalog_product/price',
111
+ 'entity_id',
112
+ null,
113
+ 'left',
114
+ $store->getId()
115
+ );
116
  }
117
  else {
118
  $collection->addAttributeToSelect('price');
308
  ));
309
  }
310
 
311
+ Mage::dispatchEvent('adminhtml_catalog_product_grid_prepare_massaction', array('block' => $this));
312
  return $this;
313
  }
314
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -92,7 +92,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery extends Varien_Da
92
 
93
  if (!$this->getDataObject()->getExistsStoreValueFlag($attributeCode)) {
94
  return true;
95
- } else if ($this->getValue() == $defaultValue &&
96
  $this->getDataObject()->getStoreId() != $this->_getDefaultStoreId()) {
97
  return false;
98
  }
@@ -118,13 +118,11 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery extends Varien_Da
118
  }
119
 
120
  if ($attribute->isScopeGlobal()) {
121
- $html.= '<br/>[GLOBAL]';
122
- }
123
- elseif ($attribute->isScopeWebsite()) {
124
- $html.= '<br/>[WEBSITE]';
125
- }
126
- elseif ($attribute->isScopeStore()) {
127
- $html.= '<br/>[STORE VIEW]';
128
  }
129
  return $html;
130
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
92
 
93
  if (!$this->getDataObject()->getExistsStoreValueFlag($attributeCode)) {
94
  return true;
95
+ } else if ($this->getValue() == $defaultValue &&
96
  $this->getDataObject()->getStoreId() != $this->_getDefaultStoreId()) {
97
  return false;
98
  }
118
  }
119
 
120
  if ($attribute->isScopeGlobal()) {
121
+ $html .= '<br/>' . Mage::helper('adminhtml')->__('[GLOBAL]');
122
+ } elseif ($attribute->isScopeWebsite()) {
123
+ $html .= '<br/>' . Mage::helper('adminhtml')->__('[WEBSITE]');
124
+ } elseif ($attribute->isScopeStore()) {
125
+ $html .= '<br/>' . Mage::helper('adminhtml')->__('[STORE VIEW]');
 
 
126
  }
127
  return $html;
128
  }
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -57,6 +57,8 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content extends M
57
  )
58
  ));
59
 
 
 
60
  return parent::_prepareLayout();
61
  }
62
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
57
  )
58
  ));
59
 
60
+ Mage::dispatchEvent('catalog_product_gallery_prepare_layout', array('block' => $this));
61
+
62
  return parent::_prepareLayout();
63
  }
64
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product form weight field helper
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight extends Varien_Data_Form_Element_Text
35
+ {
36
+ /**
37
+ * Validation classes for weight field which corresponds to DECIMAL(12,4) SQL type
38
+ *
39
+ * @param array $attributes
40
+ */
41
+ public function __construct(array $attributes = array())
42
+ {
43
+ parent::__construct($attributes);
44
+ $this->addClass('validate-number validate-zero-or-greater validate-number-range number-range-0-99999999.9999');
45
+ }
46
+ }
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -100,8 +100,8 @@ class Mage_Adminhtml_Block_Catalog_Product_Widget_Chooser extends Mage_Adminhtml
100
  public function getCheckboxCheckCallback()
101
  {
102
  if ($this->getUseMassaction()) {
103
- return "function (grid, event) {
104
- $(grid.containerId).fire('product:changed', {});
105
  }";
106
  }
107
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
100
  public function getCheckboxCheckCallback()
101
  {
102
  if ($this->getUseMassaction()) {
103
+ return "function (grid, element) {
104
+ $(grid.containerId).fire('product:changed', {element: element});
105
  }";
106
  }
107
  }
app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Search.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -87,13 +87,15 @@ class Mage_Adminhtml_Block_Catalog_Search_Edit_Form extends Mage_Adminhtml_Block
87
  ));
88
 
89
  if (!Mage::app()->isSingleStoreMode()) {
90
- $fieldset->addField('store_id', 'select', array(
91
  'name' => 'store_id',
92
  'label' => Mage::helper('catalog')->__('Store'),
93
  'title' => Mage::helper('catalog')->__('Store'),
94
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(true, false),
95
  'required' => true,
96
  ));
 
 
97
  }
98
  else {
99
  $fieldset->addField('store_id', 'hidden', array(
@@ -104,48 +106,41 @@ class Mage_Adminhtml_Block_Catalog_Search_Edit_Form extends Mage_Adminhtml_Block
104
 
105
  if ($model->getId()) {
106
  $fieldset->addField('num_results', 'text', array(
107
- 'name' => 'num_results',
108
- 'label' => Mage::helper('catalog')->__('Number of results<br/>(For the last time placed)'),
109
- 'title' => Mage::helper('catalog')->__('Number of results<br/>(For the last time placed)'),
110
- 'required' => true,
 
111
  ));
112
 
113
  $fieldset->addField('popularity', 'text', array(
114
- 'name' => 'popularity',
115
- 'label' => Mage::helper('catalog')->__('Number of Uses'),
116
- 'title' => Mage::helper('catalog')->__('Number of Uses'),
117
- 'required' => true,
118
  ));
119
  }
120
 
121
- $afterElementHtml = '<p class="nm"><small>'
122
- . Mage::helper('catalog')->__('(Will make search for the query above return results for this search.)')
123
- . '</small></p>';
124
-
125
  $fieldset->addField('synonym_for', 'text', array(
126
- 'name' => 'synonym_for',
127
- 'label' => Mage::helper('catalog')->__('Synonym For'),
128
- 'title' => Mage::helper('catalog')->__('Synonym For'),
129
- 'after_element_html' => $afterElementHtml,
130
  ));
131
 
132
- $afterElementHtml = '<p class="nm"><small>'
133
- . Mage::helper('catalog')->__('ex. http://domain.com')
134
- . '</small></p>';
135
-
136
  $fieldset->addField('redirect', 'text', array(
137
- 'name' => 'redirect',
138
- 'label' => Mage::helper('catalog')->__('Redirect URL'),
139
- 'title' => Mage::helper('catalog')->__('Redirect URL'),
140
- 'class' => 'validate-url',
141
- 'after_element_html' => $afterElementHtml,
142
  ));
143
 
144
  $fieldset->addField('display_in_terms', 'select', array(
145
- 'name' => 'display_in_terms',
146
- 'label' => Mage::helper('catalog')->__('Display in Suggested Terms'),
147
- 'title' => Mage::helper('catalog')->__('Display in Suggested Terms'),
148
- 'values' => $yesno,
149
  ));
150
 
151
  $form->setValues($model->getData());
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
87
  ));
88
 
89
  if (!Mage::app()->isSingleStoreMode()) {
90
+ $field = $fieldset->addField('store_id', 'select', array(
91
  'name' => 'store_id',
92
  'label' => Mage::helper('catalog')->__('Store'),
93
  'title' => Mage::helper('catalog')->__('Store'),
94
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(true, false),
95
  'required' => true,
96
  ));
97
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
98
+ $field->setRenderer($renderer);
99
  }
100
  else {
101
  $fieldset->addField('store_id', 'hidden', array(
106
 
107
  if ($model->getId()) {
108
  $fieldset->addField('num_results', 'text', array(
109
+ 'name' => 'num_results',
110
+ 'label' => Mage::helper('catalog')->__('Number of results'),
111
+ 'title' => Mage::helper('catalog')->__('Number of results (For the last time placed)'),
112
+ 'note' => Mage::helper('catalog')->__('For the last time placed.'),
113
+ 'required' => true,
114
  ));
115
 
116
  $fieldset->addField('popularity', 'text', array(
117
+ 'name' => 'popularity',
118
+ 'label' => Mage::helper('catalog')->__('Number of Uses'),
119
+ 'title' => Mage::helper('catalog')->__('Number of Uses'),
120
+ 'required' => true,
121
  ));
122
  }
123
 
 
 
 
 
124
  $fieldset->addField('synonym_for', 'text', array(
125
+ 'name' => 'synonym_for',
126
+ 'label' => Mage::helper('catalog')->__('Synonym For'),
127
+ 'title' => Mage::helper('catalog')->__('Synonym For'),
128
+ 'note' => Mage::helper('catalog')->__('Will make search for the query above return results for this search.'),
129
  ));
130
 
 
 
 
 
131
  $fieldset->addField('redirect', 'text', array(
132
+ 'name' => 'redirect',
133
+ 'label' => Mage::helper('catalog')->__('Redirect URL'),
134
+ 'title' => Mage::helper('catalog')->__('Redirect URL'),
135
+ 'class' => 'validate-url',
136
+ 'note' => Mage::helper('catalog')->__('ex. http://domain.com'),
137
  ));
138
 
139
  $fieldset->addField('display_in_terms', 'select', array(
140
+ 'name' => 'display_in_terms',
141
+ 'label' => Mage::helper('catalog')->__('Display in Suggested Terms'),
142
+ 'title' => Mage::helper('catalog')->__('Display in Suggested Terms'),
143
+ 'values' => $yesno,
144
  ));
145
 
146
  $form->setValues($model->getData());
app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Checkout/Agreement.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -37,7 +37,7 @@ class Mage_Adminhtml_Block_Checkout_Agreement extends Mage_Adminhtml_Block_Widge
37
  public function __construct()
38
  {
39
  $this->_controller = 'checkout_agreement';
40
- $this->_headerText = Mage::helper('checkout')->__('Manage Checkout Terms and Conditions');
41
  $this->_addButtonLabel = Mage::helper('checkout')->__('Add New Condition');
42
  parent::__construct();
43
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
37
  public function __construct()
38
  {
39
  $this->_controller = 'checkout_agreement';
40
+ $this->_headerText = Mage::helper('checkout')->__('Manage Terms and Conditions');
41
  $this->_addButtonLabel = Mage::helper('checkout')->__('Add New Condition');
42
  parent::__construct();
43
  }
app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -60,7 +60,7 @@ class Mage_Adminhtml_Block_Checkout_Agreement_Edit extends Mage_Adminhtml_Block_
60
  return Mage::helper('checkout')->__('Edit Terms and Conditions');
61
  }
62
  else {
63
- return Mage::helper('checkout')->__('New Condition');
64
  }
65
  }
66
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
60
  return Mage::helper('checkout')->__('Edit Terms and Conditions');
61
  }
62
  else {
63
+ return Mage::helper('checkout')->__('New Terms and Conditions');
64
  }
65
  }
66
  }
app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -99,13 +99,15 @@ class Mage_Adminhtml_Block_Checkout_Agreement_Edit_Form extends Mage_Adminhtml_B
99
  ));
100
 
101
  if (!Mage::app()->isSingleStoreMode()) {
102
- $fieldset->addField('store_id', 'multiselect', array(
103
  'name' => 'stores[]',
104
  'label' => Mage::helper('checkout')->__('Store View'),
105
  'title' => Mage::helper('checkout')->__('Store View'),
106
  'required' => true,
107
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
108
  ));
 
 
109
  }
110
  else {
111
  $fieldset->addField('store_id', 'hidden', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
99
  ));
100
 
101
  if (!Mage::app()->isSingleStoreMode()) {
102
+ $field = $fieldset->addField('store_id', 'multiselect', array(
103
  'name' => 'stores[]',
104
  'label' => Mage::helper('checkout')->__('Store View'),
105
  'title' => Mage::helper('checkout')->__('Store View'),
106
  'required' => true,
107
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
108
  ));
109
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
110
+ $field->setRenderer($renderer);
111
  }
112
  else {
113
  $fieldset->addField('store_id', 'hidden', array(
app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Checkout_Agreement_Grid extends Mage_Adminhtml_Block_Widget_Grid
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Checkout_Agreement_Grid extends Mage_Adminhtml_Block_Widget_Grid
app/code/core/Mage/Adminhtml/Block/Cms/Block.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -60,7 +60,9 @@ class Mage_Adminhtml_Block_Cms_Block_Edit_Form extends Mage_Adminhtml_Block_Widg
60
  {
61
  $model = Mage::registry('cms_block');
62
 
63
- $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'));
 
 
64
 
65
  $form->setHtmlIdPrefix('block_');
66
 
@@ -91,13 +93,15 @@ class Mage_Adminhtml_Block_Cms_Block_Edit_Form extends Mage_Adminhtml_Block_Widg
91
  * Check is single store mode
92
  */
93
  if (!Mage::app()->isSingleStoreMode()) {
94
- $fieldset->addField('store_id', 'multiselect', array(
95
  'name' => 'stores[]',
96
  'label' => Mage::helper('cms')->__('Store View'),
97
  'title' => Mage::helper('cms')->__('Store View'),
98
  'required' => true,
99
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
100
  ));
 
 
101
  }
102
  else {
103
  $fieldset->addField('store_id', 'hidden', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
60
  {
61
  $model = Mage::registry('cms_block');
62
 
63
+ $form = new Varien_Data_Form(
64
+ array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')
65
+ );
66
 
67
  $form->setHtmlIdPrefix('block_');
68
 
93
  * Check is single store mode
94
  */
95
  if (!Mage::app()->isSingleStoreMode()) {
96
+ $field =$fieldset->addField('store_id', 'multiselect', array(
97
  'name' => 'stores[]',
98
  'label' => Mage::helper('cms')->__('Store View'),
99
  'title' => Mage::helper('cms')->__('Store View'),
100
  'required' => true,
101
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
102
  ));
103
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
104
+ $field->setRenderer($renderer);
105
  }
106
  else {
107
  $fieldset->addField('store_id', 'hidden', array(
app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Page.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,14 +29,18 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Cms_Page_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
35
  {
36
-
 
 
 
 
37
  public function __construct()
38
  {
39
- $this->_objectId = 'page_id';
40
  $this->_controller = 'cms_page';
41
 
42
  parent::__construct();
@@ -57,7 +61,6 @@ class Mage_Adminhtml_Block_Cms_Page_Edit extends Mage_Adminhtml_Block_Widget_For
57
  } else {
58
  $this->_removeButton('delete');
59
  }
60
-
61
  }
62
 
63
  /**
@@ -95,24 +98,26 @@ class Mage_Adminhtml_Block_Cms_Page_Edit extends Mage_Adminhtml_Block_Widget_For
95
  protected function _getSaveAndContinueUrl()
96
  {
97
  return $this->getUrl('*/*/save', array(
98
- '_current' => true,
99
- 'back' => 'edit',
100
- 'active_tab' => '{{tab_id}}'
101
  ));
102
  }
103
 
104
  /**
105
- * @see Mage_Adminhtml_Block_Widget_Container::_prepareLayout()
 
 
106
  */
107
  protected function _prepareLayout()
108
  {
109
  $tabsBlock = $this->getLayout()->getBlock('cms_page_edit_tabs');
110
  if ($tabsBlock) {
111
  $tabsBlockJsObject = $tabsBlock->getJsObjectName();
112
- $tabsBlockPrefix = $tabsBlock->getId() . '_';
113
  } else {
114
  $tabsBlockJsObject = 'page_tabsJsTabs';
115
- $tabsBlockPrefix = 'page_tabs_';
116
  }
117
 
118
  $this->_formScripts[] = "
@@ -137,6 +142,4 @@ class Mage_Adminhtml_Block_Cms_Page_Edit extends Mage_Adminhtml_Block_Widget_For
137
  ";
138
  return parent::_prepareLayout();
139
  }
140
-
141
-
142
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Cms_Page_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
35
  {
36
+ /**
37
+ * Initialize cms page edit block
38
+ *
39
+ * @return void
40
+ */
41
  public function __construct()
42
  {
43
+ $this->_objectId = 'page_id';
44
  $this->_controller = 'cms_page';
45
 
46
  parent::__construct();
61
  } else {
62
  $this->_removeButton('delete');
63
  }
 
64
  }
65
 
66
  /**
98
  protected function _getSaveAndContinueUrl()
99
  {
100
  return $this->getUrl('*/*/save', array(
101
+ '_current' => true,
102
+ 'back' => 'edit',
103
+ 'active_tab' => '{{tab_id}}'
104
  ));
105
  }
106
 
107
  /**
108
+ * Prepare layout
109
+ *
110
+ * @return Mage_Core_Block_Abstract
111
  */
112
  protected function _prepareLayout()
113
  {
114
  $tabsBlock = $this->getLayout()->getBlock('cms_page_edit_tabs');
115
  if ($tabsBlock) {
116
  $tabsBlockJsObject = $tabsBlock->getJsObjectName();
117
+ $tabsBlockPrefix = $tabsBlock->getId() . '_';
118
  } else {
119
  $tabsBlockJsObject = 'page_tabsJsTabs';
120
+ $tabsBlockPrefix = 'page_tabs_';
121
  }
122
 
123
  $this->_formScripts[] = "
142
  ";
143
  return parent::_prepareLayout();
144
  }
 
 
145
  }
app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Cms_Page_Edit_Tab_Design
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Cms_Page_Edit_Tab_Design
app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -85,14 +85,16 @@ class Mage_Adminhtml_Block_Cms_Page_Edit_Tab_Main
85
  * Check is single store mode
86
  */
87
  if (!Mage::app()->isSingleStoreMode()) {
88
- $fieldset->addField('store_id', 'multiselect', array(
89
  'name' => 'stores[]',
90
  'label' => Mage::helper('cms')->__('Store View'),
91
  'title' => Mage::helper('cms')->__('Store View'),
92
  'required' => true,
93
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
94
- 'disabled' => $isElementDisabled
95
  ));
 
 
96
  }
97
  else {
98
  $fieldset->addField('store_id', 'hidden', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
85
  * Check is single store mode
86
  */
87
  if (!Mage::app()->isSingleStoreMode()) {
88
+ $field = $fieldset->addField('store_id', 'multiselect', array(
89
  'name' => 'stores[]',
90
  'label' => Mage::helper('cms')->__('Store View'),
91
  'title' => Mage::helper('cms')->__('Store View'),
92
  'required' => true,
93
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
94
+ 'disabled' => $isElementDisabled,
95
  ));
96
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
97
+ $field->setRenderer($renderer);
98
  }
99
  else {
100
  $fieldset->addField('store_id', 'hidden', array(
app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Renderer for customer group ID
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Customer_Edit_Renderer_Attribute_Group
35
+ extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
36
+ {
37
+ /**
38
+ * Override parent constructor just for setting custom template
39
+ */
40
+ protected function _construct()
41
+ {
42
+ parent::_construct();
43
+ $this->setTemplate('customer/edit/tab/account/form/renderer/group.phtml');
44
+ }
45
+
46
+ /**
47
+ * Retrieve disable auto group change element HTML ID
48
+ *
49
+ * @return string
50
+ */
51
+ protected function _getDisableAutoGroupChangeElementHtmlId()
52
+ {
53
+ return $this->getDisableAutoGroupChangeAttribute()->getAttributeCode();
54
+ }
55
+
56
+ /**
57
+ * Retrieve disable auto group change checkbox label text
58
+ *
59
+ * @return string
60
+ */
61
+ public function getDisableAutoGroupChangeCheckboxLabel()
62
+ {
63
+ return Mage::helper('customer')->__($this->getDisableAutoGroupChangeAttribute()->getFrontend()->getLabel());
64
+ }
65
+
66
+ /**
67
+ * Retrieve disable auto group change checkbox state
68
+ *
69
+ * @return string
70
+ */
71
+ public function getDisableAutoGroupChangeCheckboxState()
72
+ {
73
+ $customer = Mage::registry('current_customer');
74
+ $checkedByDefault = ($customer && $customer->getId())
75
+ ? false : Mage::helper('customer/address')->getDisableAutoGroupAssignDefaultValue();
76
+
77
+ $value = $this->getDisableAutoGroupChangeAttributeValue();
78
+ $state = '';
79
+ if (!empty($value) || $checkedByDefault) {
80
+ $state = 'checked';
81
+ }
82
+ return $state;
83
+ }
84
+
85
+ /**
86
+ * Retrieve disable auto group change checkbox element HTML NAME
87
+ *
88
+ * @return string
89
+ */
90
+ public function getDisableAutoGroupChangeCheckboxElementName()
91
+ {
92
+ return $this->getElement()->getForm()->getFieldNameSuffix()
93
+ . '[' . $this->_getDisableAutoGroupChangeElementHtmlId() . ']';
94
+ }
95
+
96
+ /**
97
+ * Retrieve disable auto group change checkbox element HTML ID
98
+ *
99
+ * @return string
100
+ */
101
+ public function getDisableAutoGroupChangeCheckboxElementId()
102
+ {
103
+ return $this->_getDisableAutoGroupChangeElementHtmlId();
104
+ }
105
+ }
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,7 +29,9 @@
29
  *
30
  * @author Magento Core Team <core@magentocommerce.com>
31
  */
32
- class Mage_Adminhtml_Block_Customer_Edit_Renderer_Region extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
 
 
33
  {
34
  /**
35
  * Output the region element and javasctipt that makes it dependent from country element
@@ -50,20 +52,25 @@ class Mage_Adminhtml_Block_Customer_Edit_Renderer_Region extends Mage_Adminhtml_
50
 
51
  $html = '<tr>';
52
  $element->setClass('input-text');
53
- $html.= '<td class="label">'.$element->getLabelHtml().'</td><td class="value">';
54
- $html.= $element->getElementHtml();
 
55
 
56
  $selectName = str_replace('region', 'region_id', $element->getName());
57
- $selectId = $element->getHtmlId().'_id';
58
- $html.= '<select id="'.$selectId.'" name="'.$selectName.'" class="select required-entry" style="display:none">';
59
- $html.= '<option value="">'.Mage::helper('customer')->__('Please select').'</option>';
60
- $html.= '</select>';
 
61
 
62
- $html.= '<script type="text/javascript">'."\n";
63
- $html.= 'new regionUpdater("'.$country->getHtmlId().'", "'.$element->getHtmlId().'", "'.$selectId.'", '.$this->helper('directory')->getRegionJson().');'."\n";
64
- $html.= '</script>'."\n";
 
 
 
 
65
 
66
- $html.= '</td></tr>'."\n";
67
  return $html;
68
  }
69
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @author Magento Core Team <core@magentocommerce.com>
31
  */
32
+ class Mage_Adminhtml_Block_Customer_Edit_Renderer_Region
33
+ extends Mage_Adminhtml_Block_Abstract
34
+ implements Varien_Data_Form_Element_Renderer_Interface
35
  {
36
  /**
37
  * Output the region element and javasctipt that makes it dependent from country element
52
 
53
  $html = '<tr>';
54
  $element->setClass('input-text');
55
+ $element->setRequired(true);
56
+ $html .= '<td class="label">' . $element->getLabelHtml() . '</td><td class="value">';
57
+ $html .= $element->getElementHtml();
58
 
59
  $selectName = str_replace('region', 'region_id', $element->getName());
60
+ $selectId = $element->getHtmlId() . '_id';
61
+ $html .= '<select id="' . $selectId . '" name="' . $selectName
62
+ . '" class="select required-entry" style="display:none">';
63
+ $html .= '<option value="">' . Mage::helper('customer')->__('Please select') . '</option>';
64
+ $html .= '</select>';
65
 
66
+ $html .= '<script type="text/javascript">' . "\n";
67
+ $html .= '$("' . $selectId . '").setAttribute("defaultValue", "' . $regionId.'");' . "\n";
68
+ $html .= 'new regionUpdater("' . $country->getHtmlId() . '", "' . $element->getHtmlId()
69
+ . '", "' . $selectId . '", ' . $this->helper('directory')->getRegionJson() . ');' . "\n";
70
+ $html .= '</script>' . "\n";
71
+
72
+ $html .= '</td></tr>' . "\n";
73
 
 
74
  return $html;
75
  }
76
  }
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -33,11 +33,19 @@
33
  */
34
  class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Block_Widget_Form
35
  {
 
 
 
36
  public function __construct()
37
  {
38
  parent::__construct();
39
  }
40
 
 
 
 
 
 
41
  public function initForm()
42
  {
43
  $form = new Varien_Data_Form();
@@ -46,28 +54,64 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Bloc
46
 
47
  $customer = Mage::registry('current_customer');
48
 
49
- /* @var $customerForm Mage_Customer_Model_Form */
50
  $customerForm = Mage::getModel('customer/form');
51
  $customerForm->setEntity($customer)
52
  ->setFormCode('adminhtml_customer')
53
  ->initDefaultValues();
54
 
55
- $fieldset = $form->addFieldset('base_fieldset',
56
- array('legend'=>Mage::helper('customer')->__('Account Information'))
57
- );
58
 
59
  $attributes = $customerForm->getAttributes();
60
  foreach ($attributes as $attribute) {
 
 
61
  $attribute->unsIsVisible();
62
  }
63
- $this->_setFieldset($attributes, $fieldset);
 
 
 
 
 
 
 
64
 
65
  if ($customer->getId()) {
66
  $form->getElement('website_id')->setDisabled('disabled');
67
  $form->getElement('created_in')->setDisabled('disabled');
68
  } else {
69
  $fieldset->removeField('created_in');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
 
 
71
 
72
  // if (Mage::app()->isSingleStoreMode()) {
73
  // $fieldset->removeField('website_id');
@@ -119,10 +163,10 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Bloc
119
 
120
  if ($customer->getId()) {
121
  if (!$customer->isReadonly()) {
122
- // add password management fieldset
123
  $newFieldset = $form->addFieldset(
124
  'password_fieldset',
125
- array('legend'=>Mage::helper('customer')->__('Password Management'))
126
  );
127
  // New customer password
128
  $field = $newFieldset->addField('new_password', 'text',
@@ -134,7 +178,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Bloc
134
  );
135
  $field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));
136
 
137
- // prepare customer confirmation control (only for existing customers)
138
  $confirmationKey = $customer->getConfirmation();
139
  if ($confirmationKey || $customer->isConfirmationRequired()) {
140
  $confirmationAttribute = $customer->getAttribute('confirmation');
@@ -147,8 +191,8 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Bloc
147
  ))->setEntityAttribute($confirmationAttribute)
148
  ->setValues(array('' => 'Confirmed', $confirmationKey => 'Not confirmed'));
149
 
150
- // prepare send welcome email checkbox, if customer is not confirmed
151
- // no need to add it, if website id is empty
152
  if ($customer->getConfirmation() && $customer->getWebsiteId()) {
153
  $fieldset->addField('sendemail', 'checkbox', array(
154
  'name' => 'sendemail',
@@ -173,7 +217,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Bloc
173
  );
174
  $field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));
175
 
176
- // prepare send welcome email checkbox
177
  $fieldset->addField('sendemail', 'checkbox', array(
178
  'label' => Mage::helper('customer')->__('Send Welcome Email'),
179
  'name' => 'sendemail',
@@ -189,7 +233,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Bloc
189
  }
190
  }
191
 
192
- // make sendemail and sendmail_store_id disabled, if website_id has empty value
193
  $isSingleMode = Mage::app()->isSingleStoreMode();
194
  $sendEmailId = $isSingleMode ? 'sendemail' : 'sendemail_store_id';
195
  $sendEmail = $form->getElement($sendEmailId);
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
33
  */
34
  class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Block_Widget_Form
35
  {
36
+ /**
37
+ * Initialize block
38
+ */
39
  public function __construct()
40
  {
41
  parent::__construct();
42
  }
43
 
44
+ /**
45
+ * Initialize form
46
+ *
47
+ * @return Mage_Adminhtml_Block_Customer_Edit_Tab_Account
48
+ */
49
  public function initForm()
50
  {
51
  $form = new Varien_Data_Form();
54
 
55
  $customer = Mage::registry('current_customer');
56
 
57
+ /** @var $customerForm Mage_Customer_Model_Form */
58
  $customerForm = Mage::getModel('customer/form');
59
  $customerForm->setEntity($customer)
60
  ->setFormCode('adminhtml_customer')
61
  ->initDefaultValues();
62
 
63
+ $fieldset = $form->addFieldset('base_fieldset', array(
64
+ 'legend' => Mage::helper('customer')->__('Account Information')
65
+ ));
66
 
67
  $attributes = $customerForm->getAttributes();
68
  foreach ($attributes as $attribute) {
69
+ /* @var $attribute Mage_Eav_Model_Entity_Attribute */
70
+ $attribute->setFrontendLabel(Mage::helper('customer')->__($attribute->getFrontend()->getLabel()));
71
  $attribute->unsIsVisible();
72
  }
73
+
74
+ $disableAutoGroupChangeAttributeName = 'disable_auto_group_change';
75
+ $this->_setFieldset($attributes, $fieldset, array($disableAutoGroupChangeAttributeName));
76
+
77
+ $form->getElement('group_id')->setRenderer($this->getLayout()
78
+ ->createBlock('adminhtml/customer_edit_renderer_attribute_group')
79
+ ->setDisableAutoGroupChangeAttribute($customerForm->getAttribute($disableAutoGroupChangeAttributeName))
80
+ ->setDisableAutoGroupChangeAttributeValue($customer->getData($disableAutoGroupChangeAttributeName)));
81
 
82
  if ($customer->getId()) {
83
  $form->getElement('website_id')->setDisabled('disabled');
84
  $form->getElement('created_in')->setDisabled('disabled');
85
  } else {
86
  $fieldset->removeField('created_in');
87
+ $form->getElement('website_id')->addClass('validate-website-has-store');
88
+
89
+ $websites = array();
90
+ foreach (Mage::app()->getWebsites(true) as $website) {
91
+ $websites[$website->getId()] = !is_null($website->getDefaultStore());
92
+ }
93
+ $prefix = $form->getHtmlIdPrefix();
94
+
95
+ $form->getElement('website_id')->setAfterElementHtml(
96
+ '<script type="text/javascript">'
97
+ . "
98
+ var {$prefix}_websites = " . Mage::helper('core')->jsonEncode($websites) .";
99
+ Validation.add(
100
+ 'validate-website-has-store',
101
+ '" . Mage::helper('customer')->__('Please select a website which contains store view') . "',
102
+ function(v, elem){
103
+ return {$prefix}_websites[elem.value] == true;
104
+ }
105
+ );
106
+ Element.observe('{$prefix}website_id', 'change', function(){
107
+ Validation.validate($('{$prefix}website_id'))
108
+ }.bind($('{$prefix}website_id')));
109
+ "
110
+ . '</script>'
111
+ );
112
  }
113
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
114
+ $form->getElement('website_id')->setRenderer($renderer);
115
 
116
  // if (Mage::app()->isSingleStoreMode()) {
117
  // $fieldset->removeField('website_id');
163
 
164
  if ($customer->getId()) {
165
  if (!$customer->isReadonly()) {
166
+ // Add password management fieldset
167
  $newFieldset = $form->addFieldset(
168
  'password_fieldset',
169
+ array('legend' => Mage::helper('customer')->__('Password Management'))
170
  );
171
  // New customer password
172
  $field = $newFieldset->addField('new_password', 'text',
178
  );
179
  $field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));
180
 
181
+ // Prepare customer confirmation control (only for existing customers)
182
  $confirmationKey = $customer->getConfirmation();
183
  if ($confirmationKey || $customer->isConfirmationRequired()) {
184
  $confirmationAttribute = $customer->getAttribute('confirmation');
191
  ))->setEntityAttribute($confirmationAttribute)
192
  ->setValues(array('' => 'Confirmed', $confirmationKey => 'Not confirmed'));
193
 
194
+ // Prepare send welcome email checkbox if customer is not confirmed
195
+ // no need to add it, if website ID is empty
196
  if ($customer->getConfirmation() && $customer->getWebsiteId()) {
197
  $fieldset->addField('sendemail', 'checkbox', array(
198
  'name' => 'sendemail',
217
  );
218
  $field->setRenderer($this->getLayout()->createBlock('adminhtml/customer_edit_renderer_newpass'));
219
 
220
+ // Prepare send welcome email checkbox
221
  $fieldset->addField('sendemail', 'checkbox', array(
222
  'label' => Mage::helper('customer')->__('Send Welcome Email'),
223
  'name' => 'sendemail',
233
  }
234
  }
235
 
236
+ // Make sendemail and sendmail_store_id disabled if website_id has empty value
237
  $isSingleMode = Mage::app()->isSingleStoreMode();
238
  $sendEmailId = $isSingleMode ? 'sendemail' : 'sendemail_store_id';
239
  $sendEmail = $form->getElement($sendEmailId);
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -128,11 +128,14 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Addresses extends Mage_Adminhtml_Bl
128
  ->processStreetAttribute($attributes['street']);
129
  }
130
  foreach ($attributes as $attribute) {
 
 
131
  $attribute->unsIsVisible();
132
  }
133
  $this->_setFieldset($attributes, $fieldset);
134
 
135
  $regionElement = $form->getElement('region');
 
136
  if ($regionElement) {
137
  $regionElement->setRenderer(Mage::getModel('adminhtml/customer_renderer_region'));
138
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
128
  ->processStreetAttribute($attributes['street']);
129
  }
130
  foreach ($attributes as $attribute) {
131
+ /* @var $attribute Mage_Eav_Model_Entity_Attribute */
132
+ $attribute->setFrontendLabel(Mage::helper('customer')->__($attribute->getFrontend()->getLabel()));
133
  $attribute->unsIsVisible();
134
  }
135
  $this->_setFieldset($attributes, $fieldset);
136
 
137
  $regionElement = $form->getElement('region');
138
+ $regionElement->setRequired(true);
139
  if ($regionElement) {
140
  $regionElement->setRenderer(Mage::getModel('adminhtml/customer_renderer_region'));
141
  }
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -37,12 +37,22 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Cart extends Mage_Adminhtml_Block_W
37
  public function __construct($attributes=array())
38
  {
39
  parent::__construct($attributes);
40
- $this->setId('customer_cart_grid'.$this->getWebsiteId());
41
  $this->setUseAjax(true);
42
  $this->_parentTemplate = $this->getTemplate();
43
  $this->setTemplate('customer/tab/cart.phtml');
44
  }
45
 
 
 
 
 
 
 
 
 
 
 
 
46
  protected function _prepareCollection()
47
  {
48
  $customer = Mage::registry('current_customer');
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
37
  public function __construct($attributes=array())
38
  {
39
  parent::__construct($attributes);
 
40
  $this->setUseAjax(true);
41
  $this->_parentTemplate = $this->getTemplate();
42
  $this->setTemplate('customer/tab/cart.phtml');
43
  }
44
 
45
+ /**
46
+ * Prepare grid
47
+ *
48
+ * @return void
49
+ */
50
+ protected function _prepareGrid()
51
+ {
52
+ $this->setId('customer_cart_grid' . $this->getWebsiteId());
53
+ parent::_prepareGrid();
54
+ }
55
+
56
  protected function _prepareCollection()
57
  {
58
  $customer = Mage::registry('current_customer');
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -48,6 +48,11 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter extends Mage_Adminhtml_B
48
  $subscriber = Mage::getModel('newsletter/subscriber')->loadByCustomer($customer);
49
  Mage::register('subscriber', $subscriber);
50
 
 
 
 
 
 
51
  $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('customer')->__('Newsletter Information')));
52
 
53
  $fieldset->addField('subscription', 'checkbox',
@@ -73,7 +78,6 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter extends Mage_Adminhtml_B
73
  );
74
  }
75
 
76
-
77
  $this->setForm($form);
78
  return $this;
79
  }
@@ -82,7 +86,10 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter extends Mage_Adminhtml_B
82
  {
83
  $subscriber = Mage::registry('subscriber');
84
  if($subscriber->getChangeStatusAt()) {
85
- return $this->formatDate($subscriber->getChangeStatusAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
 
 
 
86
  }
87
 
88
  return null;
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
48
  $subscriber = Mage::getModel('newsletter/subscriber')->loadByCustomer($customer);
49
  Mage::register('subscriber', $subscriber);
50
 
51
+ if ($customer->getWebsiteId() == 0) {
52
+ $this->setForm($form);
53
+ return $this;
54
+ }
55
+
56
  $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('customer')->__('Newsletter Information')));
57
 
58
  $fieldset->addField('subscription', 'checkbox',
78
  );
79
  }
80
 
 
81
  $this->setForm($form);
82
  return $this;
83
  }
86
  {
87
  $subscriber = Mage::registry('subscriber');
88
  if($subscriber->getChangeStatusAt()) {
89
+ return $this->formatDate(
90
+ $subscriber->getChangeStatusAt(),
91
+ Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true
92
+ );
93
  }
94
 
95
  return null;
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tag.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -71,10 +71,15 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_View
71
  return $this->_customerLog;
72
  }
73
 
 
 
 
 
 
74
  public function getCreateDate()
75
  {
76
- $date = Mage::app()->getLocale()->date($this->getCustomer()->getCreatedAtTimestamp());
77
- return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
78
  }
79
 
80
  public function getStoreCreateDate()
@@ -93,11 +98,16 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_View
93
  ->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
94
  }
95
 
 
 
 
 
 
96
  public function getLastLoginDate()
97
  {
98
- if ($date = $this->getCustomerLog()->getLoginAtTimestamp()) {
99
- $date = Mage::app()->getLocale()->date($date);
100
- return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
101
  }
102
  return Mage::helper('customer')->__('Never');
103
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
71
  return $this->_customerLog;
72
  }
73
 
74
+ /**
75
+ * Get customer creation date
76
+ *
77
+ * @return string
78
+ */
79
  public function getCreateDate()
80
  {
81
+ return Mage::helper('core')->formatDate($this->getCustomer()->getCreatedAtTimestamp(),
82
+ Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
83
  }
84
 
85
  public function getStoreCreateDate()
98
  ->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
99
  }
100
 
101
+ /**
102
+ * Get customer last login date
103
+ *
104
+ * @return string
105
+ */
106
  public function getLastLoginDate()
107
  {
108
+ $date = $this->getCustomerLog()->getLoginAtTimestamp();
109
+ if ($date) {
110
+ return Mage::helper('core')->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
111
  }
112
  return Mage::helper('customer')->__('Never');
113
  }
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -58,9 +58,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_View_Accordion extends Mage_Adminht
58
  // prepare title for cart
59
  $title = Mage::helper('customer')->__('Shopping Cart - %d item(s)', $cartItemsCount);
60
  if (count($customer->getSharedWebsiteIds()) > 1) {
61
- $title = Mage::helper('customer')->__('Shopping Cart of %1$s - %2$d item(s)',
62
- $website->getName(), $cartItemsCount
63
- );
64
  }
65
 
66
  // add cart ajax accordion
@@ -72,10 +70,8 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_View_Accordion extends Mage_Adminht
72
  }
73
 
74
  // count wishlist items
75
- $wishlist = Mage::getModel('wishlist/wishlist');
76
- $wishlistCount = $wishlist->loadByCustomer($customer)
77
- ->setSharedStoreIds($wishlist->getSharedStoreIds(false))
78
- ->getItemCollection()
79
  ->addStoreData()
80
  ->getSize();
81
  // add wishlist ajax accordion
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
58
  // prepare title for cart
59
  $title = Mage::helper('customer')->__('Shopping Cart - %d item(s)', $cartItemsCount);
60
  if (count($customer->getSharedWebsiteIds()) > 1) {
61
+ $title = Mage::helper('customer')->__('Shopping Cart of %1$s - %2$d item(s)', $website->getName(), $cartItemsCount);
 
 
62
  }
63
 
64
  // add cart ajax accordion
70
  }
71
 
72
  // count wishlist items
73
+ $wishlistCount = Mage::getModel('wishlist/item')->getCollection()
74
+ ->addCustomerIdFilter($customer->getId())
 
 
75
  ->addStoreData()
76
  ->getSize();
77
  // add wishlist ajax accordion
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -55,10 +55,8 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_View_Wishlist extends Mage_Adminhtm
55
  */
56
  protected function _prepareCollection()
57
  {
58
- $wishlist = Mage::getModel('wishlist/wishlist');
59
- $collection = $wishlist->loadByCustomer(Mage::registry('current_customer'))
60
- ->setSharedStoreIds($wishlist->getSharedStoreIds(false))
61
- ->getItemCollection()
62
  ->addDaysInWishlist(true)
63
  ->addStoreData()
64
  ->setInStockFilter(true);
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
55
  */
56
  protected function _prepareCollection()
57
  {
58
+ $collection = Mage::getModel('wishlist/item')->getCollection()
59
+ ->addCustomerIdFilter(Mage::registry('current_customer')->getId())
 
 
60
  ->addDaysInWishlist(true)
61
  ->addStoreData()
62
  ->setInStockFilter(true);
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -41,6 +41,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist extends Mage_Adminhtml_Blo
41
  */
42
 
43
  protected $_defaultSort = 'added_at';
 
44
  /**
45
  * Parent template name
46
  *
@@ -78,6 +79,16 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist extends Mage_Adminhtml_Blo
78
  return Mage::registry('current_customer');
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
81
  /**
82
  * Prepare customer wishlist product collection
83
  *
@@ -85,14 +96,10 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist extends Mage_Adminhtml_Blo
85
  */
86
  protected function _prepareCollection()
87
  {
88
- $wishlist = Mage::getModel('wishlist/wishlist');
89
- $collection = $wishlist->loadByCustomer($this->_getCustomer())
90
- ->setSharedStoreIds($wishlist->getSharedStoreIds(false))
91
- ->getItemCollection()
92
  ->resetSortOrder()
93
  ->addDaysInWishlist()
94
  ->addStoreData();
95
-
96
  $this->setCollection($collection);
97
 
98
  return parent::_prepareCollection();
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
41
  */
42
 
43
  protected $_defaultSort = 'added_at';
44
+
45
  /**
46
  * Parent template name
47
  *
79
  return Mage::registry('current_customer');
80
  }
81
 
82
+ /**
83
+ * Create customer wishlist item collection
84
+ *
85
+ * @return Mage_Wishlist_Model_Resource_Item_Collection
86
+ */
87
+ protected function _createCollection()
88
+ {
89
+ return Mage::getModel('wishlist/item')->getCollection();
90
+ }
91
+
92
  /**
93
  * Prepare customer wishlist product collection
94
  *
96
  */
97
  protected function _prepareCollection()
98
  {
99
+ $collection = $this->_createCollection()->addCustomerIdFilter($this->_getCustomer()->getId())
 
 
 
100
  ->resetSortOrder()
101
  ->addDaysInWishlist()
102
  ->addStoreData();
 
103
  $this->setCollection($collection);
104
 
105
  return parent::_prepareCollection();
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Image.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Group.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -51,8 +51,7 @@ class Mage_Adminhtml_Block_Customer_Group_Edit_Form extends Mage_Adminhtml_Block
51
  'name' => 'code',
52
  'label' => Mage::helper('customer')->__('Group Name'),
53
  'title' => Mage::helper('customer')->__('Group Name'),
54
- 'note' => Mage::helper('customer')->__('Maximum length must be less then %s symbols',
55
- Mage_Customer_Model_Group::GROUP_CODE_MAX_LENGTH),
56
  'class' => $validateClass,
57
  'required' => true,
58
  )
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
51
  'name' => 'code',
52
  'label' => Mage::helper('customer')->__('Group Name'),
53
  'title' => Mage::helper('customer')->__('Group Name'),
54
+ 'note' => Mage::helper('customer')->__('Maximum length must be less then %s symbols', Mage_Customer_Model_Group::GROUP_CODE_MAX_LENGTH),
 
55
  'class' => $validateClass,
56
  'required' => true,
57
  )
app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Online.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Online/Filter.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * VAT ID element renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Customer_Sales_Order_Address_Form_Renderer_Vat
35
+ extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
36
+ {
37
+ /**
38
+ * Validate button block
39
+ *
40
+ * @var null|Mage_Adminhtml_Block_Widget_Button
41
+ */
42
+ protected $_validateButton = null;
43
+
44
+ /**
45
+ * Set custom template for 'VAT number'
46
+ */
47
+ protected function _construct()
48
+ {
49
+ $this->setTemplate('customer/sales/order/create/address/form/renderer/vat.phtml');
50
+ }
51
+
52
+ /**
53
+ * Retrieve validate button block
54
+ *
55
+ * @return Mage_Adminhtml_Block_Widget_Button
56
+ */
57
+ public function getValidateButton()
58
+ {
59
+ if (is_null($this->_validateButton)) {
60
+ /** @var $form Varien_Data_Form */
61
+ $form = $this->_element->getForm();
62
+
63
+ $vatElementId = $this->_element->getHtmlId();
64
+
65
+ $countryElementId = $form->getElement('country_id')->getHtmlId();
66
+ $validateUrl = Mage::getSingleton('adminhtml/url')
67
+ ->getUrl('*/customer_system_config_validatevat/validateAdvanced');
68
+
69
+ $groupSuggestionMessage = Mage::helper('customer')->__('The customer is currently assigned to Customer Group %s.')
70
+ . ' ' . Mage::helper('customer')->__('Would you like to change the Customer Group for this order?');
71
+
72
+ $vatValidateOptions = Mage::helper('core')->jsonEncode(array(
73
+ 'vatElementId' => $vatElementId,
74
+ 'countryElementId' => $countryElementId,
75
+ 'groupIdHtmlId' => 'group_id',
76
+ 'validateUrl' => $validateUrl,
77
+ 'vatValidMessage' => Mage::helper('customer')->__('The VAT ID is valid. The current Customer Group will be used.'),
78
+ 'vatValidAndGroupChangeMessage' => Mage::helper('customer')->__('Based on the VAT ID, the customer would belong to the Customer Group %s.')
79
+ . "\n" . $groupSuggestionMessage,
80
+ 'vatInvalidMessage' => Mage::helper('customer')->__('The VAT ID entered (%s) is not a valid VAT ID. The customer would belong to Customer Group %s.')
81
+ . "\n" . $groupSuggestionMessage,
82
+ 'vatValidationFailedMessage' => Mage::helper('customer')->__('There was an error validating the VAT ID. The customer would belong to Customer Group %s.')
83
+ . "\n" . $groupSuggestionMessage,
84
+ 'vatErrorMessage' => Mage::helper('customer')->__('There was an error validating the VAT ID.')
85
+ ));
86
+
87
+ $optionsVarName = $this->getJsVariablePrefix() . 'VatParameters';
88
+ $beforeHtml = '<script type="text/javascript">var ' . $optionsVarName . ' = ' . $vatValidateOptions
89
+ . ';</script>';
90
+ $this->_validateButton = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
91
+ 'label' => Mage::helper('customer')->__('Validate VAT Number'),
92
+ 'before_html' => $beforeHtml,
93
+ 'onclick' => 'order.validateVat(' . $optionsVarName . ')'
94
+ ));
95
+ }
96
+ return $this->_validateButton;
97
+ }
98
+ }
app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml VAT ID validation block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Customer_System_Config_Validatevat extends Mage_Adminhtml_Block_System_Config_Form_Field
35
+ {
36
+ /**
37
+ * Set template to itself
38
+ *
39
+ * @return Mage_Adminhtml_Block_Customer_System_Config_Validatevat
40
+ */
41
+ protected function _prepareLayout()
42
+ {
43
+ parent::_prepareLayout();
44
+ if (!$this->getTemplate()) {
45
+ $this->setTemplate('customer/system/config/validatevat.phtml');
46
+ }
47
+ return $this;
48
+ }
49
+
50
+ /**
51
+ * Unset some non-related element parameters
52
+ *
53
+ * @param Varien_Data_Form_Element_Abstract $element
54
+ * @return string
55
+ */
56
+ public function render(Varien_Data_Form_Element_Abstract $element)
57
+ {
58
+ $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
59
+ return parent::render($element);
60
+ }
61
+
62
+ /**
63
+ * Get the button and scripts contents
64
+ *
65
+ * @param Varien_Data_Form_Element_Abstract $element
66
+ * @return string
67
+ */
68
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
69
+ {
70
+ $originalData = $element->getOriginalData();
71
+ $this->addData(array(
72
+ 'button_label' => Mage::helper('customer')->__($originalData['button_label']),
73
+ 'html_id' => $element->getHtmlId(),
74
+ 'ajax_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/customer_system_config_validatevat/validate')
75
+ ));
76
+
77
+ return $this->_toHtml();
78
+ }
79
+ }
app/code/core/Mage/Adminhtml/Block/Dashboard.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Last.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Top.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Denied.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Html/Date.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Html/Select.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Media/Editor.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Media/Uploader.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -195,11 +195,12 @@ class Mage_Adminhtml_Block_Media_Uploader extends Mage_Adminhtml_Block_Widget
195
  }
196
 
197
  /**
198
- * Retrive full uploader SWF's file URL
199
  * Implemented to solve problem with cross domain SWFs
200
  * Now uploader can be only in the same URL where backend located
201
  *
202
- * @param string url to uploader in current theme
 
203
  * @return string full URL
204
  */
205
  public function getUploaderUrl($url)
@@ -212,7 +213,7 @@ class Mage_Adminhtml_Block_Media_Uploader extends Mage_Adminhtml_Block_Widget
212
  if (empty($url) || !$design->validateFile($url, array('_type' => 'skin', '_theme' => $theme))) {
213
  $theme = $design->getDefaultTheme();
214
  }
215
- return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) .
216
  $design->getArea() . '/' . $design->getPackageName() . '/' . $theme . '/' . $url;
217
  }
218
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
195
  }
196
 
197
  /**
198
+ * Retrieve full uploader SWF's file URL
199
  * Implemented to solve problem with cross domain SWFs
200
  * Now uploader can be only in the same URL where backend located
201
  *
202
+ * @param string $url url to uploader in current theme
203
+ *
204
  * @return string full URL
205
  */
206
  public function getUploaderUrl($url)
213
  if (empty($url) || !$design->validateFile($url, array('_type' => 'skin', '_theme' => $theme))) {
214
  $theme = $design->getDefaultTheme();
215
  }
216
+ return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'skin/' .
217
  $design->getArea() . '/' . $design->getPackageName() . '/' . $theme . '/' . $url;
218
  }
219
  }
app/code/core/Mage/Adminhtml/Block/Messages.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -36,9 +36,9 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo
36
  {
37
  /**
38
  * Prepare form for newsletter queue editing.
39
- * Form can be run from newsletter template grid by option "Queue newsletter"
40
  * or from newsletter queue grid by edit option.
41
- *
42
  * @param void
43
  * @return Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form
44
  */
@@ -50,7 +50,8 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo
50
  $form = new Varien_Data_Form();
51
 
52
  $fieldset = $form->addFieldset('base_fieldset', array(
53
- 'legend' => Mage::helper('newsletter')->__('Queue Information')
 
54
  ));
55
 
56
  $outputFormat = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
@@ -118,7 +119,9 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo
118
  'name' =>'subject',
119
  'label' => Mage::helper('newsletter')->__('Subject'),
120
  'required' => true,
121
- 'value' => ($queue->isNew() ? $queue->getTemplate()->getTemplateSubject() : $queue->getNewsletterSubject())
 
 
122
  ));
123
 
124
  $fieldset->addField('sender_name', 'text', array(
@@ -126,7 +129,9 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo
126
  'label' => Mage::helper('newsletter')->__('Sender Name'),
127
  'title' => Mage::helper('newsletter')->__('Sender Name'),
128
  'required' => true,
129
- 'value' => ($queue->isNew() ? $queue->getTemplate()->getTemplateSenderName() : $queue->getNewsletterSenderName())
 
 
130
  ));
131
 
132
  $fieldset->addField('sender_email', 'text', array(
@@ -135,11 +140,14 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo
135
  'title' => Mage::helper('newsletter')->__('Sender Email'),
136
  'class' => 'validate-email',
137
  'required' => true,
138
- 'value' => ($queue->isNew() ? $queue->getTemplate()->getTemplateSenderEmail() : $queue->getNewsletterSenderEmail())
 
 
139
  ));
140
 
141
  $widgetFilters = array('is_email_compatible' => 1);
142
- $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters));
 
143
 
144
  if ($queue->isNew()) {
145
  $fieldset->addField('text','editor', array(
@@ -148,7 +156,7 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo
148
  'state' => 'html',
149
  'required' => true,
150
  'value' => $queue->getTemplate()->getTemplateText(),
151
- 'style' => 'width:98%; height: 600px;',
152
  'config' => $wysiwygConfig
153
  ));
154
 
@@ -184,7 +192,7 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo
184
  'state' => 'html',
185
  'required' => true,
186
  'value' => $queue->getNewsletterText(),
187
- 'style' => 'width:98%; height: 600px;',
188
  'config' => $wysiwygConfig
189
  ));
190
 
@@ -192,7 +200,7 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo
192
  'name' =>'styles',
193
  'label' => Mage::helper('newsletter')->__('Newsletter Styles'),
194
  'value' => $queue->getNewsletterStyles(),
195
- 'style' => 'width:98%; height: 300px;',
196
  ));
197
  }
198
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
36
  {
37
  /**
38
  * Prepare form for newsletter queue editing.
39
+ * Form can be run from newsletter template grid by option "Queue newsletter"
40
  * or from newsletter queue grid by edit option.
41
+ *
42
  * @param void
43
  * @return Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form
44
  */
50
  $form = new Varien_Data_Form();
51
 
52
  $fieldset = $form->addFieldset('base_fieldset', array(
53
+ 'legend' => Mage::helper('newsletter')->__('Queue Information'),
54
+ 'class' => 'fieldset-wide'
55
  ));
56
 
57
  $outputFormat = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
119
  'name' =>'subject',
120
  'label' => Mage::helper('newsletter')->__('Subject'),
121
  'required' => true,
122
+ 'value' => (
123
+ $queue->isNew() ? $queue->getTemplate()->getTemplateSubject() : $queue->getNewsletterSubject()
124
+ )
125
  ));
126
 
127
  $fieldset->addField('sender_name', 'text', array(
129
  'label' => Mage::helper('newsletter')->__('Sender Name'),
130
  'title' => Mage::helper('newsletter')->__('Sender Name'),
131
  'required' => true,
132
+ 'value' => (
133
+ $queue->isNew() ? $queue->getTemplate()->getTemplateSenderName() : $queue->getNewsletterSenderName()
134
+ )
135
  ));
136
 
137
  $fieldset->addField('sender_email', 'text', array(
140
  'title' => Mage::helper('newsletter')->__('Sender Email'),
141
  'class' => 'validate-email',
142
  'required' => true,
143
+ 'value' => (
144
+ $queue->isNew() ? $queue->getTemplate()->getTemplateSenderEmail() : $queue->getNewsletterSenderEmail()
145
+ )
146
  ));
147
 
148
  $widgetFilters = array('is_email_compatible' => 1);
149
+ $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')
150
+ ->getConfig(array('widget_filters' => $widgetFilters));
151
 
152
  if ($queue->isNew()) {
153
  $fieldset->addField('text','editor', array(
156
  'state' => 'html',
157
  'required' => true,
158
  'value' => $queue->getTemplate()->getTemplateText(),
159
+ 'style' => 'height: 600px;',
160
  'config' => $wysiwygConfig
161
  ));
162
 
192
  'state' => 'html',
193
  'required' => true,
194
  'value' => $queue->getNewsletterText(),
195
+ 'style' => 'height: 600px;',
196
  'config' => $wysiwygConfig
197
  ));
198
 
200
  'name' =>'styles',
201
  'label' => Mage::helper('newsletter')->__('Newsletter Styles'),
202
  'value' => $queue->getNewsletterStyles(),
203
+ 'style' => 'height: 300px;',
204
  ));
205
  }
206
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Baseurl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Actions.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Inbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Security.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Survey.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Toolbar.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Notification/Window.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -53,17 +53,17 @@ class Mage_Adminhtml_Block_Notification_Window extends Mage_Adminhtml_Block_Noti
53
  {
54
  parent::_construct();
55
 
56
- $this->setHeaderText(addslashes($this->__('Incoming Message')));
57
- $this->setCloseText(addslashes($this->__('close')));
58
- $this->setReadDetailsText(addslashes($this->__('Read details')));
59
- $this->setNoticeText(addslashes($this->__('NOTICE')));
60
- $this->setMinorText(addslashes($this->__('MINOR')));
61
- $this->setMajorText(addslashes($this->__('MAJOR')));
62
- $this->setCriticalText(addslashes($this->__('CRITICAL')));
63
 
64
 
65
- $this->setNoticeMessageText(addslashes($this->getLastNotice()->getTitle()));
66
- $this->setNoticeMessageUrl(addslashes($this->getLastNotice()->getUrl()));
67
 
68
  switch ($this->getLastNotice()->getSeverity()) {
69
  default:
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
53
  {
54
  parent::_construct();
55
 
56
+ $this->setHeaderText($this->escapeHtml($this->__('Incoming Message')));
57
+ $this->setCloseText($this->escapeHtml($this->__('close')));
58
+ $this->setReadDetailsText($this->escapeHtml($this->__('Read details')));
59
+ $this->setNoticeText($this->escapeHtml($this->__('NOTICE')));
60
+ $this->setMinorText($this->escapeHtml($this->__('MINOR')));
61
+ $this->setMajorText($this->escapeHtml($this->__('MAJOR')));
62
+ $this->setCriticalText($this->escapeHtml($this->__('CRITICAL')));
63
 
64
 
65
+ $this->setNoticeMessageText($this->escapeHtml($this->getLastNotice()->getTitle()));
66
+ $this->setNoticeMessageUrl($this->escapeUrl($this->getLastNotice()->getUrl()));
67
 
68
  switch ($this->getLastNotice()->getSeverity()) {
69
  default:
app/code/core/Mage/Adminhtml/Block/Page.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Page/Footer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Page/Head.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Page/Header.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Page/Menu.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -275,4 +275,36 @@ class Mage_Adminhtml_Block_Page_Menu extends Mage_Adminhtml_Block_Template
275
  return Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME . '/'
276
  . $this->_url->getSecretKey($match[1], $match[2]);
277
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
275
  return Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME . '/'
276
  . $this->_url->getSecretKey($match[1], $match[2]);
277
  }
278
+
279
+ /**
280
+ * Get menu level HTML code
281
+ *
282
+ * @param array $menu
283
+ * @param int $level
284
+ * @return string
285
+ */
286
+ public function getMenuLevel($menu, $level = 0)
287
+ {
288
+ $html = '<ul ' . (!$level ? 'id="nav"' : '') . '>' . PHP_EOL;
289
+ foreach ($menu as $item) {
290
+ $html .= '<li ' . (!empty($item['children']) ? 'onmouseover="Element.addClassName(this,\'over\')" '
291
+ . 'onmouseout="Element.removeClassName(this,\'over\')"' : '') . ' class="'
292
+ . (!$level && !empty($item['active']) ? ' active' : '') . ' '
293
+ . (!empty($item['children']) ? ' parent' : '')
294
+ . (!empty($level) && !empty($item['last']) ? ' last' : '')
295
+ . ' level' . $level . '"> <a href="' . $item['url'] . '" '
296
+ . (!empty($item['title']) ? 'title="' . $item['title'] . '"' : '') . ' '
297
+ . (!empty($item['click']) ? 'onclick="' . $item['click'] . '"' : '') . ' class="'
298
+ . ($level === 0 && !empty($item['active']) ? 'active' : '') . '"><span>'
299
+ . $this->escapeHtml($item['label']) . '</span></a>' . PHP_EOL;
300
+
301
+ if (!empty($item['children'])) {
302
+ $html .= $this->getMenuLevel($item['children'], $level + 1);
303
+ }
304
+ $html .= '</li>' . PHP_EOL;
305
+ }
306
+ $html .= '</ul>' . PHP_EOL;
307
+
308
+ return $html;
309
+ }
310
  }
app/code/core/Mage/Adminhtml/Block/Page/Notices.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Editroles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Edituser.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Grid/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Role.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Useredit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Permissions_Tab_Useredit extends Mage_Adminhtml_Block_Widget_Form
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Permissions_Tab_Useredit extends Mage_Adminhtml_Block_Widget_Form
app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Userroles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Permissions_Tab_Userroles extends Mage_Adminhtml_Block_Widget_Tabs
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Permissions_Tab_Userroles extends Mage_Adminhtml_Block_Widget_Tabs
app/code/core/Mage/Adminhtml/Block/Permissions/User.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -42,4 +42,14 @@ class Mage_Adminhtml_Block_Permissions_User extends Mage_Adminhtml_Block_Widget_
42
  parent::__construct();
43
  }
44
 
 
 
 
 
 
 
 
 
 
 
45
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
42
  parent::__construct();
43
  }
44
 
45
+ /**
46
+ * Prepare output HTML
47
+ *
48
+ * @return string
49
+ */
50
+ protected function _toHtml()
51
+ {
52
+ Mage::dispatchEvent('permissions_user_html_before', array('block' => $this));
53
+ return parent::_toHtml();
54
+ }
55
  }
app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Permissions/Usernroles.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Permissions_UsernRoles extends Mage_Adminhtml_Block_Template
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Permissions_UsernRoles extends Mage_Adminhtml_Block_Template
app/code/core/Mage/Adminhtml/Block/Permissions/Users.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/List.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -68,7 +68,8 @@ class Mage_Adminhtml_Block_Poll_Edit_Tab_Form extends Mage_Adminhtml_Block_Widge
68
  'required' => true,
69
  'name' => 'store_ids[]',
70
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(),
71
- 'value' => Mage::registry('poll_data')->getStoreIds()
 
72
  ));
73
  }
74
  else {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
68
  'required' => true,
69
  'name' => 'store_ids[]',
70
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(),
71
+ 'value' => Mage::registry('poll_data')->getStoreIds(),
72
+ 'after_element_html' => Mage::getBlockSingleton('adminhtml/store_switcher')->getHintHtml()
73
  ));
74
  }
75
  else {
app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Poll/Poll.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Catalog.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php CHANGED
@@ -20,22 +20,22 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
- * description
29
- *
30
- * @category Mage
31
- * @category Mage
32
- * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
 
36
  class Mage_Adminhtml_Block_Promo_Catalog_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
37
  {
38
-
 
 
 
 
 
39
  public function __construct()
40
  {
41
  $this->_objectId = 'id';
@@ -43,38 +43,29 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit extends Mage_Adminhtml_Block_Widge
43
 
44
  parent::__construct();
45
 
46
- $this->_updateButton('save', 'label', Mage::helper('catalogrule')->__('Save Rule'));
47
- $this->_updateButton('delete', 'label', Mage::helper('catalogrule')->__('Delete Rule'));
48
-
49
- $rule = Mage::registry('current_promo_catalog_rule');
50
-
51
- if (!$rule->isDeleteable()) {
52
- $this->_removeButton('delete');
53
- }
54
 
55
- if (!$rule->isReadonly()) {
56
- $this->_addButton('save_apply', array(
57
- 'class'=>'save',
58
- 'label'=>Mage::helper('catalogrule')->__('Save and Apply'),
59
- 'onclick'=>"$('rule_auto_apply').value=1; editForm.submit()",
60
- ));
61
- $this->_addButton('save_and_continue', array(
62
- 'label' => Mage::helper('catalogrule')->__('Save and Continue Edit'),
63
- 'onclick' => 'saveAndContinueEdit()',
64
- 'class' => 'save'
65
- ), 10);
66
- $this->_formScripts[] = " function saveAndContinueEdit(){ editForm.submit($('edit_form').action + 'back/edit/') } ";
67
- } else {
68
- $this->_removeButton('reset');
69
- $this->_removeButton('save');
70
- }
71
  }
72
 
 
 
 
 
 
73
  public function getHeaderText()
74
  {
75
  $rule = Mage::registry('current_promo_catalog_rule');
76
  if ($rule->getRuleId()) {
77
- return Mage::helper('catalogrule')->__("Edit Rule '%s'", $this->htmlEscape($rule->getName()));
78
  }
79
  else {
80
  return Mage::helper('catalogrule')->__('New Rule');
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
+ * Catalog rule edit form block
 
 
 
 
 
29
  */
30
 
31
  class Mage_Adminhtml_Block_Promo_Catalog_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
32
  {
33
+ /**
34
+ * Initialize form
35
+ * Add standard buttons
36
+ * Add "Save and Apply" button
37
+ * Add "Save and Continue" button
38
+ */
39
  public function __construct()
40
  {
41
  $this->_objectId = 'id';
43
 
44
  parent::__construct();
45
 
46
+ $this->_addButton('save_apply', array(
47
+ 'class' => 'save',
48
+ 'label' => Mage::helper('catalogrule')->__('Save and Apply'),
49
+ 'onclick' => "$('rule_auto_apply').value=1; editForm.submit()",
50
+ ));
 
 
 
51
 
52
+ $this->_addButton('save_and_continue_edit', array(
53
+ 'class' => 'save',
54
+ 'label' => Mage::helper('catalogrule')->__('Save and Continue Edit'),
55
+ 'onclick' => 'editForm.submit($(\'edit_form\').action + \'back/edit/\')',
56
+ ), 10);
 
 
 
 
 
 
 
 
 
 
 
57
  }
58
 
59
+ /**
60
+ * Getter for form header text
61
+ *
62
+ * @return string
63
+ */
64
  public function getHeaderText()
65
  {
66
  $rule = Mage::registry('current_promo_catalog_rule');
67
  if ($rule->getRuleId()) {
68
+ return Mage::helper('catalogrule')->__("Edit Rule '%s'", $this->escapeHtml($rule->getName()));
69
  }
70
  else {
71
  return Mage::helper('catalogrule')->__('New Rule');
app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Js.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php CHANGED
@@ -20,17 +20,16 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
- * description
29
  *
30
- * @category Mage
31
- * @category Mage
32
- * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
  class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main
36
  extends Mage_Adminhtml_Block_Widget_Form
@@ -57,7 +56,7 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main
57
  }
58
 
59
  /**
60
- * Returns status flag about this tab can be showen or not
61
  *
62
  * @return true
63
  */
@@ -84,7 +83,9 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main
84
 
85
  $form->setHtmlIdPrefix('rule_');
86
 
87
- $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('catalogrule')->__('General Information')));
 
 
88
 
89
  $fieldset->addField('auto_apply', 'hidden', array(
90
  'name' => 'auto_apply',
@@ -107,7 +108,7 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main
107
  'name' => 'description',
108
  'label' => Mage::helper('catalogrule')->__('Description'),
109
  'title' => Mage::helper('catalogrule')->__('Description'),
110
- 'style' => 'width: 98%; height: 100px;',
111
  ));
112
 
113
  $fieldset->addField('is_active', 'select', array(
@@ -121,34 +122,23 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main
121
  ),
122
  ));
123
 
124
- if (!Mage::app()->isSingleStoreMode()) {
125
- $fieldset->addField('website_ids', 'multiselect', array(
126
- 'name' => 'website_ids[]',
 
 
 
 
 
 
 
127
  'label' => Mage::helper('catalogrule')->__('Websites'),
128
  'title' => Mage::helper('catalogrule')->__('Websites'),
129
- 'required' => true,
130
- 'values' => Mage::getSingleton('adminhtml/system_config_source_website')->toOptionArray(),
131
- ));
132
- }
133
- else {
134
- $fieldset->addField('website_ids', 'hidden', array(
135
- 'name' => 'website_ids[]',
136
- 'value' => Mage::app()->getStore(true)->getWebsiteId()
137
  ));
138
- $model->setWebsiteIds(Mage::app()->getStore(true)->getWebsiteId());
139
- }
140
-
141
- $customerGroups = Mage::getResourceModel('customer/group_collection')
142
- ->load()->toOptionArray();
143
-
144
- $found = false;
145
- foreach ($customerGroups as $group) {
146
- if ($group['value']==0) {
147
- $found = true;
148
- }
149
- }
150
- if (!$found) {
151
- array_unshift($customerGroups, array('value'=>0, 'label'=>Mage::helper('catalogrule')->__('NOT LOGGED IN')));
152
  }
153
 
154
  $fieldset->addField('customer_group_ids', 'multiselect', array(
@@ -156,7 +146,7 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main
156
  'label' => Mage::helper('catalogrule')->__('Customer Groups'),
157
  'title' => Mage::helper('catalogrule')->__('Customer Groups'),
158
  'required' => true,
159
- 'values' => $customerGroups,
160
  ));
161
 
162
  $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
+ * Catalog Rule General Information Tab
29
  *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
 
33
  */
34
  class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main
35
  extends Mage_Adminhtml_Block_Widget_Form
56
  }
57
 
58
  /**
59
+ * Returns status flag about this tab can be showed or not
60
  *
61
  * @return true
62
  */
83
 
84
  $form->setHtmlIdPrefix('rule_');
85
 
86
+ $fieldset = $form->addFieldset('base_fieldset',
87
+ array('legend '=> Mage::helper('catalogrule')->__('General Information'))
88
+ );
89
 
90
  $fieldset->addField('auto_apply', 'hidden', array(
91
  'name' => 'auto_apply',
108
  'name' => 'description',
109
  'label' => Mage::helper('catalogrule')->__('Description'),
110
  'title' => Mage::helper('catalogrule')->__('Description'),
111
+ 'style' => 'height: 100px;',
112
  ));
113
 
114
  $fieldset->addField('is_active', 'select', array(
122
  ),
123
  ));
124
 
125
+ if (Mage::app()->isSingleStoreMode()) {
126
+ $websiteId = Mage::app()->getStore(true)->getWebsiteId();
127
+ $fieldset->addField('website_ids', 'hidden', array(
128
+ 'name' => 'website_ids[]',
129
+ 'value' => $websiteId
130
+ ));
131
+ $model->setWebsiteIds($websiteId);
132
+ } else {
133
+ $field = $fieldset->addField('website_ids', 'multiselect', array(
134
+ 'name' => 'website_ids[]',
135
  'label' => Mage::helper('catalogrule')->__('Websites'),
136
  'title' => Mage::helper('catalogrule')->__('Websites'),
137
+ 'required' => true,
138
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getWebsiteValuesForForm()
 
 
 
 
 
 
139
  ));
140
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
141
+ $field->setRenderer($renderer);
 
 
 
 
 
 
 
 
 
 
 
 
142
  }
143
 
144
  $fieldset->addField('customer_group_ids', 'multiselect', array(
146
  'label' => Mage::helper('catalogrule')->__('Customer Groups'),
147
  'title' => Mage::helper('catalogrule')->__('Customer Groups'),
148
  'required' => true,
149
+ 'values' => Mage::getResourceModel('customer/group_collection')->toOptionArray()
150
  ));
151
 
152
  $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Grid.php CHANGED
@@ -20,21 +20,23 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
- * description
29
  *
30
- * @category Mage
31
- * @category Mage
32
- * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
  class Mage_Adminhtml_Block_Promo_Catalog_Grid extends Mage_Adminhtml_Block_Widget_Grid
36
  {
37
-
 
 
 
38
  public function __construct()
39
  {
40
  parent::__construct();
@@ -44,14 +46,29 @@ class Mage_Adminhtml_Block_Promo_Catalog_Grid extends Mage_Adminhtml_Block_Widge
44
  $this->setSaveParametersInSession(true);
45
  }
46
 
 
 
 
 
 
 
47
  protected function _prepareCollection()
48
  {
 
49
  $collection = Mage::getModel('catalogrule/rule')
50
  ->getResourceCollection();
 
51
  $this->setCollection($collection);
52
- return parent::_prepareCollection();
 
 
53
  }
54
 
 
 
 
 
 
55
  protected function _prepareColumns()
56
  {
57
  $this->addColumn('rule_id', array(
@@ -91,14 +108,34 @@ class Mage_Adminhtml_Block_Promo_Catalog_Grid extends Mage_Adminhtml_Block_Widge
91
  'index' => 'is_active',
92
  'type' => 'options',
93
  'options' => array(
94
- 1 => 'Active',
95
- 0 => 'Inactive',
96
  ),
97
  ));
98
 
99
- return parent::_prepareColumns();
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  }
101
 
 
 
 
 
 
 
 
102
  public function getRowUrl($row)
103
  {
104
  return $this->getUrl('*/*/edit', array('id' => $row->getRuleId()));
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
+ * Catalog Rules Grid
29
  *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
 
33
  */
34
  class Mage_Adminhtml_Block_Promo_Catalog_Grid extends Mage_Adminhtml_Block_Widget_Grid
35
  {
36
+ /**
37
+ * Initialize grid
38
+ * Set sort settings
39
+ */
40
  public function __construct()
41
  {
42
  parent::__construct();
46
  $this->setSaveParametersInSession(true);
47
  }
48
 
49
+ /**
50
+ * Add websites to catalog rules collection
51
+ * Set collection
52
+ *
53
+ * @return Mage_Adminhtml_Block_Promo_Catalog_Grid
54
+ */
55
  protected function _prepareCollection()
56
  {
57
+ /** @var $collection Mage_CatalogRule_Model_Mysql4_Rule_Collection */
58
  $collection = Mage::getModel('catalogrule/rule')
59
  ->getResourceCollection();
60
+ $collection->addWebsitesToResult();
61
  $this->setCollection($collection);
62
+
63
+ parent::_prepareCollection();
64
+ return $this;
65
  }
66
 
67
+ /**
68
+ * Add grid columns
69
+ *
70
+ * @return Mage_Adminhtml_Block_Promo_Catalog_Grid
71
+ */
72
  protected function _prepareColumns()
73
  {
74
  $this->addColumn('rule_id', array(
108
  'index' => 'is_active',
109
  'type' => 'options',
110
  'options' => array(
111
+ 1 => Mage::helper('catalogrule')->__('Active'),
112
+ 0 => Mage::helper('catalogrule')->__('Inactive')
113
  ),
114
  ));
115
 
116
+ if (!Mage::app()->isSingleStoreMode()) {
117
+ $this->addColumn('rule_website', array(
118
+ 'header' => Mage::helper('catalogrule')->__('Website'),
119
+ 'align' =>'left',
120
+ 'index' => 'website_ids',
121
+ 'type' => 'options',
122
+ 'sortable' => false,
123
+ 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(),
124
+ 'width' => 200,
125
+ ));
126
+ }
127
+
128
+ parent::_prepareColumns();
129
+ return $this;
130
  }
131
 
132
+ /**
133
+ * Retrieve row click URL
134
+ *
135
+ * @param Varien_Object $row
136
+ *
137
+ * @return string
138
+ */
139
  public function getRowUrl($row)
140
  {
141
  return $this->getUrl('*/*/edit', array('id' => $row->getRuleId()));
app/code/core/Mage/Adminhtml/Block/Promo/Quote.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php CHANGED
@@ -20,22 +20,22 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
- * description
29
- *
30
- * @category Mage
31
- * @category Mage
32
- * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
 
36
  class Mage_Adminhtml_Block_Promo_Quote_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
37
  {
38
 
 
 
 
 
 
39
  public function __construct()
40
  {
41
  $this->_objectId = 'id';
@@ -43,41 +43,34 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit extends Mage_Adminhtml_Block_Widget_
43
 
44
  parent::__construct();
45
 
46
- $this->_updateButton('save', 'label', Mage::helper('salesrule')->__('Save Rule'));
47
- $this->_updateButton('delete', 'label', Mage::helper('salesrule')->__('Delete Rule'));
48
-
49
- $rule = Mage::registry('current_promo_quote_rule');
50
-
51
- if (!$rule->isDeleteable()) {
52
- $this->_removeButton('delete');
53
- }
54
-
55
- if ($rule->isReadonly()) {
56
- $this->_removeButton('save');
57
- $this->_removeButton('reset');
58
- } else {
59
- $this->_addButton('save_and_continue', array(
60
- 'label' => Mage::helper('salesrule')->__('Save and Continue Edit'),
61
- 'onclick' => 'saveAndContinueEdit()',
62
- 'class' => 'save'
63
- ), 10);
64
- $this->_formScripts[] = " function saveAndContinueEdit(){ editForm.submit($('edit_form').action + 'back/edit/') } ";
65
- }
66
-
67
- #$this->setTemplate('promo/quote/edit.phtml');
68
  }
69
 
 
 
 
 
 
70
  public function getHeaderText()
71
  {
72
  $rule = Mage::registry('current_promo_quote_rule');
73
  if ($rule->getRuleId()) {
74
- return Mage::helper('salesrule')->__("Edit Rule '%s'", $this->htmlEscape($rule->getName()));
75
  }
76
  else {
77
  return Mage::helper('salesrule')->__('New Rule');
78
  }
79
  }
80
 
 
 
 
 
 
81
  public function getProductsJson()
82
  {
83
  return '{}';
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
+ * Shopping cart rule edit form block
 
 
 
 
 
29
  */
30
 
31
  class Mage_Adminhtml_Block_Promo_Quote_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
32
  {
33
 
34
+ /**
35
+ * Initialize form
36
+ * Add standard buttons
37
+ * Add "Save and Continue" button
38
+ */
39
  public function __construct()
40
  {
41
  $this->_objectId = 'id';
43
 
44
  parent::__construct();
45
 
46
+ $this->_addButton('save_and_continue_edit', array(
47
+ 'class' => 'save',
48
+ 'label' => Mage::helper('salesrule')->__('Save and Continue Edit'),
49
+ 'onclick' => 'editForm.submit($(\'edit_form\').action + \'back/edit/\')',
50
+ ), 10);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
52
 
53
+ /**
54
+ * Getter for form header text
55
+ *
56
+ * @return string
57
+ */
58
  public function getHeaderText()
59
  {
60
  $rule = Mage::registry('current_promo_quote_rule');
61
  if ($rule->getRuleId()) {
62
+ return Mage::helper('salesrule')->__("Edit Rule '%s'", $this->escapeHtml($rule->getName()));
63
  }
64
  else {
65
  return Mage::helper('salesrule')->__('New Rule');
66
  }
67
  }
68
 
69
+ /**
70
+ * Retrieve products JSON
71
+ *
72
+ * @return string
73
+ */
74
  public function getProductsJson()
75
  {
76
  return '{}';
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * "Manage Coupons Codes" Tab
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons
35
+ extends Mage_Adminhtml_Block_Text_List
36
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
37
+ {
38
+ /**
39
+ * Prepare content for tab
40
+ *
41
+ * @return string
42
+ */
43
+ public function getTabLabel()
44
+ {
45
+ return Mage::helper('salesrule')->__('Manage Coupon Codes');
46
+ }
47
+
48
+ /**
49
+ * Prepare title for tab
50
+ *
51
+ * @return string
52
+ */
53
+ public function getTabTitle()
54
+ {
55
+ return Mage::helper('salesrule')->__('Manage Coupon Codes');
56
+ }
57
+
58
+ /**
59
+ * Returns status flag about this tab can be shown or not
60
+ *
61
+ * @return bool
62
+ */
63
+ public function canShowTab()
64
+ {
65
+ return $this->_isEditing();
66
+ }
67
+
68
+ /**
69
+ * Returns status flag about this tab hidden or not
70
+ *
71
+ * @return bool
72
+ */
73
+ public function isHidden()
74
+ {
75
+ return !$this->_isEditing();
76
+ }
77
+
78
+ /**
79
+ * Check whether we edit existing rule or adding new one
80
+ *
81
+ * @return bool
82
+ */
83
+ protected function _isEditing()
84
+ {
85
+ $priceRule = Mage::registry('current_promo_quote_rule');
86
+ return !is_null($priceRule->getRuleId());
87
+ }
88
+ }
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Coupons generation parameters form
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Form
35
+ extends Mage_Adminhtml_Block_Widget_Form
36
+ {
37
+ /**
38
+ * Prepare coupon codes generation parameters form
39
+ *
40
+ * @return Mage_Adminhtml_Block_Widget_Form
41
+ */
42
+ protected function _prepareForm()
43
+ {
44
+ $form = new Varien_Data_Form();
45
+
46
+ /**
47
+ * @var Mage_SalesRule_Helper_Coupon $couponHelper
48
+ */
49
+ $couponHelper = Mage::helper('salesrule/coupon');
50
+
51
+ $model = Mage::registry('current_promo_quote_rule');
52
+ $ruleId = $model->getId();
53
+
54
+ $form->setHtmlIdPrefix('coupons_');
55
+
56
+ $gridBlock = $this->getLayout()->getBlock('promo_quote_edit_tab_coupons_grid');
57
+ $gridBlockJsObject = '';
58
+ if ($gridBlock) {
59
+ $gridBlockJsObject = $gridBlock->getJsObjectName();
60
+ }
61
+
62
+ $fieldset = $form->addFieldset('information_fieldset', array('legend'=>Mage::helper('salesrule')->__('Coupons Information')));
63
+ $fieldset->addClass('ignore-validate');
64
+
65
+ $fieldset->addField('rule_id', 'hidden', array(
66
+ 'name' => 'rule_id',
67
+ 'value' => $ruleId
68
+ ));
69
+
70
+ $fieldset->addField('qty', 'text', array(
71
+ 'name' => 'qty',
72
+ 'label' => Mage::helper('salesrule')->__('Coupon Qty'),
73
+ 'title' => Mage::helper('salesrule')->__('Coupon Qty'),
74
+ 'required' => true,
75
+ 'class' => 'validate-digits validate-greater-than-zero'
76
+ ));
77
+
78
+ $fieldset->addField('length', 'text', array(
79
+ 'name' => 'length',
80
+ 'label' => Mage::helper('salesrule')->__('Code Length'),
81
+ 'title' => Mage::helper('salesrule')->__('Code Length'),
82
+ 'required' => true,
83
+ 'note' => Mage::helper('salesrule')->__('Excluding prefix, suffix and separators.'),
84
+ 'value' => $couponHelper->getDefaultLength(),
85
+ 'class' => 'validate-digits validate-greater-than-zero'
86
+ ));
87
+
88
+ $fieldset->addField('format', 'select', array(
89
+ 'label' => Mage::helper('salesrule')->__('Code Format'),
90
+ 'name' => 'format',
91
+ 'options' => $couponHelper->getFormatsList(),
92
+ 'required' => true,
93
+ 'value' => $couponHelper->getDefaultFormat()
94
+ ));
95
+
96
+ $fieldset->addField('prefix', 'text', array(
97
+ 'name' => 'prefix',
98
+ 'label' => Mage::helper('salesrule')->__('Code Prefix'),
99
+ 'title' => Mage::helper('salesrule')->__('Code Prefix'),
100
+ 'value' => $couponHelper->getDefaultPrefix()
101
+ ));
102
+
103
+ $fieldset->addField('suffix', 'text', array(
104
+ 'name' => 'suffix',
105
+ 'label' => Mage::helper('salesrule')->__('Code Suffix'),
106
+ 'title' => Mage::helper('salesrule')->__('Code Suffix'),
107
+ 'value' => $couponHelper->getDefaultSuffix()
108
+ ));
109
+
110
+ $fieldset->addField('dash', 'text', array(
111
+ 'name' => 'dash',
112
+ 'label' => Mage::helper('salesrule')->__('Dash Every X Characters'),
113
+ 'title' => Mage::helper('salesrule')->__('Dash Every X Characters'),
114
+ 'note' => Mage::helper('salesrule')->__('If empty no separation.'),
115
+ 'value' => $couponHelper->getDefaultDashInterval(),
116
+ 'class' => 'validate-digits'
117
+ ));
118
+
119
+ $idPrefix = $form->getHtmlIdPrefix();
120
+ $generateUrl = $this->getGenerateUrl();
121
+
122
+ $fieldset->addField('generate_button', 'note', array(
123
+ 'text' => $this->getButtonHtml(
124
+ Mage::helper('salesrule')->__('Generate'),
125
+ "generateCouponCodes('{$idPrefix}' ,'{$generateUrl}', '{$gridBlockJsObject}')",
126
+ 'generate'
127
+ )
128
+ ));
129
+
130
+ $this->setForm($form);
131
+
132
+ Mage::dispatchEvent('adminhtml_promo_quote_edit_tab_coupons_form_prepare_form', array('form' => $form));
133
+
134
+ return parent::_prepareForm();
135
+ }
136
+
137
+ /**
138
+ * Retrieve URL to Generate Action
139
+ *
140
+ * @return string
141
+ */
142
+ public function getGenerateUrl()
143
+ {
144
+ return $this->getUrl('*/*/generate');
145
+ }
146
+ }
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Coupon codes grid
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid extends Mage_Adminhtml_Block_Widget_Grid
35
+ {
36
+ /**
37
+ * Constructor
38
+ */
39
+ public function __construct()
40
+ {
41
+ parent::__construct();
42
+ $this->setId('couponCodesGrid');
43
+ $this->setUseAjax(true);
44
+ }
45
+
46
+ /**
47
+ * Prepare collection for grid
48
+ *
49
+ * @return Mage_Adminhtml_Block_Widget_Grid
50
+ */
51
+ protected function _prepareCollection()
52
+ {
53
+ $priceRule = Mage::registry('current_promo_quote_rule');
54
+
55
+ /**
56
+ * @var Mage_SalesRule_Model_Resource_Coupon_Collection $collection
57
+ */
58
+ $collection = Mage::getResourceModel('salesrule/coupon_collection')
59
+ ->addRuleToFilter($priceRule)
60
+ ->addGeneratedCouponsFilter();
61
+
62
+ $this->setCollection($collection);
63
+
64
+ return parent::_prepareCollection();
65
+ }
66
+
67
+ /**
68
+ * Define grid columns
69
+ *
70
+ * @return Mage_Adminhtml_Block_Widget_Grid
71
+ */
72
+ protected function _prepareColumns()
73
+ {
74
+ $this->addColumn('code', array(
75
+ 'header' => Mage::helper('salesrule')->__('Coupon Code'),
76
+ 'index' => 'code'
77
+ ));
78
+
79
+ $this->addColumn('created_at', array(
80
+ 'header' => Mage::helper('salesrule')->__('Created On'),
81
+ 'index' => 'created_at',
82
+ 'type' => 'datetime',
83
+ 'align' => 'center',
84
+ 'width' => '160'
85
+ ));
86
+
87
+ $this->addColumn('used', array(
88
+ 'header' => Mage::helper('salesrule')->__('Used'),
89
+ 'index' => 'times_used',
90
+ 'width' => '100',
91
+ 'type' => 'options',
92
+ 'options' => array(
93
+ Mage::helper('adminhtml')->__('No'),
94
+ Mage::helper('adminhtml')->__('Yes')
95
+ ),
96
+ 'renderer' => 'adminhtml/promo_quote_edit_tab_coupons_grid_column_renderer_used',
97
+ 'filter_condition_callback' => array(
98
+ Mage::getResourceModel('salesrule/coupon_collection'), 'addIsUsedFilterCallback'
99
+ )
100
+ ));
101
+
102
+ $this->addColumn('times_used', array(
103
+ 'header' => Mage::helper('salesrule')->__('Times Used'),
104
+ 'index' => 'times_used',
105
+ 'width' => '50',
106
+ 'type' => 'number',
107
+ ));
108
+
109
+ $this->addExportType('*/*/exportCouponsCsv', Mage::helper('customer')->__('CSV'));
110
+ $this->addExportType('*/*/exportCouponsXml', Mage::helper('customer')->__('Excel XML'));
111
+ return parent::_prepareColumns();
112
+ }
113
+
114
+ /**
115
+ * Configure grid mass actions
116
+ *
117
+ * @return Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid
118
+ */
119
+ protected function _prepareMassaction()
120
+ {
121
+ $this->setMassactionIdField('coupon_id');
122
+ $this->getMassactionBlock()->setFormFieldName('ids');
123
+ $this->getMassactionBlock()->setUseAjax(true);
124
+ $this->getMassactionBlock()->setHideFormElement(true);
125
+
126
+ $this->getMassactionBlock()->addItem('delete', array(
127
+ 'label'=> Mage::helper('adminhtml')->__('Delete'),
128
+ 'url' => $this->getUrl('*/*/couponsMassDelete', array('_current' => true)),
129
+ 'confirm' => Mage::helper('salesrule')->__('Are you sure you want to delete the selected coupon(s)?'),
130
+ 'complete' => 'refreshCouponCodesGrid'
131
+ ));
132
+
133
+ return $this;
134
+ }
135
+
136
+ /**
137
+ * Get grid url
138
+ *
139
+ * @return string
140
+ */
141
+ public function getGridUrl()
142
+ {
143
+ return $this->getUrl('*/*/couponsGrid', array('_current'=> true));
144
+ }
145
+ }
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Coupon codes grid "Used" column renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid_Column_Renderer_Used
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
36
+ {
37
+ public function render(Varien_Object $row)
38
+ {
39
+ $value = (int)$row->getData($this->getColumn()->getIndex());
40
+ return empty($value) ? Mage::helper('adminhtml')->__('No') : Mage::helper('adminhtml')->__('Yes');
41
+ }
42
+ }
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -89,6 +89,9 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Labels
89
  'legend' => Mage::helper('salesrule')->__('Store View Specific Labels'),
90
  'table_class' => 'form-list stores-tree',
91
  ));
 
 
 
92
  foreach (Mage::app()->getWebsites() as $website) {
93
  $fieldset->addField("w_{$website->getId()}_label", 'note', array(
94
  'label' => $website->getName(),
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
89
  'legend' => Mage::helper('salesrule')->__('Store View Specific Labels'),
90
  'table_class' => 'form-list stores-tree',
91
  ));
92
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset');
93
+ $fieldset->setRenderer($renderer);
94
+
95
  foreach (Mage::app()->getWebsites() as $website) {
96
  $fieldset->addField("w_{$website->getId()}_label", 'note', array(
97
  'label' => $website->getName(),
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php CHANGED
@@ -20,17 +20,16 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
- * description
29
  *
30
- * @category Mage
31
- * @category Mage
32
- * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
  class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
36
  extends Mage_Adminhtml_Block_Widget_Form
@@ -57,7 +56,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
57
  }
58
 
59
  /**
60
- * Returns status flag about this tab can be showen or not
61
  *
62
  * @return true
63
  */
@@ -80,12 +79,12 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
80
  {
81
  $model = Mage::registry('current_promo_quote_rule');
82
 
83
- //$form = new Varien_Data_Form(array('id' => 'edit_form1', 'action' => $this->getData('action'), 'method' => 'post'));
84
  $form = new Varien_Data_Form();
85
-
86
  $form->setHtmlIdPrefix('rule_');
87
 
88
- $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('salesrule')->__('General Information')));
 
 
89
 
90
  if ($model->getId()) {
91
  $fieldset->addField('rule_id', 'hidden', array(
@@ -108,7 +107,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
108
  'name' => 'description',
109
  'label' => Mage::helper('salesrule')->__('Description'),
110
  'title' => Mage::helper('salesrule')->__('Description'),
111
- 'style' => 'width: 98%; height: 100px;',
112
  ));
113
 
114
  $fieldset->addField('is_active', 'select', array(
@@ -121,39 +120,43 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
121
  '0' => Mage::helper('salesrule')->__('Inactive'),
122
  ),
123
  ));
 
124
  if (!$model->getId()) {
125
  $model->setData('is_active', '1');
126
  }
127
 
128
-
129
- if (!Mage::app()->isSingleStoreMode()) {
130
- $fieldset->addField('website_ids', 'multiselect', array(
131
- 'name' => 'website_ids[]',
132
- 'label' => Mage::helper('catalogrule')->__('Websites'),
133
- 'title' => Mage::helper('catalogrule')->__('Websites'),
134
- 'required' => true,
135
- 'values' => Mage::getSingleton('adminhtml/system_config_source_website')->toOptionArray(),
136
- ));
137
- }
138
- else {
139
  $fieldset->addField('website_ids', 'hidden', array(
140
- 'name' => 'website_ids[]',
141
- 'value' => Mage::app()->getStore(true)->getWebsiteId()
142
  ));
143
- $model->setWebsiteIds(Mage::app()->getStore(true)->getWebsiteId());
 
 
 
 
 
 
 
 
 
 
144
  }
145
 
146
- $customerGroups = Mage::getResourceModel('customer/group_collection')
147
- ->load()->toOptionArray();
148
-
149
  $found = false;
 
150
  foreach ($customerGroups as $group) {
151
  if ($group['value']==0) {
152
  $found = true;
153
  }
154
  }
155
  if (!$found) {
156
- array_unshift($customerGroups, array('value'=>0, 'label'=>Mage::helper('salesrule')->__('NOT LOGGED IN')));
 
 
 
157
  }
158
 
159
  $fieldset->addField('customer_group_ids', 'multiselect', array(
@@ -161,7 +164,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
161
  'label' => Mage::helper('salesrule')->__('Customer Groups'),
162
  'title' => Mage::helper('salesrule')->__('Customer Groups'),
163
  'required' => true,
164
- 'values' => $customerGroups,
165
  ));
166
 
167
  $couponTypeFiled = $fieldset->addField('coupon_type', 'select', array(
@@ -177,6 +180,18 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
177
  'required' => true,
178
  ));
179
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  $usesPerCouponFiled = $fieldset->addField('uses_per_coupon', 'text', array(
181
  'name' => 'uses_per_coupon',
182
  'label' => Mage::helper('salesrule')->__('Uses per Coupon'),
@@ -227,6 +242,8 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
227
 
228
  $form->setValues($model->getData());
229
 
 
 
230
  if ($model->isReadonly()) {
231
  foreach ($fieldset->getElements() as $element) {
232
  $element->setReadonly(true, true);
@@ -241,11 +258,16 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
241
  $this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
242
  ->addFieldMap($couponTypeFiled->getHtmlId(), $couponTypeFiled->getName())
243
  ->addFieldMap($couponCodeFiled->getHtmlId(), $couponCodeFiled->getName())
 
244
  ->addFieldMap($usesPerCouponFiled->getHtmlId(), $usesPerCouponFiled->getName())
245
  ->addFieldDependence(
246
  $couponCodeFiled->getName(),
247
  $couponTypeFiled->getName(),
248
  Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC)
 
 
 
 
249
  ->addFieldDependence(
250
  $usesPerCouponFiled->getName(),
251
  $couponTypeFiled->getName(),
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
+ * Shopping Cart Price Rule General Information Tab
29
  *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
 
33
  */
34
  class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main
35
  extends Mage_Adminhtml_Block_Widget_Form
56
  }
57
 
58
  /**
59
+ * Returns status flag about this tab can be showed or not
60
  *
61
  * @return true
62
  */
79
  {
80
  $model = Mage::registry('current_promo_quote_rule');
81
 
 
82
  $form = new Varien_Data_Form();
 
83
  $form->setHtmlIdPrefix('rule_');
84
 
85
+ $fieldset = $form->addFieldset('base_fieldset',
86
+ array('legend' => Mage::helper('salesrule')->__('General Information'))
87
+ );
88
 
89
  if ($model->getId()) {
90
  $fieldset->addField('rule_id', 'hidden', array(
107
  'name' => 'description',
108
  'label' => Mage::helper('salesrule')->__('Description'),
109
  'title' => Mage::helper('salesrule')->__('Description'),
110
+ 'style' => 'height: 100px;',
111
  ));
112
 
113
  $fieldset->addField('is_active', 'select', array(
120
  '0' => Mage::helper('salesrule')->__('Inactive'),
121
  ),
122
  ));
123
+
124
  if (!$model->getId()) {
125
  $model->setData('is_active', '1');
126
  }
127
 
128
+ if (Mage::app()->isSingleStoreMode()) {
129
+ $websiteId = Mage::app()->getStore(true)->getWebsiteId();
 
 
 
 
 
 
 
 
 
130
  $fieldset->addField('website_ids', 'hidden', array(
131
+ 'name' => 'website_ids[]',
132
+ 'value' => $websiteId
133
  ));
134
+ $model->setWebsiteIds($websiteId);
135
+ } else {
136
+ $field = $fieldset->addField('website_ids', 'multiselect', array(
137
+ 'name' => 'website_ids[]',
138
+ 'label' => Mage::helper('salesrule')->__('Websites'),
139
+ 'title' => Mage::helper('salesrule')->__('Websites'),
140
+ 'required' => true,
141
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getWebsiteValuesForForm()
142
+ ));
143
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
144
+ $field->setRenderer($renderer);
145
  }
146
 
147
+ $customerGroups = Mage::getResourceModel('customer/group_collection')->load()->toOptionArray();
 
 
148
  $found = false;
149
+
150
  foreach ($customerGroups as $group) {
151
  if ($group['value']==0) {
152
  $found = true;
153
  }
154
  }
155
  if (!$found) {
156
+ array_unshift($customerGroups, array(
157
+ 'value' => 0,
158
+ 'label' => Mage::helper('salesrule')->__('NOT LOGGED IN'))
159
+ );
160
  }
161
 
162
  $fieldset->addField('customer_group_ids', 'multiselect', array(
164
  'label' => Mage::helper('salesrule')->__('Customer Groups'),
165
  'title' => Mage::helper('salesrule')->__('Customer Groups'),
166
  'required' => true,
167
+ 'values' => Mage::getResourceModel('customer/group_collection')->toOptionArray(),
168
  ));
169
 
170
  $couponTypeFiled = $fieldset->addField('coupon_type', 'select', array(
180
  'required' => true,
181
  ));
182
 
183
+ $autoGenerationCheckbox = $fieldset->addField('use_auto_generation', 'checkbox', array(
184
+ 'name' => 'use_auto_generation',
185
+ 'label' => Mage::helper('salesrule')->__('Use Auto Generation'),
186
+ 'note' => Mage::helper('salesrule')->__('If you select and save the rule you will be able to generate multiple coupon codes.'),
187
+ 'onclick' => 'handleCouponsTabContentActivity()',
188
+ 'checked' => (int)$model->getUseAutoGeneration() > 0 ? 'checked' : ''
189
+ ));
190
+
191
+ $autoGenerationCheckbox->setRenderer(
192
+ $this->getLayout()->createBlock('adminhtml/promo_quote_edit_tab_main_renderer_checkbox')
193
+ );
194
+
195
  $usesPerCouponFiled = $fieldset->addField('uses_per_coupon', 'text', array(
196
  'name' => 'uses_per_coupon',
197
  'label' => Mage::helper('salesrule')->__('Uses per Coupon'),
242
 
243
  $form->setValues($model->getData());
244
 
245
+ $autoGenerationCheckbox->setValue(1);
246
+
247
  if ($model->isReadonly()) {
248
  foreach ($fieldset->getElements() as $element) {
249
  $element->setReadonly(true, true);
258
  $this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
259
  ->addFieldMap($couponTypeFiled->getHtmlId(), $couponTypeFiled->getName())
260
  ->addFieldMap($couponCodeFiled->getHtmlId(), $couponCodeFiled->getName())
261
+ ->addFieldMap($autoGenerationCheckbox->getHtmlId(), $autoGenerationCheckbox->getName())
262
  ->addFieldMap($usesPerCouponFiled->getHtmlId(), $usesPerCouponFiled->getName())
263
  ->addFieldDependence(
264
  $couponCodeFiled->getName(),
265
  $couponTypeFiled->getName(),
266
  Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC)
267
+ ->addFieldDependence(
268
+ $autoGenerationCheckbox->getName(),
269
+ $couponTypeFiled->getName(),
270
+ Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC)
271
  ->addFieldDependence(
272
  $usesPerCouponFiled->getName(),
273
  $couponTypeFiled->getName(),
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Renderer for specific checkbox that is used on Rule Information tab in Shopping cart price rules
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main_Renderer_Checkbox
35
+ extends Mage_Adminhtml_Block_Abstract
36
+ implements Varien_Data_Form_Element_Renderer_Interface
37
+ {
38
+ /**
39
+ * Checkbox render function
40
+ *
41
+ * @param Varien_Data_Form_Element_Abstract $element
42
+ * @return string
43
+ */
44
+ public function render(Varien_Data_Form_Element_Abstract $element)
45
+ {
46
+ $checkbox = new Varien_Data_Form_Element_Checkbox($element->getData());
47
+ $checkbox->setForm($element->getForm());
48
+
49
+ $elementHtml = $checkbox->getElementHtml() . sprintf(
50
+ '<label for="%s"><b>%s</b></label><p class="note">%s</p>',
51
+ $element->getHtmlId(), $element->getLabel(), $element->getNote()
52
+ );
53
+ $html = '<td class="label">&nbsp;</td>';
54
+ $html .= '<td class="value">' . $elementHtml . '</td>';
55
+
56
+ return $html;
57
+ }
58
+
59
+ }
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php CHANGED
@@ -20,21 +20,23 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
- * description
29
  *
30
- * @category Mage
31
- * @category Mage
32
- * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
  class Mage_Adminhtml_Block_Promo_Quote_Grid extends Mage_Adminhtml_Block_Widget_Grid
36
  {
37
-
 
 
 
38
  public function __construct()
39
  {
40
  parent::__construct();
@@ -44,14 +46,29 @@ class Mage_Adminhtml_Block_Promo_Quote_Grid extends Mage_Adminhtml_Block_Widget_
44
  $this->setSaveParametersInSession(true);
45
  }
46
 
 
 
 
 
 
 
47
  protected function _prepareCollection()
48
  {
 
49
  $collection = Mage::getModel('salesrule/rule')
50
  ->getResourceCollection();
 
51
  $this->setCollection($collection);
52
- return parent::_prepareCollection();
 
 
53
  }
54
 
 
 
 
 
 
55
  protected function _prepareColumns()
56
  {
57
  $this->addColumn('rule_id', array(
@@ -103,15 +120,36 @@ class Mage_Adminhtml_Block_Promo_Quote_Grid extends Mage_Adminhtml_Block_Widget_
103
  ),
104
  ));
105
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  $this->addColumn('sort_order', array(
107
  'header' => Mage::helper('salesrule')->__('Priority'),
108
  'align' => 'right',
109
  'index' => 'sort_order',
 
110
  ));
111
 
112
- return parent::_prepareColumns();
 
113
  }
114
 
 
 
 
 
 
 
 
115
  public function getRowUrl($row)
116
  {
117
  return $this->getUrl('*/*/edit', array('id' => $row->getRuleId()));
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
+ * Shopping Cart Rules Grid
29
  *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
 
33
  */
34
  class Mage_Adminhtml_Block_Promo_Quote_Grid extends Mage_Adminhtml_Block_Widget_Grid
35
  {
36
+ /**
37
+ * Initialize grid
38
+ * Set sort settings
39
+ */
40
  public function __construct()
41
  {
42
  parent::__construct();
46
  $this->setSaveParametersInSession(true);
47
  }
48
 
49
+ /**
50
+ * Add websites to sales rules collection
51
+ * Set collection
52
+ *
53
+ * @return Mage_Adminhtml_Block_Promo_Quote_Grid
54
+ */
55
  protected function _prepareCollection()
56
  {
57
+ /** @var $collection Mage_SalesRule_Model_Mysql4_Rule_Collection */
58
  $collection = Mage::getModel('salesrule/rule')
59
  ->getResourceCollection();
60
+ $collection->addWebsitesToResult();
61
  $this->setCollection($collection);
62
+
63
+ parent::_prepareCollection();
64
+ return $this;
65
  }
66
 
67
+ /**
68
+ * Add grid columns
69
+ *
70
+ * @return Mage_Adminhtml_Block_Promo_Quote_Grid
71
+ */
72
  protected function _prepareColumns()
73
  {
74
  $this->addColumn('rule_id', array(
120
  ),
121
  ));
122
 
123
+ if (!Mage::app()->isSingleStoreMode()) {
124
+ $this->addColumn('rule_website', array(
125
+ 'header' => Mage::helper('salesrule')->__('Website'),
126
+ 'align' =>'left',
127
+ 'index' => 'website_ids',
128
+ 'type' => 'options',
129
+ 'sortable' => false,
130
+ 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(),
131
+ 'width' => 200,
132
+ ));
133
+ }
134
+
135
  $this->addColumn('sort_order', array(
136
  'header' => Mage::helper('salesrule')->__('Priority'),
137
  'align' => 'right',
138
  'index' => 'sort_order',
139
+ 'width' => 100,
140
  ));
141
 
142
+ parent::_prepareColumns();
143
+ return $this;
144
  }
145
 
146
+ /**
147
+ * Retrieve row click URL
148
+ *
149
+ * @param Varien_Object $row
150
+ *
151
+ * @return string
152
+ */
153
  public function getRowUrl($row)
154
  {
155
  return $this->getUrl('*/*/edit', array('id' => $row->getRuleId()));
app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -103,6 +103,10 @@ class Mage_Adminhtml_Block_Promo_Widget_Chooser extends Mage_Adminhtml_Block_Wid
103
  $collection = Mage::getModel('salesrule/rule')->getResourceCollection();
104
  $this->setCollection($collection);
105
 
 
 
 
 
106
  return parent::_prepareCollection();
107
  }
108
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
103
  $collection = Mage::getModel('salesrule/rule')->getResourceCollection();
104
  $this->setCollection($collection);
105
 
106
+ Mage::dispatchEvent('adminhtml_block_promo_widget_chooser_prepare_collection', array(
107
+ 'collection' => $collection
108
+ ));
109
+
110
  return parent::_prepareCollection();
111
  }
112
 
app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Rating/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Rating/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -34,32 +34,33 @@
34
 
35
  class Mage_Adminhtml_Block_Rating_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
36
  {
 
 
 
 
 
37
  protected function _prepareForm()
38
  {
39
  $form = new Varien_Data_Form();
40
  $this->setForm($form);
41
- $defaultStore = Mage::app()->getStore(0);
42
 
43
  $fieldset = $form->addFieldset('rating_form', array(
44
  'legend'=>Mage::helper('rating')->__('Rating Title')
45
  ));
46
 
47
  $fieldset->addField('rating_code', 'text', array(
48
- 'name' => 'rating_code',
49
- 'label' => Mage::helper('rating')->__('Default Value'),
50
- 'class' => 'required-entry',
51
- 'required' => true,
52
-
53
  ));
54
 
55
- // if (!Mage::app()->isSingleStoreMode()) {
56
- foreach(Mage::getSingleton('adminhtml/system_store')->getStoreCollection() as $store) {
57
- $fieldset->addField('rating_code_' . $store->getId(), 'text', array(
58
- 'label' => $store->getName(),
59
- 'name' => 'rating_codes['. $store->getId() .']',
60
- ));
61
- }
62
- // }
63
 
64
  if (Mage::getSingleton('adminhtml/session')->getRatingData()) {
65
  $form->setValues(Mage::getSingleton('adminhtml/session')->getRatingData());
@@ -68,8 +69,7 @@ class Mage_Adminhtml_Block_Rating_Edit_Tab_Form extends Mage_Adminhtml_Block_Wid
68
  $this->_setRatingCodes($data['rating_codes']);
69
  }
70
  Mage::getSingleton('adminhtml/session')->setRatingData(null);
71
- }
72
- elseif (Mage::registry('rating_data')) {
73
  $form->setValues(Mage::registry('rating_data')->getData());
74
  if (Mage::registry('rating_data')->getRatingCodes()) {
75
  $this->_setRatingCodes(Mage::registry('rating_data')->getRatingCodes());
@@ -85,45 +85,44 @@ class Mage_Adminhtml_Block_Rating_Edit_Tab_Form extends Mage_Adminhtml_Block_Wid
85
  $i = 1;
86
  foreach ($collection->getItems() as $item) {
87
  $fieldset->addField('option_code_' . $item->getId() , 'hidden', array(
88
- 'required' => true,
89
- 'name' => 'option_title[' . $item->getId() . ']',
90
- 'value' => ($item->getCode()) ? $item->getCode() : $i,
91
  ));
92
 
93
  $i ++;
94
  }
95
- }
96
- else {
97
- for ($i=1; $i<=5; $i++ ) {
98
  $fieldset->addField('option_code_' . $i, 'hidden', array(
99
- 'required' => true,
100
- 'name' => 'option_title[add_' . $i . ']',
101
- 'value' => $i,
102
  ));
103
  }
104
  }
105
 
106
- // if (!Mage::app()->isSingleStoreMode()) {
107
- $fieldset = $form->addFieldset('visibility_form', array(
108
- 'legend' => Mage::helper('rating')->__('Rating Visibility'))
109
- );
110
- $fieldset->addField('stores', 'multiselect', array(
111
- 'label' => Mage::helper('rating')->__('Visible In'),
112
- // 'required' => true,
113
- 'name' => 'stores[]',
114
- 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
115
- ));
116
 
117
- if (Mage::registry('rating_data')) {
118
- $form->getElement('stores')->setValue(Mage::registry('rating_data')->getStores());
119
- }
120
- // }
121
- // else {
122
- // $fieldset->addField('stores', 'hidden', array(
123
- // 'name' => 'stores[]',
124
- // 'value' => Mage::app()->getStore(true)->getId()
125
- // ));
126
- // }
 
 
 
 
 
 
 
127
 
128
  return parent::_prepareForm();
129
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
34
 
35
  class Mage_Adminhtml_Block_Rating_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
36
  {
37
+ /**
38
+ * Prepare rating edit form
39
+ *
40
+ * @return Mage_Adminhtml_Block_Rating_Edit_Tab_Form
41
+ */
42
  protected function _prepareForm()
43
  {
44
  $form = new Varien_Data_Form();
45
  $this->setForm($form);
 
46
 
47
  $fieldset = $form->addFieldset('rating_form', array(
48
  'legend'=>Mage::helper('rating')->__('Rating Title')
49
  ));
50
 
51
  $fieldset->addField('rating_code', 'text', array(
52
+ 'name' => 'rating_code',
53
+ 'label' => Mage::helper('rating')->__('Default Value'),
54
+ 'class' => 'required-entry',
55
+ 'required' => true,
 
56
  ));
57
 
58
+ foreach (Mage::getSingleton('adminhtml/system_store')->getStoreCollection() as $store) {
59
+ $fieldset->addField('rating_code_' . $store->getId(), 'text', array(
60
+ 'label' => $store->getName(),
61
+ 'name' => 'rating_codes[' . $store->getId() . ']',
62
+ ));
63
+ }
 
 
64
 
65
  if (Mage::getSingleton('adminhtml/session')->getRatingData()) {
66
  $form->setValues(Mage::getSingleton('adminhtml/session')->getRatingData());
69
  $this->_setRatingCodes($data['rating_codes']);
70
  }
71
  Mage::getSingleton('adminhtml/session')->setRatingData(null);
72
+ } elseif (Mage::registry('rating_data')) {
 
73
  $form->setValues(Mage::registry('rating_data')->getData());
74
  if (Mage::registry('rating_data')->getRatingCodes()) {
75
  $this->_setRatingCodes(Mage::registry('rating_data')->getRatingCodes());
85
  $i = 1;
86
  foreach ($collection->getItems() as $item) {
87
  $fieldset->addField('option_code_' . $item->getId() , 'hidden', array(
88
+ 'required' => true,
89
+ 'name' => 'option_title[' . $item->getId() . ']',
90
+ 'value' => ($item->getCode()) ? $item->getCode() : $i,
91
  ));
92
 
93
  $i ++;
94
  }
95
+ } else {
96
+ for ($i = 1; $i <= 5; $i++) {
 
97
  $fieldset->addField('option_code_' . $i, 'hidden', array(
98
+ 'required' => true,
99
+ 'name' => 'option_title[add_' . $i . ']',
100
+ 'value' => $i,
101
  ));
102
  }
103
  }
104
 
105
+ $fieldset = $form->addFieldset('visibility_form', array(
106
+ 'legend' => Mage::helper('rating')->__('Rating Visibility')
107
+ ));
 
 
 
 
 
 
 
108
 
109
+ $field = $fieldset->addField('stores', 'multiselect', array(
110
+ 'label' => Mage::helper('rating')->__('Visible In'),
111
+ 'name' => 'stores[]',
112
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
113
+ ));
114
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
115
+ $field->setRenderer($renderer);
116
+
117
+ $fieldset->addField('position', 'text', array(
118
+ 'label' => Mage::helper('rating')->__('Sort Order'),
119
+ 'name' => 'position',
120
+ ));
121
+
122
+ if (Mage::registry('rating_data')) {
123
+ $form->getElement('position')->setValue(Mage::registry('rating_data')->getPosition());
124
+ $form->getElement('stores')->setValue(Mage::registry('rating_data')->getStores());
125
+ }
126
 
127
  return parent::_prepareForm();
128
  }
app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Options.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Rating/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -52,6 +52,11 @@ class Mage_Adminhtml_Block_Rating_Grid extends Mage_Adminhtml_Block_Widget_Grid
52
  return parent::_prepareCollection();
53
  }
54
 
 
 
 
 
 
55
  protected function _prepareColumns()
56
  {
57
  $this->addColumn('rating_id', array(
@@ -63,10 +68,16 @@ class Mage_Adminhtml_Block_Rating_Grid extends Mage_Adminhtml_Block_Widget_Grid
63
 
64
  $this->addColumn('rating_code', array(
65
  'header' => Mage::helper('rating')->__('Rating Name'),
66
- 'align' =>'left',
67
  'index' => 'rating_code',
68
  ));
69
 
 
 
 
 
 
 
 
70
  return parent::_prepareColumns();
71
  }
72
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
52
  return parent::_prepareCollection();
53
  }
54
 
55
+ /**
56
+ * Prepare Rating Grid colunms
57
+ *
58
+ * @return Mage_Adminhtml_Block_Rating_Grid
59
+ */
60
  protected function _prepareColumns()
61
  {
62
  $this->addColumn('rating_id', array(
68
 
69
  $this->addColumn('rating_code', array(
70
  'header' => Mage::helper('rating')->__('Rating Name'),
 
71
  'index' => 'rating_code',
72
  ));
73
 
74
+ $this->addColumn('position', array(
75
+ 'header' => Mage::helper('rating')->__('Sort Order'),
76
+ 'align' => 'left',
77
+ 'width' => '100px',
78
+ 'index' => 'position',
79
+ ));
80
+
81
  return parent::_prepareColumns();
82
  }
83
 
app/code/core/Mage/Adminhtml/Block/Rating/Rating.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -40,7 +40,7 @@ class Mage_Adminhtml_Block_Report_Config_Form_Field_YtdStart extends Mage_Adminh
40
  for ($i = 1; $i <= 12; $i++) {
41
  $_months[$i] = Mage::app()->getLocale()
42
  ->date(mktime(null,null,null,$i))
43
- ->get(Zend_date::MONTH_NAME);
44
  }
45
 
46
  $_days = array();
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
40
  for ($i = 1; $i <= 12; $i++) {
41
  $_months[$i] = Mage::app()->getLocale()
42
  ->date(mktime(null,null,null,$i))
43
+ ->get(Zend_Date::MONTH_NAME);
44
  }
45
 
46
  $_days = array();
app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -64,6 +64,7 @@ class Mage_Adminhtml_Block_Report_Customer_Totals_Grid extends Mage_Adminhtml_Bl
64
  ));
65
 
66
  $baseCurrencyCode = $this->getCurrentCurrencyCode();
 
67
 
68
  $this->addColumn('orders_avg_amount', array(
69
  'header' => $this->__('Average Order Amount'),
@@ -74,7 +75,8 @@ class Mage_Adminhtml_Block_Report_Customer_Totals_Grid extends Mage_Adminhtml_Bl
74
  'currency_code' => $baseCurrencyCode,
75
  'index' => 'orders_avg_amount',
76
  'total' => 'orders_sum_amount/orders_count',
77
- 'renderer' => 'adminhtml/report_grid_column_renderer_currency'
 
78
  ));
79
 
80
  $this->addColumn('orders_sum_amount', array(
@@ -86,7 +88,8 @@ class Mage_Adminhtml_Block_Report_Customer_Totals_Grid extends Mage_Adminhtml_Bl
86
  'currency_code' => $baseCurrencyCode,
87
  'index' => 'orders_sum_amount',
88
  'total' => 'sum',
89
- 'renderer' => 'adminhtml/report_grid_column_renderer_currency'
 
90
  ));
91
 
92
  $this->addExportType('*/*/exportTotalsCsv', Mage::helper('reports')->__('CSV'));
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
64
  ));
65
 
66
  $baseCurrencyCode = $this->getCurrentCurrencyCode();
67
+ $rate = $this->getRate($baseCurrencyCode);
68
 
69
  $this->addColumn('orders_avg_amount', array(
70
  'header' => $this->__('Average Order Amount'),
75
  'currency_code' => $baseCurrencyCode,
76
  'index' => 'orders_avg_amount',
77
  'total' => 'orders_sum_amount/orders_count',
78
+ 'renderer' => 'adminhtml/report_grid_column_renderer_currency',
79
+ 'rate' => $rate,
80
  ));
81
 
82
  $this->addColumn('orders_sum_amount', array(
88
  'currency_code' => $baseCurrencyCode,
89
  'index' => 'orders_sum_amount',
90
  'total' => 'sum',
91
+ 'renderer' => 'adminhtml/report_grid_column_renderer_currency',
92
+ 'rate' => $rate,
93
  ));
94
 
95
  $this->addExportType('*/*/exportTotalsCsv', Mage::helper('reports')->__('CSV'));
app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -189,7 +189,13 @@ class Mage_Adminhtml_Block_Report_Filter_Form extends Mage_Adminhtml_Block_Widge
189
  */
190
  protected function _initFormValues()
191
  {
192
- $this->getForm()->addValues($this->getFilterData()->getData());
 
 
 
 
 
 
193
  return parent::_initFormValues();
194
  }
195
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
189
  */
190
  protected function _initFormValues()
191
  {
192
+ $data = $this->getFilterData()->getData();
193
+ foreach ($data as $key => $value) {
194
+ if (is_array($value) && isset($value[0])) {
195
+ $data[$key] = explode(',', $value[0]);
196
+ }
197
+ }
198
+ $this->getForm()->addValues($data);
199
  return parent::_initFormValues();
200
  }
201
 
app/code/core/Mage/Adminhtml/Block/Report/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -461,7 +461,9 @@ class Mage_Adminhtml_Block_Report_Grid extends Mage_Adminhtml_Block_Widget_Grid
461
  foreach ($this->_columns as $column) {
462
  $j++;
463
  if (!$column->getIsSystem()) {
464
- $data[] = ($j==1)?'"'.$this->__('Subtotal').'"':'"'.str_replace('"', '""', $column->getRowField($this->getTotals())).'"';
 
 
465
  }
466
  }
467
  $csv.= implode(',', $data)."\n";
@@ -577,7 +579,6 @@ class Mage_Adminhtml_Block_Report_Grid extends Mage_Adminhtml_Block_Widget_Grid
577
  public function getRefreshButtonCallback()
578
  {
579
  return "{$this->getJsObjectName()}.doFilter();";
580
- return "if ($('period_date_to').value == '' && $('period_date_from').value == '') {alert('".$this->__('Please specify at least start or end date.')."'); return false;}else {$this->getJsObjectName()}.doFilter();";
581
  }
582
 
583
  /**
@@ -613,4 +614,15 @@ class Mage_Adminhtml_Block_Report_Grid extends Mage_Adminhtml_Block_Widget_Grid
613
  }
614
  return $this->_currentCurrencyCode;
615
  }
 
 
 
 
 
 
 
 
 
 
 
616
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
461
  foreach ($this->_columns as $column) {
462
  $j++;
463
  if (!$column->getIsSystem()) {
464
+ $data[] = ($j == 1) ?
465
+ '"' . $this->__('Subtotal') . '"' :
466
+ '"'.str_replace('"', '""', $column->getRowField($this->getTotals())).'"';
467
  }
468
  }
469
  $csv.= implode(',', $data)."\n";
579
  public function getRefreshButtonCallback()
580
  {
581
  return "{$this->getJsObjectName()}.doFilter();";
 
582
  }
583
 
584
  /**
614
  }
615
  return $this->_currentCurrencyCode;
616
  }
617
+
618
+ /**
619
+ * Get currency rate (base to given currency)
620
+ *
621
+ * @param string|Mage_Directory_Model_Currency $currencyCode
622
+ * @return double
623
+ */
624
+ public function getRate($toCurrency)
625
+ {
626
+ return Mage::app()->getStore()->getBaseCurrency()->getRate($toCurrency);
627
+ }
628
  }
app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -41,7 +41,7 @@ class Mage_Adminhtml_Block_Report_Grid_Abstract extends Mage_Adminhtml_Block_Wid
41
  if (isset($this->_columnGroupBy)) {
42
  $this->isColumnGrouped($this->_columnGroupBy, true);
43
  }
44
- $this->setEmptyCellLabel(Mage::helper('reports')->__('No records found for this period.'));
45
  }
46
 
47
  public function getResourceCollectionName()
@@ -159,9 +159,11 @@ class Mage_Adminhtml_Block_Report_Grid_Abstract extends Mage_Adminhtml_Block_Wid
159
  ->setPeriod($filterData->getData('period_type'))
160
  ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))
161
  ->addStoreFilter($storeIds)
162
- ->addOrderStatusFilter($filterData->getData('order_statuses'))
163
  ->setAggregatedColumns($this->_getAggregatedColumns());
164
 
 
 
 
165
  if ($this->_isExport) {
166
  $this->setCollection($resourceCollection);
167
  return $this;
@@ -185,9 +187,12 @@ class Mage_Adminhtml_Block_Report_Grid_Abstract extends Mage_Adminhtml_Block_Wid
185
  ->setPeriod($filterData->getData('period_type'))
186
  ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))
187
  ->addStoreFilter($storeIds)
188
- ->addOrderStatusFilter($filterData->getData('order_statuses'))
189
  ->setAggregatedColumns($this->_getAggregatedColumns())
190
  ->isTotals(true);
 
 
 
 
191
  foreach ($totalsCollection as $item) {
192
  $this->setTotals($item);
193
  break;
@@ -208,9 +213,11 @@ class Mage_Adminhtml_Block_Report_Grid_Abstract extends Mage_Adminhtml_Block_Wid
208
  ->setPeriod($filterData->getData('period_type'))
209
  ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))
210
  ->addStoreFilter($this->_getStoreIds())
211
- ->addOrderStatusFilter($filterData->getData('order_statuses'))
212
  ->setAggregatedColumns($this->_getAggregatedColumns())
213
  ->isTotals(true);
 
 
 
214
  if (count($totalsCollection->getItems()) < 1 || !$filterData->getData('from')) {
215
  $this->setTotals(new Varien_Object());
216
  } else {
@@ -230,9 +237,12 @@ class Mage_Adminhtml_Block_Report_Grid_Abstract extends Mage_Adminhtml_Block_Wid
230
  ->setPeriod($filterData->getData('period_type'))
231
  ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))
232
  ->addStoreFilter($this->_getStoreIds())
233
- ->addOrderStatusFilter($filterData->getData('order_statuses'))
234
  ->setAggregatedColumns($this->_getAggregatedColumns())
235
  ->isSubTotals(true);
 
 
 
 
236
  $this->setSubTotals($subTotalsCollection->getItems());
237
  return parent::getSubTotals();
238
  }
@@ -252,4 +262,41 @@ class Mage_Adminhtml_Block_Report_Grid_Abstract extends Mage_Adminhtml_Block_Wid
252
  }
253
  return $this->_currentCurrencyCode;
254
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
41
  if (isset($this->_columnGroupBy)) {
42
  $this->isColumnGrouped($this->_columnGroupBy, true);
43
  }
44
+ $this->setEmptyCellLabel(Mage::helper('adminhtml')->__('No records found for this period.'));
45
  }
46
 
47
  public function getResourceCollectionName()
159
  ->setPeriod($filterData->getData('period_type'))
160
  ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))
161
  ->addStoreFilter($storeIds)
 
162
  ->setAggregatedColumns($this->_getAggregatedColumns());
163
 
164
+ $this->_addOrderStatusFilter($resourceCollection, $filterData);
165
+ $this->_addCustomFilter($resourceCollection, $filterData);
166
+
167
  if ($this->_isExport) {
168
  $this->setCollection($resourceCollection);
169
  return $this;
187
  ->setPeriod($filterData->getData('period_type'))
188
  ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))
189
  ->addStoreFilter($storeIds)
 
190
  ->setAggregatedColumns($this->_getAggregatedColumns())
191
  ->isTotals(true);
192
+
193
+ $this->_addOrderStatusFilter($totalsCollection, $filterData);
194
+ $this->_addCustomFilter($totalsCollection, $filterData);
195
+
196
  foreach ($totalsCollection as $item) {
197
  $this->setTotals($item);
198
  break;
213
  ->setPeriod($filterData->getData('period_type'))
214
  ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))
215
  ->addStoreFilter($this->_getStoreIds())
 
216
  ->setAggregatedColumns($this->_getAggregatedColumns())
217
  ->isTotals(true);
218
+
219
+ $this->_addOrderStatusFilter($totalsCollection, $filterData);
220
+
221
  if (count($totalsCollection->getItems()) < 1 || !$filterData->getData('from')) {
222
  $this->setTotals(new Varien_Object());
223
  } else {
237
  ->setPeriod($filterData->getData('period_type'))
238
  ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null))
239
  ->addStoreFilter($this->_getStoreIds())
 
240
  ->setAggregatedColumns($this->_getAggregatedColumns())
241
  ->isSubTotals(true);
242
+
243
+ $this->_addOrderStatusFilter($subTotalsCollection, $filterData);
244
+ $this->_addCustomFilter($subTotalsCollection, $filterData);
245
+
246
  $this->setSubTotals($subTotalsCollection->getItems());
247
  return parent::getSubTotals();
248
  }
262
  }
263
  return $this->_currentCurrencyCode;
264
  }
265
+
266
+ /**
267
+ * Get currency rate (base to given currency)
268
+ *
269
+ * @param string|Mage_Directory_Model_Currency $currencyCode
270
+ * @return double
271
+ */
272
+ public function getRate($toCurrency)
273
+ {
274
+ return Mage::app()->getStore()->getBaseCurrency()->getRate($toCurrency);
275
+ }
276
+
277
+ /**
278
+ * Add order status filter
279
+ *
280
+ * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection
281
+ * @param Varien_Object $filterData
282
+ * @return Mage_Adminhtml_Block_Report_Grid_Abstract
283
+ */
284
+ protected function _addOrderStatusFilter($collection, $filterData)
285
+ {
286
+ $collection->addOrderStatusFilter($filterData->getData('order_statuses'));
287
+ return $this;
288
+ }
289
+
290
+ /**
291
+ * Adds custom filter to resource collection
292
+ * Can be overridden in child classes if custom filter needed
293
+ *
294
+ * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection
295
+ * @param Varien_Object $filterData
296
+ * @return Mage_Adminhtml_Block_Report_Grid_Abstract
297
+ */
298
+ protected function _addCustomFilter($collection, $filterData)
299
+ {
300
+ return $this;
301
+ }
302
  }
app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Grid/Shopcart.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml shopping carts report grid block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Report_Grid_Shopcart extends Mage_Adminhtml_Block_Widget_Grid
35
+ {
36
+ /**
37
+ * stores current currency code
38
+ */
39
+ protected $_currentCurrencyCode = null;
40
+
41
+ /**
42
+ * ids of current stores
43
+ */
44
+ protected $_storeIds = array();
45
+
46
+ /**
47
+ * storeIds setter
48
+ *
49
+ * @param array $storeIds
50
+ * @return Mage_Adminhtml_Block_Report_Grid_Shopcart_Abstract
51
+ */
52
+ public function setStoreIds($storeIds)
53
+ {
54
+ $this->_storeIds = $storeIds;
55
+ return $this;
56
+ }
57
+
58
+ /**
59
+ * Retrieve currency code based on selected store
60
+ *
61
+ * @return string
62
+ */
63
+ public function getCurrentCurrencyCode()
64
+ {
65
+ if (is_null($this->_currentCurrencyCode)) {
66
+ reset($this->_storeIds);
67
+ $this->_currentCurrencyCode = (count($this->_storeIds) > 0)
68
+ ? Mage::app()->getStore(current($this->_storeIds))->getBaseCurrencyCode()
69
+ : Mage::app()->getStore()->getBaseCurrencyCode();
70
+ }
71
+ return $this->_currentCurrencyCode;
72
+ }
73
+
74
+ /**
75
+ * Get currency rate (base to given currency)
76
+ *
77
+ * @param string|Mage_Directory_Model_Currency $currencyCode
78
+ * @return double
79
+ */
80
+ public function getRate($toCurrency)
81
+ {
82
+ return Mage::app()->getStore()->getBaseCurrency()->getRate($toCurrency);
83
+ }
84
+ }
app/code/core/Mage/Adminhtml/Block/Report/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Ordered.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Ordered/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -51,12 +51,15 @@ class Mage_Adminhtml_Block_Report_Product_Ordered_Grid extends Mage_Adminhtml_Bl
51
  'index' =>'name'
52
  ));
53
 
 
 
54
  $this->addColumn('price', array(
55
- 'header' =>Mage::helper('reports')->__('Price'),
56
- 'width' =>'120px',
57
- 'type' =>'currency',
58
- 'currency_code' => $this->getCurrentCurrencyCode(),
59
- 'index' =>'price'
 
60
  ));
61
 
62
  $this->addColumn('ordered_qty', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
51
  'index' =>'name'
52
  ));
53
 
54
+ $baseCurrencyCode = $this->getCurrentCurrencyCode();
55
+
56
  $this->addColumn('price', array(
57
+ 'header' => Mage::helper('reports')->__('Price'),
58
+ 'width' => '120px',
59
+ 'type' => 'currency',
60
+ 'currency_code' => $baseCurrencyCode,
61
+ 'index' => 'price',
62
+ 'rate' => $this->getRate($baseCurrencyCode),
63
  ));
64
 
65
  $this->addColumn('ordered_qty', array(
app/code/core/Mage/Adminhtml/Block/Report/Product/Sold.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Sold/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -39,6 +39,22 @@ class Mage_Adminhtml_Block_Report_Product_Viewed extends Mage_Adminhtml_Block_Wi
39
  $this->_controller = 'report_product_viewed';
40
  $this->_headerText = Mage::helper('reports')->__('Most Viewed');
41
  parent::__construct();
 
42
  $this->_removeButton('add');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
39
  $this->_controller = 'report_product_viewed';
40
  $this->_headerText = Mage::helper('reports')->__('Most Viewed');
41
  parent::__construct();
42
+ $this->setTemplate('report/grid/container.phtml');
43
  $this->_removeButton('add');
44
+ $this->addButton('filter_form_submit', array(
45
+ 'label' => Mage::helper('reports')->__('Show Report'),
46
+ 'onclick' => 'filterFormSubmit()'
47
+ ));
48
+ }
49
+
50
+ /**
51
+ * Get filter url
52
+ *
53
+ * @return string
54
+ */
55
+ public function getFilterUrl()
56
+ {
57
+ $this->getRequest()->setParam('filter', null);
58
+ return $this->getUrl('*/*/viewed', array('_current' => true));
59
  }
60
  }
app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,49 +31,94 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Report_Product_Viewed_Grid extends Mage_Adminhtml_Block_Report_Grid
35
  {
 
 
 
 
 
 
36
 
 
 
 
 
 
 
 
 
 
 
37
  public function __construct()
38
  {
39
  parent::__construct();
40
- $this->setId('gridViewedProducts');
41
- }
42
-
43
- protected function _prepareCollection()
44
- {
45
- parent::_prepareCollection();
46
- $this->getCollection()->initReport('reports/product_viewed_collection');
47
  }
48
 
 
 
 
 
 
49
  protected function _prepareColumns()
50
  {
51
- $this->addColumn('name', array(
52
- 'header' =>Mage::helper('reports')->__('Product Name'),
53
- 'index' =>'name',
54
- 'total' =>Mage::helper('reports')->__('Subtotal')
 
 
 
 
 
 
 
 
 
 
 
 
55
  ));
56
 
57
- $this->addColumn('price', array(
58
- 'header' =>Mage::helper('reports')->__('Price'),
59
- 'width' =>'120px',
60
- 'type' =>'currency',
61
- 'currency_code' => $this->getCurrentCurrencyCode(),
62
- 'index' =>'price'
 
 
 
 
 
 
63
  ));
64
 
65
- $this->addColumn('views', array(
66
- 'header' =>Mage::helper('reports')->__('Number of Views'),
67
- 'width' =>'120px',
68
- 'align' =>'right',
69
- 'index' =>'views',
70
- 'total' =>'sum'
71
  ));
72
 
73
- $this->addExportType('*/*/exportViewedCsv', Mage::helper('reports')->__('CSV'));
74
- $this->addExportType('*/*/exportViewedExcel', Mage::helper('reports')->__('Excel XML'));
 
75
 
76
  return parent::_prepareColumns();
77
  }
78
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Report_Product_Viewed_Grid extends Mage_Adminhtml_Block_Report_Grid_Abstract
35
  {
36
+ /**
37
+ * Column for grid to be grouped by
38
+ *
39
+ * @var string
40
+ */
41
+ protected $_columnGroupBy = 'period';
42
 
43
+ /**
44
+ * Grid resource collection name
45
+ *
46
+ * @var string
47
+ */
48
+ protected $_resourceCollectionName = 'reports/report_product_viewed_collection';
49
+
50
+ /**
51
+ * Init grid parameters
52
+ */
53
  public function __construct()
54
  {
55
  parent::__construct();
56
+ $this->setCountTotals(true);
 
 
 
 
 
 
57
  }
58
 
59
+ /**
60
+ * Custom columns preparation
61
+ *
62
+ * @return Mage_Adminhtml_Block_Widget_Grid
63
+ */
64
  protected function _prepareColumns()
65
  {
66
+ $this->addColumn('period', array(
67
+ 'header' => Mage::helper('adminhtml')->__('Period'),
68
+ 'index' => 'period',
69
+ 'width' => 100,
70
+ 'sortable' => false,
71
+ 'period_type' => $this->getPeriodType(),
72
+ 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date',
73
+ 'totals_label' => Mage::helper('adminhtml')->__('Total'),
74
+ 'html_decorators' => array('nobr'),
75
+ ));
76
+
77
+ $this->addColumn('product_name', array(
78
+ 'header' => Mage::helper('adminhtml')->__('Product Name'),
79
+ 'index' => 'product_name',
80
+ 'type' => 'string',
81
+ 'sortable' => false
82
  ));
83
 
84
+ if ($this->getFilterData()->getStoreIds()) {
85
+ $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
86
+ }
87
+ $currencyCode = $this->getCurrentCurrencyCode();
88
+
89
+ $this->addColumn('product_price', array(
90
+ 'header' => Mage::helper('adminhtml')->__('Price'),
91
+ 'type' => 'currency',
92
+ 'currency_code' => $currencyCode,
93
+ 'index' => 'product_price',
94
+ 'sortable' => false,
95
+ 'rate' => $this->getRate($currencyCode),
96
  ));
97
 
98
+ $this->addColumn('views_num', array(
99
+ 'header' => Mage::helper('adminhtml')->__('Number of Views'),
100
+ 'index' => 'views_num',
101
+ 'type' => 'number',
102
+ 'total' => 'sum',
103
+ 'sortable' => false
104
  ));
105
 
106
+
107
+ $this->addExportType('*/*/exportViewedCsv', Mage::helper('adminhtml')->__('CSV'));
108
+ $this->addExportType('*/*/exportViewedExcel', Mage::helper('adminhtml')->__('Excel XML'));
109
 
110
  return parent::_prepareColumns();
111
  }
112
 
113
+ /**
114
+ * Don't use orders in collection
115
+ *
116
+ * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection
117
+ * @param Varien_Object $filterData
118
+ * @return Mage_Adminhtml_Block_Report_Grid_Abstract
119
+ */
120
+ protected function _addOrderStatusFilter($collection, $filterData)
121
+ {
122
+ return $this;
123
+ }
124
  }
app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -97,7 +97,13 @@ class Mage_Adminhtml_Block_Report_Refresh_Statistics_Grid extends Mage_Adminhtml
97
  'report' => Mage::helper('sales')->__('Bestsellers'),
98
  'comment' => Mage::helper('sales')->__('Products Bestsellers Report'),
99
  'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_BESTSELLERS_FLAG_CODE)
100
- )
 
 
 
 
 
 
101
  );
102
 
103
  foreach ($data as $value) {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
97
  'report' => Mage::helper('sales')->__('Bestsellers'),
98
  'comment' => Mage::helper('sales')->__('Products Bestsellers Report'),
99
  'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_BESTSELLERS_FLAG_CODE)
100
+ ),
101
+ array(
102
+ 'id' => 'viewed',
103
+ 'report' => Mage::helper('sales')->__('Most Viewed'),
104
+ 'comment' => Mage::helper('sales')->__('Most Viewed Products Report'),
105
+ 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_PRODUCT_VIEWED_FLAG_CODE)
106
+ ),
107
  );
108
 
109
  foreach ($data as $value) {
app/code/core/Mage/Adminhtml/Block/Report/Review/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Review/Detail/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Review/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -76,7 +76,8 @@ class Mage_Adminhtml_Block_Report_Sales_Bestsellers_Grid extends Mage_Adminhtml_
76
  'type' => 'currency',
77
  'currency_code' => $currencyCode,
78
  'index' => 'product_price',
79
- 'sortable' => false
 
80
  ));
81
 
82
  $this->addColumn('qty_ordered', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
76
  'type' => 'currency',
77
  'currency_code' => $currencyCode,
78
  'index' => 'product_price',
79
+ 'sortable' => false,
80
+ 'rate' => $this->getRate($currencyCode),
81
  ));
82
 
83
  $this->addColumn('qty_ordered', array(
app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -71,6 +71,12 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
71
  'index' => 'coupon_code'
72
  ));
73
 
 
 
 
 
 
 
74
  $this->addColumn('coupon_uses', array(
75
  'header' => Mage::helper('salesrule')->__('Number of Uses'),
76
  'sortable' => false,
@@ -83,6 +89,7 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
83
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
84
  }
85
  $currencyCode = $this->getCurrentCurrencyCode();
 
86
 
87
  $this->addColumn('subtotal_amount', array(
88
  'header' => Mage::helper('salesrule')->__('Sales Subtotal Amount'),
@@ -90,7 +97,8 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
90
  'type' => 'currency',
91
  'currency_code' => $currencyCode,
92
  'total' => 'sum',
93
- 'index' => 'subtotal_amount'
 
94
  ));
95
 
96
  $this->addColumn('discount_amount', array(
@@ -99,7 +107,8 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
99
  'type' => 'currency',
100
  'currency_code' => $currencyCode,
101
  'total' => 'sum',
102
- 'index' => 'discount_amount'
 
103
  ));
104
 
105
  $this->addColumn('total_amount', array(
@@ -108,7 +117,8 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
108
  'type' => 'currency',
109
  'currency_code' => $currencyCode,
110
  'total' => 'sum',
111
- 'index' => 'total_amount'
 
112
  ));
113
 
114
  $this->addColumn('subtotal_amount_actual', array(
@@ -117,7 +127,8 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
117
  'type' => 'currency',
118
  'currency_code' => $currencyCode,
119
  'total' => 'sum',
120
- 'index' => 'subtotal_amount_actual'
 
121
  ));
122
 
123
  $this->addColumn('discount_amount_actual', array(
@@ -126,7 +137,8 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
126
  'type' => 'currency',
127
  'currency_code' => $currencyCode,
128
  'total' => 'sum',
129
- 'index' => 'discount_amount_actual'
 
130
  ));
131
 
132
  $this->addColumn('total_amount_actual', array(
@@ -135,7 +147,8 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
135
  'type' => 'currency',
136
  'currency_code' => $currencyCode,
137
  'total' => 'sum',
138
- 'index' => 'total_amount_actual'
 
139
  ));
140
 
141
  $this->addExportType('*/*/exportCouponsCsv', Mage::helper('adminhtml')->__('CSV'));
@@ -143,4 +156,24 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons_Grid extends Mage_Adminhtml_Bloc
143
 
144
  return parent::_prepareColumns();
145
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
71
  'index' => 'coupon_code'
72
  ));
73
 
74
+ $this->addColumn('rule_name', array(
75
+ 'header' => Mage::helper('salesrule')->__('Shopping Cart Price Rule'),
76
+ 'sortable' => false,
77
+ 'index' => 'rule_name'
78
+ ));
79
+
80
  $this->addColumn('coupon_uses', array(
81
  'header' => Mage::helper('salesrule')->__('Number of Uses'),
82
  'sortable' => false,
89
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
90
  }
91
  $currencyCode = $this->getCurrentCurrencyCode();
92
+ $rate = $this->getRate($currencyCode);
93
 
94
  $this->addColumn('subtotal_amount', array(
95
  'header' => Mage::helper('salesrule')->__('Sales Subtotal Amount'),
97
  'type' => 'currency',
98
  'currency_code' => $currencyCode,
99
  'total' => 'sum',
100
+ 'index' => 'subtotal_amount',
101
+ 'rate' => $rate,
102
  ));
103
 
104
  $this->addColumn('discount_amount', array(
107
  'type' => 'currency',
108
  'currency_code' => $currencyCode,
109
  'total' => 'sum',
110
+ 'index' => 'discount_amount',
111
+ 'rate' => $rate,
112
  ));
113
 
114
  $this->addColumn('total_amount', array(
117
  'type' => 'currency',
118
  'currency_code' => $currencyCode,
119
  'total' => 'sum',
120
+ 'index' => 'total_amount',
121
+ 'rate' => $rate,
122
  ));
123
 
124
  $this->addColumn('subtotal_amount_actual', array(
127
  'type' => 'currency',
128
  'currency_code' => $currencyCode,
129
  'total' => 'sum',
130
+ 'index' => 'subtotal_amount_actual',
131
+ 'rate' => $rate,
132
  ));
133
 
134
  $this->addColumn('discount_amount_actual', array(
137
  'type' => 'currency',
138
  'currency_code' => $currencyCode,
139
  'total' => 'sum',
140
+ 'index' => 'discount_amount_actual',
141
+ 'rate' => $rate,
142
  ));
143
 
144
  $this->addColumn('total_amount_actual', array(
147
  'type' => 'currency',
148
  'currency_code' => $currencyCode,
149
  'total' => 'sum',
150
+ 'index' => 'total_amount_actual',
151
+ 'rate' => $rate,
152
  ));
153
 
154
  $this->addExportType('*/*/exportCouponsCsv', Mage::helper('adminhtml')->__('CSV'));
156
 
157
  return parent::_prepareColumns();
158
  }
159
+
160
+ /**
161
+ * Add price rule filter
162
+ *
163
+ * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection
164
+ * @param Varien_Object $filterData
165
+ * @return Mage_Adminhtml_Block_Report_Grid_Abstract
166
+ */
167
+ protected function _addCustomFilter($collection, $filterData)
168
+ {
169
+ if ($filterData->getPriceRuleType()) {
170
+ $rulesList = $filterData->getData('rules_list');
171
+ if (isset($rulesList[0])) {
172
+ $rulesIds = explode(',', $rulesList[0]);
173
+ $collection->addRuleFilter($rulesIds);
174
+ }
175
+ }
176
+
177
+ return parent::_addCustomFilter($filterData, $collection);
178
+ }
179
  }
app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -81,6 +81,7 @@ class Mage_Adminhtml_Block_Report_Sales_Invoiced_Grid extends Mage_Adminhtml_Blo
81
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
82
  }
83
  $currencyCode = $this->getCurrentCurrencyCode();
 
84
 
85
  $this->addColumn('invoiced', array(
86
  'header' => Mage::helper('sales')->__('Total Invoiced'),
@@ -88,7 +89,8 @@ class Mage_Adminhtml_Block_Report_Sales_Invoiced_Grid extends Mage_Adminhtml_Blo
88
  'currency_code' => $currencyCode,
89
  'index' => 'invoiced',
90
  'total' => 'sum',
91
- 'sortable' => false
 
92
  ));
93
 
94
  $this->addColumn('invoiced_captured', array(
@@ -97,7 +99,8 @@ class Mage_Adminhtml_Block_Report_Sales_Invoiced_Grid extends Mage_Adminhtml_Blo
97
  'currency_code' => $currencyCode,
98
  'index' => 'invoiced_captured',
99
  'total' => 'sum',
100
- 'sortable' => false
 
101
  ));
102
 
103
  $this->addColumn('invoiced_not_captured', array(
@@ -106,7 +109,8 @@ class Mage_Adminhtml_Block_Report_Sales_Invoiced_Grid extends Mage_Adminhtml_Blo
106
  'currency_code' => $currencyCode,
107
  'index' => 'invoiced_not_captured',
108
  'total' => 'sum',
109
- 'sortable' => false
 
110
  ));
111
 
112
  $this->addExportType('*/*/exportInvoicedCsv', Mage::helper('adminhtml')->__('CSV'));
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
81
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
82
  }
83
  $currencyCode = $this->getCurrentCurrencyCode();
84
+ $rate = $this->getRate($currencyCode);
85
 
86
  $this->addColumn('invoiced', array(
87
  'header' => Mage::helper('sales')->__('Total Invoiced'),
89
  'currency_code' => $currencyCode,
90
  'index' => 'invoiced',
91
  'total' => 'sum',
92
+ 'sortable' => false,
93
+ 'rate' => $rate,
94
  ));
95
 
96
  $this->addColumn('invoiced_captured', array(
99
  'currency_code' => $currencyCode,
100
  'index' => 'invoiced_captured',
101
  'total' => 'sum',
102
+ 'sortable' => false,
103
+ 'rate' => $rate,
104
  ));
105
 
106
  $this->addColumn('invoiced_not_captured', array(
109
  'currency_code' => $currencyCode,
110
  'index' => 'invoiced_not_captured',
111
  'total' => 'sum',
112
+ 'sortable' => false,
113
+ 'rate' => $rate,
114
  ));
115
 
116
  $this->addExportType('*/*/exportInvoicedCsv', Mage::helper('adminhtml')->__('CSV'));
app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -73,6 +73,7 @@ class Mage_Adminhtml_Block_Report_Sales_Refunded_Grid extends Mage_Adminhtml_Blo
73
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
74
  }
75
  $currencyCode = $this->getCurrentCurrencyCode();
 
76
 
77
  $this->addColumn('refunded', array(
78
  'header' => Mage::helper('sales')->__('Total Refunded'),
@@ -80,7 +81,8 @@ class Mage_Adminhtml_Block_Report_Sales_Refunded_Grid extends Mage_Adminhtml_Blo
80
  'currency_code' => $currencyCode,
81
  'index' => 'refunded',
82
  'total' => 'sum',
83
- 'sortable' => false
 
84
  ));
85
 
86
  $this->addColumn('online_refunded', array(
@@ -89,7 +91,8 @@ class Mage_Adminhtml_Block_Report_Sales_Refunded_Grid extends Mage_Adminhtml_Blo
89
  'currency_code' => $currencyCode,
90
  'index' => 'online_refunded',
91
  'total' => 'sum',
92
- 'sortable' => false
 
93
  ));
94
 
95
  $this->addColumn('offline_refunded', array(
@@ -98,7 +101,8 @@ class Mage_Adminhtml_Block_Report_Sales_Refunded_Grid extends Mage_Adminhtml_Blo
98
  'currency_code' => $currencyCode,
99
  'index' => 'offline_refunded',
100
  'total' => 'sum',
101
- 'sortable' => false
 
102
  ));
103
 
104
  $this->addExportType('*/*/exportRefundedCsv', Mage::helper('adminhtml')->__('CSV'));
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
73
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
74
  }
75
  $currencyCode = $this->getCurrentCurrencyCode();
76
+ $rate = $this->getRate($currencyCode);
77
 
78
  $this->addColumn('refunded', array(
79
  'header' => Mage::helper('sales')->__('Total Refunded'),
81
  'currency_code' => $currencyCode,
82
  'index' => 'refunded',
83
  'total' => 'sum',
84
+ 'sortable' => false,
85
+ 'rate' => $rate,
86
  ));
87
 
88
  $this->addColumn('online_refunded', array(
91
  'currency_code' => $currencyCode,
92
  'index' => 'online_refunded',
93
  'total' => 'sum',
94
+ 'sortable' => false,
95
+ 'rate' => $rate,
96
  ));
97
 
98
  $this->addColumn('offline_refunded', array(
101
  'currency_code' => $currencyCode,
102
  'index' => 'offline_refunded',
103
  'total' => 'sum',
104
+ 'sortable' => false,
105
+ 'rate' => $rate,
106
  ));
107
 
108
  $this->addExportType('*/*/exportRefundedCsv', Mage::helper('adminhtml')->__('CSV'));
app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -90,6 +90,7 @@ class Mage_Adminhtml_Block_Report_Sales_Sales_Grid extends Mage_Adminhtml_Block_
90
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
91
  }
92
  $currencyCode = $this->getCurrentCurrencyCode();
 
93
 
94
  $this->addColumn('total_income_amount', array(
95
  'header' => Mage::helper('sales')->__('Sales Total'),
@@ -97,27 +98,30 @@ class Mage_Adminhtml_Block_Report_Sales_Sales_Grid extends Mage_Adminhtml_Block_
97
  'currency_code' => $currencyCode,
98
  'index' => 'total_income_amount',
99
  'total' => 'sum',
100
- 'sortable' => false
 
101
  ));
102
 
103
  $this->addColumn('total_revenue_amount', array(
104
- 'header' => Mage::helper('sales')->__('Revenue'),
105
- 'type' => 'currency',
106
- 'currency_code' => $currencyCode,
107
- 'index' => 'total_revenue_amount',
108
- 'total' => 'sum',
109
- 'sortable' => false,
110
- 'visibility_filter' => array('show_actual_columns')
 
111
  ));
112
 
113
  $this->addColumn('total_profit_amount', array(
114
- 'header' => Mage::helper('sales')->__('Profit'),
115
- 'type' => 'currency',
116
- 'currency_code' => $currencyCode,
117
- 'index' => 'total_profit_amount',
118
- 'total' => 'sum',
119
- 'sortable' => false,
120
- 'visibility_filter' => array('show_actual_columns')
 
121
  ));
122
 
123
  $this->addColumn('total_invoiced_amount', array(
@@ -126,17 +130,19 @@ class Mage_Adminhtml_Block_Report_Sales_Sales_Grid extends Mage_Adminhtml_Block_
126
  'currency_code' => $currencyCode,
127
  'index' => 'total_invoiced_amount',
128
  'total' => 'sum',
129
- 'sortable' => false
 
130
  ));
131
 
132
  $this->addColumn('total_paid_amount', array(
133
- 'header' => Mage::helper('sales')->__('Paid'),
134
- 'type' => 'currency',
135
- 'currency_code' => $currencyCode,
136
- 'index' => 'total_paid_amount',
137
- 'total' => 'sum',
138
- 'sortable' => false,
139
- 'visibility_filter' => array('show_actual_columns')
 
140
  ));
141
 
142
  $this->addColumn('total_refunded_amount', array(
@@ -145,7 +151,8 @@ class Mage_Adminhtml_Block_Report_Sales_Sales_Grid extends Mage_Adminhtml_Block_
145
  'currency_code' => $currencyCode,
146
  'index' => 'total_refunded_amount',
147
  'total' => 'sum',
148
- 'sortable' => false
 
149
  ));
150
 
151
  $this->addColumn('total_tax_amount', array(
@@ -154,17 +161,19 @@ class Mage_Adminhtml_Block_Report_Sales_Sales_Grid extends Mage_Adminhtml_Block_
154
  'currency_code' => $currencyCode,
155
  'index' => 'total_tax_amount',
156
  'total' => 'sum',
157
- 'sortable' => false
 
158
  ));
159
 
160
  $this->addColumn('total_tax_amount_actual', array(
161
- 'header' => Mage::helper('sales')->__('Tax'),
162
- 'type' => 'currency',
163
- 'currency_code' => $currencyCode,
164
- 'index' => 'total_tax_amount_actual',
165
- 'total' => 'sum',
166
- 'sortable' => false,
167
- 'visibility_filter' => array('show_actual_columns')
 
168
  ));
169
 
170
  $this->addColumn('total_shipping_amount', array(
@@ -173,17 +182,19 @@ class Mage_Adminhtml_Block_Report_Sales_Sales_Grid extends Mage_Adminhtml_Block_
173
  'currency_code' => $currencyCode,
174
  'index' => 'total_shipping_amount',
175
  'total' => 'sum',
176
- 'sortable' => false
 
177
  ));
178
 
179
  $this->addColumn('total_shipping_amount_actual', array(
180
- 'header' => Mage::helper('sales')->__('Shipping'),
181
- 'type' => 'currency',
182
- 'currency_code' => $currencyCode,
183
- 'index' => 'total_shipping_amount_actual',
184
- 'total' => 'sum',
185
- 'sortable' => false,
186
- 'visibility_filter' => array('show_actual_columns')
 
187
  ));
188
 
189
  $this->addColumn('total_discount_amount', array(
@@ -192,17 +203,19 @@ class Mage_Adminhtml_Block_Report_Sales_Sales_Grid extends Mage_Adminhtml_Block_
192
  'currency_code' => $currencyCode,
193
  'index' => 'total_discount_amount',
194
  'total' => 'sum',
195
- 'sortable' => false
 
196
  ));
197
 
198
  $this->addColumn('total_discount_amount_actual', array(
199
- 'header' => Mage::helper('sales')->__('Discount'),
200
- 'type' => 'currency',
201
- 'currency_code' => $currencyCode,
202
- 'index' => 'total_discount_amount_actual',
203
- 'total' => 'sum',
204
- 'sortable' => false,
205
- 'visibility_filter' => array('show_actual_columns')
 
206
  ));
207
 
208
  $this->addColumn('total_canceled_amount', array(
@@ -211,7 +224,8 @@ class Mage_Adminhtml_Block_Report_Sales_Sales_Grid extends Mage_Adminhtml_Block_
211
  'currency_code' => $currencyCode,
212
  'index' => 'total_canceled_amount',
213
  'total' => 'sum',
214
- 'sortable' => false
 
215
  ));
216
 
217
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
90
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
91
  }
92
  $currencyCode = $this->getCurrentCurrencyCode();
93
+ $rate = $this->getRate($currencyCode);
94
 
95
  $this->addColumn('total_income_amount', array(
96
  'header' => Mage::helper('sales')->__('Sales Total'),
98
  'currency_code' => $currencyCode,
99
  'index' => 'total_income_amount',
100
  'total' => 'sum',
101
+ 'sortable' => false,
102
+ 'rate' => $rate,
103
  ));
104
 
105
  $this->addColumn('total_revenue_amount', array(
106
+ 'header' => Mage::helper('sales')->__('Revenue'),
107
+ 'type' => 'currency',
108
+ 'currency_code' => $currencyCode,
109
+ 'index' => 'total_revenue_amount',
110
+ 'total' => 'sum',
111
+ 'sortable' => false,
112
+ 'visibility_filter' => array('show_actual_columns'),
113
+ 'rate' => $rate,
114
  ));
115
 
116
  $this->addColumn('total_profit_amount', array(
117
+ 'header' => Mage::helper('sales')->__('Profit'),
118
+ 'type' => 'currency',
119
+ 'currency_code' => $currencyCode,
120
+ 'index' => 'total_profit_amount',
121
+ 'total' => 'sum',
122
+ 'sortable' => false,
123
+ 'visibility_filter' => array('show_actual_columns'),
124
+ 'rate' => $rate,
125
  ));
126
 
127
  $this->addColumn('total_invoiced_amount', array(
130
  'currency_code' => $currencyCode,
131
  'index' => 'total_invoiced_amount',
132
  'total' => 'sum',
133
+ 'sortable' => false,
134
+ 'rate' => $rate,
135
  ));
136
 
137
  $this->addColumn('total_paid_amount', array(
138
+ 'header' => Mage::helper('sales')->__('Paid'),
139
+ 'type' => 'currency',
140
+ 'currency_code' => $currencyCode,
141
+ 'index' => 'total_paid_amount',
142
+ 'total' => 'sum',
143
+ 'sortable' => false,
144
+ 'visibility_filter' => array('show_actual_columns'),
145
+ 'rate' => $rate,
146
  ));
147
 
148
  $this->addColumn('total_refunded_amount', array(
151
  'currency_code' => $currencyCode,
152
  'index' => 'total_refunded_amount',
153
  'total' => 'sum',
154
+ 'sortable' => false,
155
+ 'rate' => $rate,
156
  ));
157
 
158
  $this->addColumn('total_tax_amount', array(
161
  'currency_code' => $currencyCode,
162
  'index' => 'total_tax_amount',
163
  'total' => 'sum',
164
+ 'sortable' => false,
165
+ 'rate' => $rate,
166
  ));
167
 
168
  $this->addColumn('total_tax_amount_actual', array(
169
+ 'header' => Mage::helper('sales')->__('Tax'),
170
+ 'type' => 'currency',
171
+ 'currency_code' => $currencyCode,
172
+ 'index' => 'total_tax_amount_actual',
173
+ 'total' => 'sum',
174
+ 'sortable' => false,
175
+ 'visibility_filter' => array('show_actual_columns'),
176
+ 'rate' => $rate,
177
  ));
178
 
179
  $this->addColumn('total_shipping_amount', array(
182
  'currency_code' => $currencyCode,
183
  'index' => 'total_shipping_amount',
184
  'total' => 'sum',
185
+ 'sortable' => false,
186
+ 'rate' => $rate,
187
  ));
188
 
189
  $this->addColumn('total_shipping_amount_actual', array(
190
+ 'header' => Mage::helper('sales')->__('Shipping'),
191
+ 'type' => 'currency',
192
+ 'currency_code' => $currencyCode,
193
+ 'index' => 'total_shipping_amount_actual',
194
+ 'total' => 'sum',
195
+ 'sortable' => false,
196
+ 'visibility_filter' => array('show_actual_columns'),
197
+ 'rate' => $rate,
198
  ));
199
 
200
  $this->addColumn('total_discount_amount', array(
203
  'currency_code' => $currencyCode,
204
  'index' => 'total_discount_amount',
205
  'total' => 'sum',
206
+ 'sortable' => false,
207
+ 'rate' => $rate,
208
  ));
209
 
210
  $this->addColumn('total_discount_amount_actual', array(
211
+ 'header' => Mage::helper('sales')->__('Discount'),
212
+ 'type' => 'currency',
213
+ 'currency_code' => $currencyCode,
214
+ 'index' => 'total_discount_amount_actual',
215
+ 'total' => 'sum',
216
+ 'sortable' => false,
217
+ 'visibility_filter' => array('show_actual_columns'),
218
+ 'rate' => $rate,
219
  ));
220
 
221
  $this->addColumn('total_canceled_amount', array(
224
  'currency_code' => $currencyCode,
225
  'index' => 'total_canceled_amount',
226
  'total' => 'sum',
227
+ 'sortable' => false,
228
+ 'rate' => $rate,
229
  ));
230
 
231
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -82,22 +82,27 @@ class Mage_Adminhtml_Block_Report_Sales_Shipping_Grid extends Mage_Adminhtml_Blo
82
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
83
  }
84
 
 
 
 
85
  $this->addColumn('total_shipping', array(
86
  'header' => Mage::helper('sales')->__('Total Sales Shipping'),
87
  'type' => 'currency',
88
- 'currency_code' => $this->getCurrentCurrencyCode(),
89
  'index' => 'total_shipping',
90
  'total' => 'sum',
91
- 'sortable' => false
 
92
  ));
93
 
94
  $this->addColumn('total_shipping_actual', array(
95
  'header' => Mage::helper('sales')->__('Total Shipping'),
96
  'type' => 'currency',
97
- 'currency_code' => $this->getCurrentCurrencyCode(),
98
  'index' => 'total_shipping_actual',
99
  'total' => 'sum',
100
- 'sortable' => false
 
101
  ));
102
 
103
  $this->addExportType('*/*/exportShippingCsv', Mage::helper('adminhtml')->__('CSV'));
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
82
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
83
  }
84
 
85
+ $currencyCode = $this->getCurrentCurrencyCode();
86
+ $rate = $this->getRate($currencyCode);
87
+
88
  $this->addColumn('total_shipping', array(
89
  'header' => Mage::helper('sales')->__('Total Sales Shipping'),
90
  'type' => 'currency',
91
+ 'currency_code' => $currencyCode,
92
  'index' => 'total_shipping',
93
  'total' => 'sum',
94
+ 'sortable' => false,
95
+ 'rate' => $rate,
96
  ));
97
 
98
  $this->addColumn('total_shipping_actual', array(
99
  'header' => Mage::helper('sales')->__('Total Shipping'),
100
  'type' => 'currency',
101
+ 'currency_code' => $currencyCode,
102
  'index' => 'total_shipping_actual',
103
  'total' => 'sum',
104
+ 'sortable' => false,
105
+ 'rate' => $rate,
106
  ));
107
 
108
  $this->addExportType('*/*/exportShippingCsv', Mage::helper('adminhtml')->__('CSV'));
app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -90,14 +90,16 @@ class Mage_Adminhtml_Block_Report_Sales_Tax_Grid extends Mage_Adminhtml_Block_Re
90
  if ($this->getFilterData()->getStoreIds()) {
91
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
92
  }
 
93
 
94
  $this->addColumn('tax_base_amount_sum', array(
95
  'header' => Mage::helper('sales')->__('Tax Amount'),
96
  'type' => 'currency',
97
- 'currency_code' => $this->getCurrentCurrencyCode(),
98
  'index' => 'tax_base_amount_sum',
99
  'total' => 'sum',
100
- 'sortable' => false
 
101
  ));
102
 
103
  $this->addExportType('*/*/exportTaxCsv', Mage::helper('adminhtml')->__('CSV'));
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
90
  if ($this->getFilterData()->getStoreIds()) {
91
  $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
92
  }
93
+ $currencyCode = $this->getCurrentCurrencyCode();
94
 
95
  $this->addColumn('tax_base_amount_sum', array(
96
  'header' => Mage::helper('sales')->__('Tax Amount'),
97
  'type' => 'currency',
98
+ 'currency_code' => $currencyCode,
99
  'index' => 'tax_base_amount_sum',
100
  'total' => 'sum',
101
+ 'sortable' => false,
102
+ 'rate' => $this->getRate($currencyCode),
103
  ));
104
 
105
  $this->addExportType('*/*/exportTaxCsv', Mage::helper('adminhtml')->__('CSV'));
app/code/core/Mage/Adminhtml/Block/Report/Search.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Search/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,7 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Report_Shopcart_Abandoned_Grid extends Mage_Adminhtml_Block_Widget_Grid
35
  {
36
 
37
  public function __construct()
@@ -42,16 +42,6 @@ class Mage_Adminhtml_Block_Report_Shopcart_Abandoned_Grid extends Mage_Adminhtml
42
 
43
  protected function _prepareCollection()
44
  {
45
- if ($this->getRequest()->getParam('website')) {
46
- $storeIds = Mage::app()->getWebsite($this->getRequest()->getParam('website'))->getStoreIds();
47
- } else if ($this->getRequest()->getParam('group')) {
48
- $storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
49
- } else if ($this->getRequest()->getParam('store')) {
50
- $storeIds = array((int)$this->getRequest()->getParam('store'));
51
- } else {
52
- $storeIds = '';
53
- }
54
-
55
  /** @var $collection Mage_Reports_Model_Resource_Quote_Collection */
56
  $collection = Mage::getResourceModel('reports/quote_collection');
57
 
@@ -62,9 +52,9 @@ class Mage_Adminhtml_Block_Report_Shopcart_Abandoned_Grid extends Mage_Adminhtml
62
  }
63
 
64
  if (!empty($data)) {
65
- $collection->prepareForAbandonedReport($storeIds, $data);
66
  } else {
67
- $collection->prepareForAbandonedReport($storeIds);
68
  }
69
 
70
  $this->setCollection($collection);
@@ -116,14 +106,27 @@ class Mage_Adminhtml_Block_Report_Shopcart_Abandoned_Grid extends Mage_Adminhtml
116
  'type' =>'number'
117
  ));
118
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  $this->addColumn('subtotal', array(
120
- 'header' =>Mage::helper('reports')->__('Subtotal'),
121
- 'width' =>'80px',
122
- 'type' =>'currency',
123
- 'currency_code' => $this->getCurrentCurrencyCode(),
124
- 'index' =>'subtotal',
125
- 'sortable' =>false,
126
- 'renderer' =>'adminhtml/report_grid_column_renderer_currency'
 
127
  ));
128
 
129
  $this->addColumn('coupon_code', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Report_Shopcart_Abandoned_Grid extends Mage_Adminhtml_Block_Report_Grid_Shopcart
35
  {
36
 
37
  public function __construct()
42
 
43
  protected function _prepareCollection()
44
  {
 
 
 
 
 
 
 
 
 
 
45
  /** @var $collection Mage_Reports_Model_Resource_Quote_Collection */
46
  $collection = Mage::getResourceModel('reports/quote_collection');
47
 
52
  }
53
 
54
  if (!empty($data)) {
55
+ $collection->prepareForAbandonedReport($this->_storeIds, $data);
56
  } else {
57
+ $collection->prepareForAbandonedReport($this->_storeIds);
58
  }
59
 
60
  $this->setCollection($collection);
106
  'type' =>'number'
107
  ));
108
 
109
+ if ($this->getRequest()->getParam('website')) {
110
+ $storeIds = Mage::app()->getWebsite($this->getRequest()->getParam('website'))->getStoreIds();
111
+ } else if ($this->getRequest()->getParam('group')) {
112
+ $storeIds = Mage::app()->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
113
+ } else if ($this->getRequest()->getParam('store')) {
114
+ $storeIds = array((int)$this->getRequest()->getParam('store'));
115
+ } else {
116
+ $storeIds = array();
117
+ }
118
+ $this->setStoreIds($storeIds);
119
+ $currencyCode = $this->getCurrentCurrencyCode();
120
+
121
  $this->addColumn('subtotal', array(
122
+ 'header' => Mage::helper('reports')->__('Subtotal'),
123
+ 'width' => '80px',
124
+ 'type' => 'currency',
125
+ 'currency_code' => $currencyCode,
126
+ 'index' => 'subtotal',
127
+ 'sortable' => false,
128
+ 'renderer' => 'adminhtml/report_grid_column_renderer_currency',
129
+ 'rate' => $this->getRate($currencyCode),
130
  ));
131
 
132
  $this->addColumn('coupon_code', array(
app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,7 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Report_Shopcart_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid
35
  {
36
 
37
  public function __construct()
@@ -83,15 +83,18 @@ class Mage_Adminhtml_Block_Report_Shopcart_Customer_Grid extends Mage_Adminhtml_
83
  'index' =>'items'
84
  ));
85
 
 
 
86
  $this->addColumn('total', array(
87
  'header' =>Mage::helper('reports')->__('Total'),
88
  'width' =>'70px',
89
  'sortable' =>false,
90
  'type' =>'currency',
91
  'align' =>'right',
92
- 'currency_code' => $this->getCurrentCurrencyCode(),
93
  'index' =>'total',
94
- 'renderer' =>'adminhtml/report_grid_column_renderer_currency'
 
95
  ));
96
 
97
  $this->setFilterVisibility(false);
@@ -103,4 +106,3 @@ class Mage_Adminhtml_Block_Report_Shopcart_Customer_Grid extends Mage_Adminhtml_
103
  }
104
 
105
  }
106
-
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Report_Shopcart_Customer_Grid extends Mage_Adminhtml_Block_Report_Grid_Shopcart
35
  {
36
 
37
  public function __construct()
83
  'index' =>'items'
84
  ));
85
 
86
+ $currencyCode = $this->getCurrentCurrencyCode();
87
+
88
  $this->addColumn('total', array(
89
  'header' =>Mage::helper('reports')->__('Total'),
90
  'width' =>'70px',
91
  'sortable' =>false,
92
  'type' =>'currency',
93
  'align' =>'right',
94
+ 'currency_code' => $currencyCode,
95
  'index' =>'total',
96
+ 'renderer' =>'adminhtml/report_grid_column_renderer_currency',
97
+ 'rate' => $this->getRate($currencyCode),
98
  ));
99
 
100
  $this->setFilterVisibility(false);
106
  }
107
 
108
  }
 
app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,7 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Report_Shopcart_Product_Grid extends Mage_Adminhtml_Block_Widget_Grid
35
  {
36
 
37
  public function __construct()
@@ -64,13 +64,16 @@ class Mage_Adminhtml_Block_Report_Shopcart_Product_Grid extends Mage_Adminhtml_B
64
  'index' =>'name'
65
  ));
66
 
 
 
67
  $this->addColumn('price', array(
68
  'header' =>Mage::helper('reports')->__('Price'),
69
  'width' =>'80px',
70
  'type' =>'currency',
71
- 'currency_code' => $this->getCurrentCurrencyCode(),
72
  'index' =>'price',
73
- 'renderer' =>'adminhtml/report_grid_column_renderer_currency'
 
74
  ));
75
 
76
  $this->addColumn('carts', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Report_Shopcart_Product_Grid extends Mage_Adminhtml_Block_Report_Grid_Shopcart
35
  {
36
 
37
  public function __construct()
64
  'index' =>'name'
65
  ));
66
 
67
+ $currencyCode = $this->getCurrentCurrencyCode();
68
+
69
  $this->addColumn('price', array(
70
  'header' =>Mage::helper('reports')->__('Price'),
71
  'width' =>'80px',
72
  'type' =>'currency',
73
+ 'currency_code' => $currencyCode,
74
  'index' =>'price',
75
+ 'renderer' =>'adminhtml/report_grid_column_renderer_currency',
76
+ 'rate' => $this->getRate($currencyCode),
77
  ));
78
 
79
  $this->addColumn('carts', array(
app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Wishlist.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Review/Add.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -53,7 +53,8 @@ class Mage_Adminhtml_Block_Review_Add_Form extends Mage_Adminhtml_Block_Widget_F
53
  $fieldset->addField('detailed_rating', 'note', array(
54
  'label' => Mage::helper('review')->__('Product Rating'),
55
  'required' => true,
56
- 'text' => '<div id="rating_detail">' . $this->getLayout()->createBlock('adminhtml/review_rating_detailed')->toHtml() . '</div>',
 
57
  ));
58
 
59
  $fieldset->addField('status_id', 'select', array(
@@ -67,12 +68,14 @@ class Mage_Adminhtml_Block_Review_Add_Form extends Mage_Adminhtml_Block_Widget_F
67
  * Check is single store mode
68
  */
69
  if (!Mage::app()->isSingleStoreMode()) {
70
- $fieldset->addField('select_stores', 'multiselect', array(
71
  'label' => Mage::helper('review')->__('Visible In'),
72
  'required' => true,
73
  'name' => 'select_stores[]',
74
- 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
75
  ));
 
 
76
  }
77
 
78
  $fieldset->addField('nickname', 'text', array(
@@ -95,7 +98,7 @@ class Mage_Adminhtml_Block_Review_Add_Form extends Mage_Adminhtml_Block_Widget_F
95
  'name' => 'detail',
96
  'title' => Mage::helper('review')->__('Review'),
97
  'label' => Mage::helper('review')->__('Review'),
98
- 'style' => 'width: 98%; height: 600px;',
99
  'required' => true,
100
  ));
101
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
53
  $fieldset->addField('detailed_rating', 'note', array(
54
  'label' => Mage::helper('review')->__('Product Rating'),
55
  'required' => true,
56
+ 'text' => '<div id="rating_detail">'
57
+ . $this->getLayout()->createBlock('adminhtml/review_rating_detailed')->toHtml() . '</div>',
58
  ));
59
 
60
  $fieldset->addField('status_id', 'select', array(
68
  * Check is single store mode
69
  */
70
  if (!Mage::app()->isSingleStoreMode()) {
71
+ $field = $fieldset->addField('select_stores', 'multiselect', array(
72
  'label' => Mage::helper('review')->__('Visible In'),
73
  'required' => true,
74
  'name' => 'select_stores[]',
75
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(),
76
  ));
77
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
78
+ $field->setRenderer($renderer);
79
  }
80
 
81
  $fieldset->addField('nickname', 'text', array(
98
  'name' => 'detail',
99
  'title' => Mage::helper('review')->__('Review'),
100
  'label' => Mage::helper('review')->__('Review'),
101
+ 'style' => 'height: 600px;',
102
  'required' => true,
103
  ));
104
 
app/code/core/Mage/Adminhtml/Block/Review/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -58,11 +58,7 @@ class Mage_Adminhtml_Block_Review_Edit_Form extends Mage_Adminhtml_Block_Widget_
58
  ));
59
 
60
  if ($customer->getId()) {
61
- $customerText = Mage::helper('review')->__('<a href="%1$s" onclick="this.target=\'blank\'">%2$s %3$s</a> <a href="mailto:%4$s">(%4$s)</a>',
62
- $this->getUrl('*/customer/edit', array('id' => $customer->getId(), 'active_tab'=>'review')),
63
- $this->htmlEscape($customer->getFirstname()),
64
- $this->htmlEscape($customer->getLastname()),
65
- $this->htmlEscape($customer->getEmail()));
66
  } else {
67
  if (is_null($review->getCustomerId())) {
68
  $customerText = Mage::helper('review')->__('Guest');
@@ -84,7 +80,9 @@ class Mage_Adminhtml_Block_Review_Edit_Form extends Mage_Adminhtml_Block_Widget_
84
  $fieldset->addField('detailed_rating', 'note', array(
85
  'label' => Mage::helper('review')->__('Detailed Rating'),
86
  'required' => true,
87
- 'text' => '<div id="rating_detail">' . $this->getLayout()->createBlock('adminhtml/review_rating_detailed')->toHtml() . '</div>',
 
 
88
  ));
89
 
90
  $fieldset->addField('status_id', 'select', array(
@@ -98,12 +96,14 @@ class Mage_Adminhtml_Block_Review_Edit_Form extends Mage_Adminhtml_Block_Widget_
98
  * Check is single store mode
99
  */
100
  if (!Mage::app()->isSingleStoreMode()) {
101
- $fieldset->addField('select_stores', 'multiselect', array(
102
  'label' => Mage::helper('review')->__('Visible In'),
103
  'required' => true,
104
  'name' => 'stores[]',
105
- 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
106
  ));
 
 
107
  $review->setSelectStores($review->getStores());
108
  }
109
  else {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
58
  ));
59
 
60
  if ($customer->getId()) {
61
+ $customerText = Mage::helper('review')->__('<a href="%1$s" onclick="this.target=\'blank\'">%2$s %3$s</a> <a href="mailto:%4$s">(%4$s)</a>', $this->getUrl('*/customer/edit', array('id' => $customer->getId(), 'active_tab'=>'review')), $this->escapeHtml($customer->getFirstname()), $this->escapeHtml($customer->getLastname()), $this->escapeHtml($customer->getEmail()));
 
 
 
 
62
  } else {
63
  if (is_null($review->getCustomerId())) {
64
  $customerText = Mage::helper('review')->__('Guest');
80
  $fieldset->addField('detailed_rating', 'note', array(
81
  'label' => Mage::helper('review')->__('Detailed Rating'),
82
  'required' => true,
83
+ 'text' => '<div id="rating_detail">'
84
+ . $this->getLayout()->createBlock('adminhtml/review_rating_detailed')->toHtml()
85
+ . '</div>',
86
  ));
87
 
88
  $fieldset->addField('status_id', 'select', array(
96
  * Check is single store mode
97
  */
98
  if (!Mage::app()->isSingleStoreMode()) {
99
+ $field = $fieldset->addField('select_stores', 'multiselect', array(
100
  'label' => Mage::helper('review')->__('Visible In'),
101
  'required' => true,
102
  'name' => 'stores[]',
103
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(),
104
  ));
105
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
106
+ $field->setRenderer($renderer);
107
  $review->setSelectStores($review->getStores());
108
  }
109
  else {
app/code/core/Mage/Adminhtml/Block/Review/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -47,12 +47,20 @@ class Mage_Adminhtml_Block_Review_Grid extends Mage_Adminhtml_Block_Widget_Grid
47
  $collection = $model->getProductCollection();
48
 
49
  if ($this->getProductId() || $this->getRequest()->getParam('productId', false)) {
50
- $this->setProductId(($this->getProductId() ? $this->getProductId() : $this->getRequest()->getParam('productId')));
 
 
 
 
51
  $collection->addEntityFilter($this->getProductId());
52
  }
53
 
54
  if ($this->getCustomerId() || $this->getRequest()->getParam('customerId', false)) {
55
- $this->setCustomerId(($this->getCustomerId() ? $this->getCustomerId() : $this->getRequest()->getParam('customerId')));
 
 
 
 
56
  $collection->addCustomerFilter($this->getCustomerId());
57
  }
58
 
@@ -211,12 +219,16 @@ class Mage_Adminhtml_Block_Review_Grid extends Mage_Adminhtml_Block_Widget_Grid
211
  protected function _prepareMassaction()
212
  {
213
  $this->setMassactionIdField('review_id');
 
214
  $this->setMassactionIdFieldOnlyIndexValue(true);
215
  $this->getMassactionBlock()->setFormFieldName('reviews');
216
 
217
  $this->getMassactionBlock()->addItem('delete', array(
218
  'label'=> Mage::helper('review')->__('Delete'),
219
- 'url' => $this->getUrl('*/*/massDelete', array('ret' => Mage::registry('usePendingFilter') ? 'pending' : 'index')),
 
 
 
220
  'confirm' => Mage::helper('review')->__('Are you sure?')
221
  ));
222
 
@@ -227,7 +239,10 @@ class Mage_Adminhtml_Block_Review_Grid extends Mage_Adminhtml_Block_Widget_Grid
227
  array_unshift($statuses, array('label'=>'', 'value'=>''));
228
  $this->getMassactionBlock()->addItem('update_status', array(
229
  'label' => Mage::helper('review')->__('Update Status'),
230
- 'url' => $this->getUrl('*/*/massUpdateStatus', array('ret' => Mage::registry('usePendingFilter') ? 'pending' : 'index')),
 
 
 
231
  'additional' => array(
232
  'status' => array(
233
  'name' => 'status',
@@ -253,10 +268,13 @@ class Mage_Adminhtml_Block_Review_Grid extends Mage_Adminhtml_Block_Widget_Grid
253
  public function getGridUrl()
254
  {
255
  if( $this->getProductId() || $this->getCustomerId() ) {
256
- return $this->getUrl('*/catalog_product_review/' . (Mage::registry('usePendingFilter') ? 'pending' : ''), array(
257
- 'productId' => $this->getProductId(),
258
- 'customerId' => $this->getCustomerId(),
259
- ));
 
 
 
260
  } else {
261
  return $this->getCurrentUrl();
262
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
47
  $collection = $model->getProductCollection();
48
 
49
  if ($this->getProductId() || $this->getRequest()->getParam('productId', false)) {
50
+ $productId = $this->getProductId();
51
+ if (!$productId) {
52
+ $productId = $this->getRequest()->getParam('productId');
53
+ }
54
+ $this->setProductId($productId);
55
  $collection->addEntityFilter($this->getProductId());
56
  }
57
 
58
  if ($this->getCustomerId() || $this->getRequest()->getParam('customerId', false)) {
59
+ $customerId = $this->getCustomerId();
60
+ if (!$customerId){
61
+ $customerId = $this->getRequest()->getParam('customerId');
62
+ }
63
+ $this->setCustomerId($customerId);
64
  $collection->addCustomerFilter($this->getCustomerId());
65
  }
66
 
219
  protected function _prepareMassaction()
220
  {
221
  $this->setMassactionIdField('review_id');
222
+ $this->setMassactionIdFilter('rt.review_id');
223
  $this->setMassactionIdFieldOnlyIndexValue(true);
224
  $this->getMassactionBlock()->setFormFieldName('reviews');
225
 
226
  $this->getMassactionBlock()->addItem('delete', array(
227
  'label'=> Mage::helper('review')->__('Delete'),
228
+ 'url' => $this->getUrl(
229
+ '*/*/massDelete',
230
+ array('ret' => Mage::registry('usePendingFilter') ? 'pending' : 'index')
231
+ ),
232
  'confirm' => Mage::helper('review')->__('Are you sure?')
233
  ));
234
 
239
  array_unshift($statuses, array('label'=>'', 'value'=>''));
240
  $this->getMassactionBlock()->addItem('update_status', array(
241
  'label' => Mage::helper('review')->__('Update Status'),
242
+ 'url' => $this->getUrl(
243
+ '*/*/massUpdateStatus',
244
+ array('ret' => Mage::registry('usePendingFilter') ? 'pending' : 'index')
245
+ ),
246
  'additional' => array(
247
  'status' => array(
248
  'name' => 'status',
268
  public function getGridUrl()
269
  {
270
  if( $this->getProductId() || $this->getCustomerId() ) {
271
+ return $this->getUrl(
272
+ '*/catalog_product_review/' . (Mage::registry('usePendingFilter') ? 'pending' : ''),
273
+ array(
274
+ 'productId' => $this->getProductId(),
275
+ 'customerId' => $this->getCustomerId(),
276
+ )
277
+ );
278
  } else {
279
  return $this->getCurrentUrl();
280
  }
app/code/core/Mage/Adminhtml/Block/Review/Grid/Filter/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Review/Grid/Renderer/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Review/Main.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -49,6 +49,12 @@ class Mage_Adminhtml_Block_Review_Main extends Mage_Adminhtml_Block_Widget_Grid_
49
  $customerName = $customer->getFirstname() . ' ' . $customer->getLastname();
50
  $customerName = $this->escapeHtml($customerName);
51
  }
 
 
 
 
 
 
52
 
53
  if( Mage::registry('usePendingFilter') === true ) {
54
  if ($customerName) {
@@ -60,6 +66,8 @@ class Mage_Adminhtml_Block_Review_Main extends Mage_Adminhtml_Block_Widget_Grid_
60
  } else {
61
  if ($customerName) {
62
  $this->_headerText = Mage::helper('review')->__('All Reviews of Customer `%s`', $customerName);
 
 
63
  } else {
64
  $this->_headerText = Mage::helper('review')->__('All Reviews');
65
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
49
  $customerName = $customer->getFirstname() . ' ' . $customer->getLastname();
50
  $customerName = $this->escapeHtml($customerName);
51
  }
52
+ $productId = $this->getRequest()->getParam('productId', false);
53
+ $productName = null;
54
+ if ($productId) {
55
+ $product = Mage::getModel('catalog/product')->load($productId);
56
+ $productName = $this->escapeHtml($product->getName());
57
+ }
58
 
59
  if( Mage::registry('usePendingFilter') === true ) {
60
  if ($customerName) {
66
  } else {
67
  if ($customerName) {
68
  $this->_headerText = Mage::helper('review')->__('All Reviews of Customer `%s`', $customerName);
69
+ } elseif ($productName) {
70
+ $this->_headerText = Mage::helper('review')->__('All Reviews of Product `%s`', $productName);
71
  } else {
72
  $this->_headerText = Mage::helper('review')->__('All Reviews');
73
  }
app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Invoice.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Default.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name/Grouped.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Qty.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Configurable.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Default.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Address.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -56,6 +56,8 @@ class Mage_Adminhtml_Block_Sales_Order_Create extends Mage_Adminhtml_Block_Widge
56
  }
57
 
58
  $this->_updateButton('back', 'id', 'back_order_top_button');
 
 
59
  $this->_updateButton('reset', 'id', 'reset_order_top_button');
60
 
61
  if (is_null($customerId)) {
@@ -64,14 +66,10 @@ class Mage_Adminhtml_Block_Sales_Order_Create extends Mage_Adminhtml_Block_Widge
64
  $this->_updateButton('back', 'style', 'display:none');
65
  }
66
 
67
- //$this->_removeButton('back');
68
- $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/sales_order/') . '\');');
69
-
70
  $confirm = Mage::helper('sales')->__('Are you sure you want to cancel this order?');
71
  $this->_updateButton('reset', 'label', Mage::helper('sales')->__('Cancel'));
72
  $this->_updateButton('reset', 'class', 'cancel');
73
  $this->_updateButton('reset', 'onclick', 'deleteConfirm(\''.$confirm.'\', \'' . $this->getCancelUrl() . '\')');
74
-
75
  }
76
 
77
  /**
@@ -81,9 +79,9 @@ class Mage_Adminhtml_Block_Sales_Order_Create extends Mage_Adminhtml_Block_Widge
81
  */
82
  public function getHeaderHtml()
83
  {
84
- $out = '<div id="order-header">';
85
- $out.= $this->getLayout()->createBlock('adminhtml/sales_order_create_header')->toHtml();
86
- $out.= '</div>';
87
  return $out;
88
  }
89
 
@@ -118,14 +116,22 @@ class Mage_Adminhtml_Block_Sales_Order_Create extends Mage_Adminhtml_Block_Widge
118
  {
119
  if ($this->_getSession()->getOrder()->getId()) {
120
  $url = $this->getUrl('*/sales_order/view', array(
121
- 'order_id'=>Mage::getSingleton('adminhtml/session_quote')->getOrder()->getId()
122
  ));
123
- }
124
- else {
125
  $url = $this->getUrl('*/*/cancel');
126
  }
127
 
128
  return $url;
129
  }
130
 
 
 
 
 
 
 
 
 
 
131
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
56
  }
57
 
58
  $this->_updateButton('back', 'id', 'back_order_top_button');
59
+ $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getBackUrl() . '\')');
60
+
61
  $this->_updateButton('reset', 'id', 'reset_order_top_button');
62
 
63
  if (is_null($customerId)) {
66
  $this->_updateButton('back', 'style', 'display:none');
67
  }
68
 
 
 
 
69
  $confirm = Mage::helper('sales')->__('Are you sure you want to cancel this order?');
70
  $this->_updateButton('reset', 'label', Mage::helper('sales')->__('Cancel'));
71
  $this->_updateButton('reset', 'class', 'cancel');
72
  $this->_updateButton('reset', 'onclick', 'deleteConfirm(\''.$confirm.'\', \'' . $this->getCancelUrl() . '\')');
 
73
  }
74
 
75
  /**
79
  */
80
  public function getHeaderHtml()
81
  {
82
+ $out = '<div id="order-header">'
83
+ . $this->getLayout()->createBlock('adminhtml/sales_order_create_header')->toHtml()
84
+ . '</div>';
85
  return $out;
86
  }
87
 
116
  {
117
  if ($this->_getSession()->getOrder()->getId()) {
118
  $url = $this->getUrl('*/sales_order/view', array(
119
+ 'order_id' => Mage::getSingleton('adminhtml/session_quote')->getOrder()->getId()
120
  ));
121
+ } else {
 
122
  $url = $this->getUrl('*/*/cancel');
123
  }
124
 
125
  return $url;
126
  }
127
 
128
+ /**
129
+ * Get URL for back (reset) button
130
+ *
131
+ * @return string
132
+ */
133
+ public function getBackUrl()
134
+ {
135
+ return $this->getUrl('*/' . $this->_controller . '/');
136
+ }
137
  }
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Address.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -62,6 +62,7 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Billing_Address
62
  */
63
  protected function _prepareForm()
64
  {
 
65
  parent::_prepareForm();
66
 
67
  $this->_form->addFieldNameSuffix('order[billing_address]');
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
62
  */
63
  protected function _prepareForm()
64
  {
65
+ $this->setJsVariablePrefix('billingAddress');
66
  parent::_prepareForm();
67
 
68
  $this->_form->addFieldNameSuffix('order[billing_address]');
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -148,7 +148,7 @@ abstract class Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract
148
  if ($inputType) {
149
  $element = $form->addField($attribute->getAttributeCode(), $inputType, array(
150
  'name' => $attribute->getAttributeCode(),
151
- 'label' => $attribute->getStoreLabel(),
152
  'class' => $attribute->getFrontend()->getClass(),
153
  'required' => $attribute->getIsRequired(),
154
  ));
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
148
  if ($inputType) {
149
  $element = $form->addField($attribute->getAttributeCode(), $inputType, array(
150
  'name' => $attribute->getAttributeCode(),
151
+ 'label' => $this->__($attribute->getStoreLabel()),
152
  'class' => $attribute->getFrontend()->getClass(),
153
  'required' => $attribute->getIsRequired(),
154
  ));
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,8 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Sales_Order_Create_Form_Address extends Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract
 
35
  {
36
  /**
37
  * Customer Address Form instance
@@ -83,7 +84,9 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Form_Address extends Mage_Adminhtm
83
 
84
  foreach ($this->getAddressCollection() as $address) {
85
  $addressForm->setEntity($address);
86
- $data[$address->getId()] = $addressForm->outputData(Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_JSON);
 
 
87
  }
88
  return Mage::helper('core')->jsonEncode($data);
89
  }
@@ -154,12 +157,30 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Form_Address extends Mage_Adminhtm
154
 
155
  $this->_form->setValues($this->getFormValues());
156
 
157
- if (!$this->_form->getElement('country_id')->getValue()) {
 
 
 
 
 
 
 
 
 
158
  $this->_form->getElement('country_id')->setValue(
159
  Mage::helper('core')->getDefaultCountry($this->getStore())
160
  );
161
  }
162
 
 
 
 
 
 
 
 
 
 
163
  return $this;
164
  }
165
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Sales_Order_Create_Form_Address
35
+ extends Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract
36
  {
37
  /**
38
  * Customer Address Form instance
84
 
85
  foreach ($this->getAddressCollection() as $address) {
86
  $addressForm->setEntity($address);
87
+ $data[$address->getId()] = $addressForm->outputData(
88
+ Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_JSON
89
+ );
90
  }
91
  return Mage::helper('core')->jsonEncode($data);
92
  }
157
 
158
  $this->_form->setValues($this->getFormValues());
159
 
160
+ if ($this->_form->getElement('country_id')->getValue()) {
161
+ $countryId = $this->_form->getElement('country_id')->getValue();
162
+ $this->_form->getElement('country_id')->setValue(null);
163
+ foreach ($this->_form->getElement('country_id')->getValues() as $country) {
164
+ if ($country['value'] == $countryId) {
165
+ $this->_form->getElement('country_id')->setValue($countryId);
166
+ }
167
+ }
168
+ }
169
+ if (is_null($this->_form->getElement('country_id')->getValue())) {
170
  $this->_form->getElement('country_id')->setValue(
171
  Mage::helper('core')->getDefaultCountry($this->getStore())
172
  );
173
  }
174
 
175
+ // Set custom renderer for VAT field if needed
176
+ $vatIdElement = $this->_form->getElement('vat_id');
177
+ if ($vatIdElement && $this->getDisplayVatValidationButton() !== false) {
178
+ $vatIdElement->setRenderer(
179
+ $this->getLayout()->createBlock('adminhtml/customer_sales_order_address_form_renderer_vat')
180
+ ->setJsVariablePrefix($this->getJsVariablePrefix())
181
+ );
182
+ }
183
+
184
  return $this;
185
  }
186
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,38 +29,78 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
  class Mage_Adminhtml_Block_Sales_Order_Create_Items extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract
36
  {
 
 
 
 
 
 
 
 
 
37
  public function __construct()
38
  {
39
  parent::__construct();
40
  $this->setId('sales_order_create_items');
41
  }
42
 
 
 
 
 
 
43
  public function getHeaderText()
44
  {
45
  return Mage::helper('sales')->__('Items Ordered');
46
  }
47
 
 
 
 
 
 
48
  public function getItems()
49
  {
50
- // return $this->getQuote()->getAllItems();
51
  return $this->getQuote()->getAllVisibleItems();
52
  }
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  public function getButtonsHtml()
55
  {
56
- $addButtonData = array(
57
- 'label' => Mage::helper('sales')->__('Add Products'),
58
- 'onclick' => "order.productGridShow(this)",
59
- 'class' => 'add',
60
- );
61
- return $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml();
 
 
62
  }
63
 
 
 
 
 
 
64
  protected function _toHtml()
65
  {
66
  if ($this->getStoreId()) {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
  class Mage_Adminhtml_Block_Sales_Order_Create_Items extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract
36
  {
37
+ /**
38
+ * Contains button descriptions to be shown at the top of accordion
39
+ * @var array
40
+ */
41
+ protected $_buttons = array();
42
+
43
+ /**
44
+ * Define block ID
45
+ */
46
  public function __construct()
47
  {
48
  parent::__construct();
49
  $this->setId('sales_order_create_items');
50
  }
51
 
52
+ /**
53
+ * Accordion header text
54
+ *
55
+ * @return string
56
+ */
57
  public function getHeaderText()
58
  {
59
  return Mage::helper('sales')->__('Items Ordered');
60
  }
61
 
62
+ /**
63
+ * Returns all visible items
64
+ *
65
+ * @return array
66
+ */
67
  public function getItems()
68
  {
 
69
  return $this->getQuote()->getAllVisibleItems();
70
  }
71
 
72
+ /**
73
+ * Add button to the items header
74
+ *
75
+ * @param $args array
76
+ */
77
+ public function addButton($args)
78
+ {
79
+ $this->_buttons[] = $args;
80
+ }
81
+
82
+ /**
83
+ * Render buttons and return HTML code
84
+ *
85
+ * @return string
86
+ */
87
  public function getButtonsHtml()
88
  {
89
+ $html = '';
90
+ // Make buttons to be rendered in opposite order of addition. This makes "Add products" the last one.
91
+ $this->_buttons = array_reverse($this->_buttons);
92
+ foreach ($this->_buttons as $buttonData) {
93
+ $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setData($buttonData)->toHtml();
94
+ }
95
+
96
+ return $html;
97
  }
98
 
99
+ /**
100
+ * Return HTML code of the block
101
+ *
102
+ * @return string
103
+ */
104
  protected function _toHtml()
105
  {
106
  if ($this->getStoreId()) {
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -357,4 +357,16 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Items_Grid extends Mage_Adminhtml_
357
  {
358
  return $item->getProduct()->isVisibleInSiteVisibility();
359
  }
 
 
 
 
 
 
 
 
 
 
 
 
360
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
357
  {
358
  return $item->getProduct()->isVisibleInSiteVisibility();
359
  }
360
+
361
+
362
+ /**
363
+ * Retrieve collection of customer wishlists
364
+ *
365
+ * @return Mage_Wishlist_Model_Resource_Wishlist_Collection
366
+ */
367
+ public function getCustomerWishlists()
368
+ {
369
+ return Mage::getModel("wishlist/wishlist")->getCollection()
370
+ ->filterByCustomerId($this->getCustomerId());
371
+ }
372
  }
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Load.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Messages.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Giftmessage.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,8 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Price extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price
 
35
  {
36
  /**
37
  * Render minimal price for downloadable products
@@ -41,7 +42,7 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Price extends
41
  */
42
  public function render(Varien_Object $row)
43
  {
44
- if ($row->getTypeId() == Mage_Downloadable_Model_Product_Type::TYPE_DOWNLOADABLE) {
45
  $row->setPrice($row->getPrice());
46
  }
47
  return parent::render($row);
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Price extends
35
+ Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price
36
  {
37
  /**
38
  * Render minimal price for downloadable products
42
  */
43
  public function render(Varien_Object $row)
44
  {
45
+ if ($row->getTypeId() == 'downloadable') {
46
  $row->setPrice($row->getPrice());
47
  }
48
  return parent::render($row);
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Address.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -62,6 +62,7 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Address
62
  */
63
  protected function _prepareForm()
64
  {
 
65
  parent::_prepareForm();
66
 
67
  $this->_form->addFieldNameSuffix('order[shipping_address]');
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
62
  */
63
  protected function _prepareForm()
64
  {
65
+ $this->setJsVariablePrefix('shippingAddress');
66
  parent::_prepareForm();
67
 
68
  $this->_form->addFieldNameSuffix('order[shipping_address]');
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,8 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart extends Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Abstract
 
35
  {
36
  /**
37
  * Storage action on selected item
@@ -93,4 +94,24 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart extends Mage_Adminhtm
93
  {
94
  return $item->getProduct()->getId();
95
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart
35
+ extends Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Abstract
36
  {
37
  /**
38
  * Storage action on selected item
94
  {
95
  return $item->getProduct()->getId();
96
  }
97
+
98
+ /**
99
+ * Prepare layout
100
+ *
101
+ * Add button that clears customer's shopping cart
102
+ *
103
+ * @return Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart
104
+ */
105
+ protected function _prepareLayout()
106
+ {
107
+ $deleteAllConfirmString = Mage::helper('sales')->__('Are you sure you want to delete all items from shopping cart?');
108
+ $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
109
+ 'label' => Mage::helper('sales')->__('Clear Shopping Cart'),
110
+ 'onclick' => 'order.clearShoppingCart(\'' . $deleteAllConfirmString . '\')',
111
+ 'style' => 'float: right;'
112
+ ));
113
+ $this->setChild('empty_customer_cart_button', $button);
114
+
115
+ return parent::_prepareLayout();
116
+ }
117
  }
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Wishlist.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -97,13 +97,6 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Totals extends Mage_Adminhtml_Bloc
97
  $html .= $this->renderTotal($total, $area, $colspan);
98
  }
99
  return $html;
100
-
101
- $html = '';
102
- foreach($this->getTotals() as $total) {
103
- $html .= $this->renderTotal($total, $area, $colspan);
104
- }
105
-
106
- return $html;
107
  }
108
 
109
  public function canSendNewOrderConfirmationEmail()
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
97
  $html .= $this->renderTotal($total, $area, $colspan);
98
  }
99
  return $html;
 
 
 
 
 
 
 
100
  }
101
 
102
  public function canSendNewOrderConfirmationEmail()
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Default.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Discount.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -30,12 +30,13 @@
30
  * @author Magento Core Team <core@magentocommerce.com>
31
  */
32
 
33
- class Mage_Adminhtml_Block_Sales_Order_Create_Totals_Shipping extends Mage_Adminhtml_Block_Sales_Order_Create_Totals_Default
 
34
  {
35
  protected $_template = 'sales/order/create/totals/shipping.phtml';
36
 
37
  /**
38
- * Check if we need display shipping include and exlude tax
39
  *
40
  * @return bool
41
  */
@@ -82,7 +83,7 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Totals_Shipping extends Mage_Admin
82
  */
83
  public function getIncludeTaxLabel()
84
  {
85
- return $this->helper('tax')->__('Shipping Incl. Tax (%s)', $this->getTotal()->getAddress()->getShippingDescription());
86
  }
87
 
88
  /**
@@ -92,6 +93,6 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Totals_Shipping extends Mage_Admin
92
  */
93
  public function getExcludeTaxLabel()
94
  {
95
- return $this->helper('tax')->__('Shipping Excl. Tax (%s)', $this->getTotal()->getAddress()->getShippingDescription());
96
  }
97
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
30
  * @author Magento Core Team <core@magentocommerce.com>
31
  */
32
 
33
+ class Mage_Adminhtml_Block_Sales_Order_Create_Totals_Shipping
34
+ extends Mage_Adminhtml_Block_Sales_Order_Create_Totals_Default
35
  {
36
  protected $_template = 'sales/order/create/totals/shipping.phtml';
37
 
38
  /**
39
+ * Check if we need display shipping include and exclude tax
40
  *
41
  * @return bool
42
  */
83
  */
84
  public function getIncludeTaxLabel()
85
  {
86
+ return $this->helper('tax')->__('Shipping Incl. Tax (%s)', $this->escapeHtml($this->getTotal()->getAddress()->getShippingDescription()));
87
  }
88
 
89
  /**
93
  */
94
  public function getExcludeTaxLabel()
95
  {
96
+ return $this->helper('tax')->__('Shipping Excl. Tax (%s)', $this->escapeHtml($this->getTotal()->getAddress()->getShippingDescription()));
97
  }
98
  }
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Subtotal.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Table.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Tax.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -67,20 +67,12 @@ class Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create extends Mage_Adminhtml_
67
  public function getHeaderText()
68
  {
69
  if ($this->getCreditmemo()->getInvoice()) {
70
- $header = Mage::helper('sales')->__('New Credit Memo for Invoice #%s',
71
- $this->getCreditmemo()->getInvoice()->getIncrementId()
72
- );
73
  }
74
  else {
75
- $header = Mage::helper('sales')->__('New Credit Memo for Order #%s',
76
- $this->getCreditmemo()->getOrder()->getRealOrderId()
77
- );
78
  }
79
- /*$header = Mage::helper('sales')->__('New Credit Memo for Order #%s | Order Date: %s | Customer Name: %s',
80
- $this->getCreditmemo()->getOrder()->getRealOrderId(),
81
- $this->formatDate($this->getCreditmemo()->getOrder()->getCreatedAt(), 'medium', true),
82
- $this->getCreditmemo()->getOrder()->getCustomerName()
83
- );*/
84
  return $header;
85
  }
86
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
67
  public function getHeaderText()
68
  {
69
  if ($this->getCreditmemo()->getInvoice()) {
70
+ $header = Mage::helper('sales')->__('New Credit Memo for Invoice #%s', $this->getCreditmemo()->getInvoice()->getIncrementId());
 
 
71
  }
72
  else {
73
+ $header = Mage::helper('sales')->__('New Credit Memo for Order #%s', $this->getCreditmemo()->getOrder()->getRealOrderId());
 
 
74
  }
75
+
 
 
 
 
76
  return $header;
77
  }
78
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Adjustments extends Mage_Adminhtml_Block_Template
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Adjustments extends Mage_Adminhtml_Block_Template
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Totals.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Comments.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Items.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Totals.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Comments.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Items.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Payment.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -129,6 +129,7 @@ class Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Items extends Mage_Adminh
129
  */
130
  public function canCreateShippingLabel()
131
  {
132
- return $this->getOrder()->getShippingCarrier()->isShippingLabelsAvailable();
 
133
  }
134
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
129
  */
130
  public function canCreateShippingLabel()
131
  {
132
+ $shippingCarrier = $this->getOrder()->getShippingCarrier();
133
+ return $shippingCarrier && $shippingCarrier->isShippingLabelsAvailable();
134
  }
135
  }
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -327,7 +327,8 @@ class Mage_Adminhtml_Block_Sales_Order_Shipment_Packaging extends Mage_Adminhtml
327
  */
328
  public function getCustomValueCurrencyCode()
329
  {
330
- return Mage::app()->getStore()->getBaseCurrencyCode();
 
331
  }
332
 
333
  /**
@@ -341,6 +342,18 @@ class Mage_Adminhtml_Block_Sales_Order_Shipment_Packaging extends Mage_Adminhtml
341
  return $this->getShipment()->getOrder()->formatPriceTxt($price);
342
  }
343
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  /**
345
  * Get ordered qty of item
346
  *
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
327
  */
328
  public function getCustomValueCurrencyCode()
329
  {
330
+ $orderInfo = $this->getShipment()->getOrder();
331
+ return $orderInfo->getBaseCurrency()->getCurrencyCode();
332
  }
333
 
334
  /**
342
  return $this->getShipment()->getOrder()->formatPriceTxt($price);
343
  }
344
 
345
+ /**
346
+ * Display formatted customs price
347
+ *
348
+ * @param float $price
349
+ * @return string
350
+ */
351
+ public function displayCustomsPrice($price)
352
+ {
353
+ $orderInfo = $this->getShipment()->getOrder();
354
+ return $orderInfo->getBaseCurrency()->formatTxt($price);
355
+ }
356
+
357
  /**
358
  * Get ordered qty of item
359
  *
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Tracking/Info.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Comments.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -118,10 +118,11 @@ class Mage_Adminhtml_Block_Sales_Order_Shipment_View_Form extends Mage_Adminhtml
118
  /**
119
  * Check is carrier has functionality of creation shipping labels
120
  *
121
- * @return boolean
122
  */
123
  public function canCreateShippingLabel()
124
  {
125
- return $this->getOrder()->getShippingCarrier()->isShippingLabelsAvailable();
 
126
  }
127
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
118
  /**
119
  * Check is carrier has functionality of creation shipping labels
120
  *
121
+ * @return bool
122
  */
123
  public function canCreateShippingLabel()
124
  {
125
+ $shippingCarrier = $this->getOrder()->getShippingCarrier();
126
+ return $shippingCarrier && $shippingCarrier->isShippingLabelsAvailable();
127
  }
128
  }
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Items.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -80,6 +80,8 @@ class Mage_Adminhtml_Block_Sales_Order_Status_New_Form extends Mage_Adminhtml_Bl
80
  'legend' => Mage::helper('sales')->__('Store View Specific Labels'),
81
  'table_class' => 'form-list stores-tree',
82
  ));
 
 
83
 
84
  foreach (Mage::app()->getWebsites() as $website) {
85
  $fieldset->addField("w_{$website->getId()}_label", 'note', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
80
  'legend' => Mage::helper('sales')->__('Store View Specific Labels'),
81
  'table_class' => 'form-list stores-tree',
82
  ));
83
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset');
84
+ $fieldset->setRenderer($renderer);
85
 
86
  foreach (Mage::app()->getWebsites() as $website) {
87
  $fieldset->addField("w_{$website->getId()}_label", 'note', array(
app/code/core/Mage/Adminhtml/Block/Sales/Order/Totalbar.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Tax.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -168,7 +168,7 @@ class Mage_Adminhtml_Block_Sales_Order_View extends Mage_Adminhtml_Block_Widget_
168
 
169
  if ($this->_isAllowedAction('reorder')
170
  && $this->helper('sales/reorder')->isAllowed($order->getStore())
171
- && $order->canReorder()
172
  ) {
173
  $this->_addButton('order_reorder', array(
174
  'label' => Mage::helper('sales')->__('Reorder'),
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
168
 
169
  if ($this->_isAllowedAction('reorder')
170
  && $this->helper('sales/reorder')->isAllowed($order->getStore())
171
+ && $order->canReorderIgnoreSalable()
172
  ) {
173
  $this->_addButton('order_reorder', array(
174
  'label' => Mage::helper('sales')->__('Reorder'),
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -161,4 +161,13 @@ class Mage_Adminhtml_Block_Sales_Order_View_Info extends Mage_Adminhtml_Block_Sa
161
  $url = $this->getUrl('*/sales_order/address', array('address_id'=>$address->getId()));
162
  return '<a href="'.$url.'">' . $label . '</a>';
163
  }
 
 
 
 
 
 
 
 
 
164
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
161
  $url = $this->getUrl('*/sales_order/address', array('address_id'=>$address->getId()));
162
  return '<a href="'.$url.'">' . $label . '</a>';
163
  }
164
+
165
+ /**
166
+ * Whether Customer IP address should be displayed on sales documents
167
+ * @return bool
168
+ */
169
+ public function shouldDisplayCustomerIp()
170
+ {
171
+ return !Mage::getStoreConfigFlag('sales/general/hide_customer_ip', $this->getOrder()->getStoreId());
172
+ }
173
  }
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Messages.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -54,6 +54,7 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
54
  /**
55
  * Compose and get order full history.
56
  * Consists of the status history comments as well as of invoices, shipments and creditmemos creations
 
57
  * @return array
58
  */
59
  public function getFullHistory()
@@ -62,7 +63,7 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
62
 
63
  $history = array();
64
  foreach ($order->getAllStatusHistory() as $orderComment){
65
- $history[$orderComment->getEntityId()] = $this->_prepareHistoryItem(
66
  $orderComment->getStatusLabel(),
67
  $orderComment->getIsCustomerNotified(),
68
  $orderComment->getCreatedAtDate(),
@@ -71,54 +72,74 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
71
  }
72
 
73
  foreach ($order->getCreditmemosCollection() as $_memo){
74
- $history[$_memo->getEntityId()] =
75
- $this->_prepareHistoryItem($this->__('Credit memo #%s created', $_memo->getIncrementId()),
76
- $_memo->getEmailSent(), $_memo->getCreatedAtDate());
 
 
77
 
78
  foreach ($_memo->getCommentsCollection() as $_comment){
79
- $history[$_comment->getEntityId()] =
80
- $this->_prepareHistoryItem($this->__('Credit memo #%s comment added', $_memo->getIncrementId()),
81
- $_comment->getIsCustomerNotified(), $_comment->getCreatedAtDate(), $_comment->getComment());
 
 
 
82
  }
83
  }
84
 
85
  foreach ($order->getShipmentsCollection() as $_shipment){
86
- $history[$_shipment->getEntityId()] =
87
- $this->_prepareHistoryItem($this->__('Shipment #%s created', $_shipment->getIncrementId()),
88
- $_shipment->getEmailSent(), $_shipment->getCreatedAtDate());
 
 
89
 
90
  foreach ($_shipment->getCommentsCollection() as $_comment){
91
- $history[$_comment->getEntityId()] =
92
- $this->_prepareHistoryItem($this->__('Shipment #%s comment added', $_shipment->getIncrementId()),
93
- $_comment->getIsCustomerNotified(), $_comment->getCreatedAtDate(), $_comment->getComment());
 
 
 
94
  }
95
  }
96
 
97
  foreach ($order->getInvoiceCollection() as $_invoice){
98
- $history[$_invoice->getEntityId()] =
99
- $this->_prepareHistoryItem($this->__('Invoice #%s created', $_invoice->getIncrementId()),
100
- $_invoice->getEmailSent(), $_invoice->getCreatedAtDate());
 
 
101
 
102
  foreach ($_invoice->getCommentsCollection() as $_comment){
103
- $history[$_comment->getEntityId()] =
104
- $this->_prepareHistoryItem($this->__('Invoice #%s comment added', $_invoice->getIncrementId()),
105
- $_comment->getIsCustomerNotified(), $_comment->getCreatedAtDate(), $_comment->getComment());
 
 
 
106
  }
107
  }
108
 
109
  foreach ($order->getTracksCollection() as $_track){
110
- $history[$_track->getEntityId()] =
111
- $this->_prepareHistoryItem($this->__('Tracking number %s for %s assigned', $_track->getNumber(), $_track->getTitle()),
112
- false, $_track->getCreatedAtDate());
 
 
113
  }
114
 
115
- krsort($history);
116
  return $history;
117
  }
118
 
119
  /**
120
  * Status history date/datetime getter
 
121
  * @param array $item
 
 
122
  * @return string
123
  */
124
  public function getItemCreatedAt(array $item, $dateType = 'date', $format = 'medium')
@@ -134,6 +155,7 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
134
 
135
  /**
136
  * Status history item title getter
 
137
  * @param array $item
138
  * @return string
139
  */
@@ -144,7 +166,9 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
144
 
145
  /**
146
  * Check whether status history comment is with customer notification
 
147
  * @param array $item
 
148
  * @return bool
149
  */
150
  public function isItemNotified(array $item, $isSimpleCheck = true)
@@ -157,6 +181,7 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
157
 
158
  /**
159
  * Status history item comment getter
 
160
  * @param array $item
161
  * @return string
162
  */
@@ -168,10 +193,12 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
168
 
169
  /**
170
  * Map history items as array
 
171
  * @param string $label
172
  * @param bool $notified
173
  * @param Zend_Date $created
174
  * @param string $comment
 
175
  */
176
  protected function _prepareHistoryItem($label, $notified, $created, $comment = '')
177
  {
@@ -184,38 +211,70 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
184
  }
185
 
186
  /**
187
- * ######################## TAB settings #################################
 
 
188
  */
189
  public function getTabLabel()
190
  {
191
  return Mage::helper('sales')->__('Comments History');
192
  }
193
 
 
 
 
 
 
194
  public function getTabTitle()
195
  {
196
  return Mage::helper('sales')->__('Order History');
197
  }
198
 
 
 
 
 
 
199
  public function getTabClass()
200
  {
201
  return 'ajax only';
202
  }
203
 
 
 
 
 
 
204
  public function getClass()
205
  {
206
  return $this->getTabClass();
207
  }
208
 
 
 
 
 
 
209
  public function getTabUrl()
210
  {
211
  return $this->getUrl('*/*/commentsHistory', array('_current' => true));
212
  }
213
 
 
 
 
 
 
214
  public function canShowTab()
215
  {
216
  return true;
217
  }
218
 
 
 
 
 
 
219
  public function isHidden()
220
  {
221
  return false;
@@ -224,11 +283,30 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_History
224
  /**
225
  * Customer Notification Applicable check method
226
  *
227
- * @param array $history
228
  * @return boolean
229
  */
230
  public function isCustomerNotificationNotApplicable($historyItem)
231
  {
232
  return $historyItem['notified'] == Mage_Sales_Model_Order_Status_History::CUSTOMER_NOTIFICATION_NOT_APPLICABLE;
233
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
54
  /**
55
  * Compose and get order full history.
56
  * Consists of the status history comments as well as of invoices, shipments and creditmemos creations
57
+ *
58
  * @return array
59
  */
60
  public function getFullHistory()
63
 
64
  $history = array();
65
  foreach ($order->getAllStatusHistory() as $orderComment){
66
+ $history[] = $this->_prepareHistoryItem(
67
  $orderComment->getStatusLabel(),
68
  $orderComment->getIsCustomerNotified(),
69
  $orderComment->getCreatedAtDate(),
72
  }
73
 
74
  foreach ($order->getCreditmemosCollection() as $_memo){
75
+ $history[] = $this->_prepareHistoryItem(
76
+ $this->__('Credit memo #%s created', $_memo->getIncrementId()),
77
+ $_memo->getEmailSent(),
78
+ $_memo->getCreatedAtDate()
79
+ );
80
 
81
  foreach ($_memo->getCommentsCollection() as $_comment){
82
+ $history[] = $this->_prepareHistoryItem(
83
+ $this->__('Credit memo #%s comment added', $_memo->getIncrementId()),
84
+ $_comment->getIsCustomerNotified(),
85
+ $_comment->getCreatedAtDate(),
86
+ $_comment->getComment()
87
+ );
88
  }
89
  }
90
 
91
  foreach ($order->getShipmentsCollection() as $_shipment){
92
+ $history[] = $this->_prepareHistoryItem(
93
+ $this->__('Shipment #%s created', $_shipment->getIncrementId()),
94
+ $_shipment->getEmailSent(),
95
+ $_shipment->getCreatedAtDate()
96
+ );
97
 
98
  foreach ($_shipment->getCommentsCollection() as $_comment){
99
+ $history[] = $this->_prepareHistoryItem(
100
+ $this->__('Shipment #%s comment added', $_shipment->getIncrementId()),
101
+ $_comment->getIsCustomerNotified(),
102
+ $_comment->getCreatedAtDate(),
103
+ $_comment->getComment()
104
+ );
105
  }
106
  }
107
 
108
  foreach ($order->getInvoiceCollection() as $_invoice){
109
+ $history[] = $this->_prepareHistoryItem(
110
+ $this->__('Invoice #%s created', $_invoice->getIncrementId()),
111
+ $_invoice->getEmailSent(),
112
+ $_invoice->getCreatedAtDate()
113
+ );
114
 
115
  foreach ($_invoice->getCommentsCollection() as $_comment){
116
+ $history[] = $this->_prepareHistoryItem(
117
+ $this->__('Invoice #%s comment added', $_invoice->getIncrementId()),
118
+ $_comment->getIsCustomerNotified(),
119
+ $_comment->getCreatedAtDate(),
120
+ $_comment->getComment()
121
+ );
122
  }
123
  }
124
 
125
  foreach ($order->getTracksCollection() as $_track){
126
+ $history[] = $this->_prepareHistoryItem(
127
+ $this->__('Tracking number %s for %s assigned', $_track->getNumber(), $_track->getTitle()),
128
+ false,
129
+ $_track->getCreatedAtDate()
130
+ );
131
  }
132
 
133
+ usort($history, array(__CLASS__, "_sortHistoryByTimestamp"));
134
  return $history;
135
  }
136
 
137
  /**
138
  * Status history date/datetime getter
139
+ *
140
  * @param array $item
141
+ * @param string $dateType
142
+ * @param string $format
143
  * @return string
144
  */
145
  public function getItemCreatedAt(array $item, $dateType = 'date', $format = 'medium')
155
 
156
  /**
157
  * Status history item title getter
158
+ *
159
  * @param array $item
160
  * @return string
161
  */
166
 
167
  /**
168
  * Check whether status history comment is with customer notification
169
+ *
170
  * @param array $item
171
+ * @param boolean $isSimpleCheck
172
  * @return bool
173
  */
174
  public function isItemNotified(array $item, $isSimpleCheck = true)
181
 
182
  /**
183
  * Status history item comment getter
184
+ *
185
  * @param array $item
186
  * @return string
187
  */
193
 
194
  /**
195
  * Map history items as array
196
+ *
197
  * @param string $label
198
  * @param bool $notified
199
  * @param Zend_Date $created
200
  * @param string $comment
201
+ * @return array
202
  */
203
  protected function _prepareHistoryItem($label, $notified, $created, $comment = '')
204
  {
211
  }
212
 
213
  /**
214
+ * Get Tab Label
215
+ *
216
+ * @return string
217
  */
218
  public function getTabLabel()
219
  {
220
  return Mage::helper('sales')->__('Comments History');
221
  }
222
 
223
+ /**
224
+ * Get Tab Title
225
+ *
226
+ * @return string
227
+ */
228
  public function getTabTitle()
229
  {
230
  return Mage::helper('sales')->__('Order History');
231
  }
232
 
233
+ /**
234
+ * Get Tab Class
235
+ *
236
+ * @return string
237
+ */
238
  public function getTabClass()
239
  {
240
  return 'ajax only';
241
  }
242
 
243
+ /**
244
+ * Get Class
245
+ *
246
+ * @return string
247
+ */
248
  public function getClass()
249
  {
250
  return $this->getTabClass();
251
  }
252
 
253
+ /**
254
+ * Get Tab Url
255
+ *
256
+ * @return string
257
+ */
258
  public function getTabUrl()
259
  {
260
  return $this->getUrl('*/*/commentsHistory', array('_current' => true));
261
  }
262
 
263
+ /**
264
+ * Can Show Tab
265
+ *
266
+ * @return boolean
267
+ */
268
  public function canShowTab()
269
  {
270
  return true;
271
  }
272
 
273
+ /**
274
+ * Is Hidden
275
+ *
276
+ * @return boolean
277
+ */
278
  public function isHidden()
279
  {
280
  return false;
283
  /**
284
  * Customer Notification Applicable check method
285
  *
286
+ * @param array $historyItem
287
  * @return boolean
288
  */
289
  public function isCustomerNotificationNotApplicable($historyItem)
290
  {
291
  return $historyItem['notified'] == Mage_Sales_Model_Order_Status_History::CUSTOMER_NOTIFICATION_NOT_APPLICABLE;
292
  }
293
+
294
+ /**
295
+ * Comparison For Sorting History By Timestamp
296
+ *
297
+ * @param mixed $a
298
+ * @param mixed $b
299
+ * @return int
300
+ */
301
+ private static function _sortHistoryByTimestamp($a, $b)
302
+ {
303
+ $createdAtA = $a['created_at'];
304
+ $createdAtB = $b['created_at'];
305
+
306
+ /** @var $createdAta Zend_Date */
307
+ if ($createdAtA->getTimestamp() == $createdAtB->getTimestamp()) {
308
+ return 0;
309
+ }
310
+ return ($createdAtA->getTimestamp() < $createdAtB->getTimestamp()) ? -1 : 1;
311
+ }
312
  }
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Reorder/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Shipment.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Totals.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Child/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -75,10 +75,7 @@ class Mage_Adminhtml_Block_Sales_Transactions_Detail extends Mage_Adminhtml_Bloc
75
  */
76
  public function getHeaderText()
77
  {
78
- return Mage::helper('sales')->__("Transaction # %s | %s",
79
- $this->_txn->getTxnId(),
80
- $this->formatDate($this->_txn->getCreatedAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true)
81
- );
82
  }
83
 
84
  protected function _toHtml()
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
75
  */
76
  public function getHeaderText()
77
  {
78
+ return Mage::helper('sales')->__("Transaction # %s | %s", $this->_txn->getTxnId(), $this->formatDate($this->_txn->getCreatedAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true));
 
 
 
79
  }
80
 
81
  protected function _toHtml()
app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -79,7 +79,8 @@ class Mage_Adminhtml_Block_Sales_Transactions_Detail_Grid extends Mage_Adminhtml
79
  'header' => Mage::helper('sales')->__('Value'),
80
  'index' => 'value',
81
  'sortable' => false,
82
- 'type' => 'text'
 
83
  ));
84
 
85
  return parent::_prepareColumns();
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
79
  'header' => Mage::helper('sales')->__('Value'),
80
  'index' => 'value',
81
  'sortable' => false,
82
+ 'type' => 'text',
83
+ 'escape' => true
84
  ));
85
 
86
  return parent::_prepareColumns();
app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sitemap.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -81,14 +81,16 @@ class Mage_Adminhtml_Block_Sitemap_Edit_Form extends Mage_Adminhtml_Block_Widget
81
  ));
82
 
83
  if (!Mage::app()->isSingleStoreMode()) {
84
- $fieldset->addField('store_id', 'select', array(
85
  'label' => Mage::helper('sitemap')->__('Store View'),
86
  'title' => Mage::helper('sitemap')->__('Store View'),
87
  'name' => 'store_id',
88
  'required' => true,
89
  'value' => $model->getStoreId(),
90
- 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
91
  ));
 
 
92
  }
93
  else {
94
  $fieldset->addField('store_id', 'hidden', array(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
81
  ));
82
 
83
  if (!Mage::app()->isSingleStoreMode()) {
84
+ $field = $fieldset->addField('store_id', 'select', array(
85
  'label' => Mage::helper('sitemap')->__('Store View'),
86
  'title' => Mage::helper('sitemap')->__('Store View'),
87
  'name' => 'store_id',
88
  'required' => true,
89
  'value' => $model->getStoreId(),
90
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(),
91
  ));
92
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
93
+ $field->setRenderer($renderer);
94
  }
95
  else {
96
  $fieldset->addField('store_id', 'hidden', array(
app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Store/Switcher.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,17 +29,34 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template
35
  {
 
 
 
 
 
36
  /**
37
  * @var array
38
  */
39
  protected $_storeIds;
40
 
 
 
 
 
 
41
  protected $_storeVarName = 'store';
42
 
 
 
 
 
 
 
 
43
  /**
44
  * @var bool
45
  */
@@ -206,4 +223,38 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template
206
  }
207
  return $this->_hasDefaultOption;
208
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template
35
  {
36
+ /**
37
+ * Key in config for store switcher hint
38
+ */
39
+ const XPATH_HINT_KEY = 'store_switcher';
40
+
41
  /**
42
  * @var array
43
  */
44
  protected $_storeIds;
45
 
46
+ /**
47
+ * Name of store variable
48
+ *
49
+ * @var string
50
+ */
51
  protected $_storeVarName = 'store';
52
 
53
+ /**
54
+ * Url for store switcher hint
55
+ *
56
+ * @var string
57
+ */
58
+ protected $_hintUrl;
59
+
60
  /**
61
  * @var bool
62
  */
223
  }
224
  return $this->_hasDefaultOption;
225
  }
226
+
227
+ /**
228
+ * Return url for store switcher hint
229
+ *
230
+ * @return string
231
+ */
232
+ public function getHintUrl()
233
+ {
234
+ if (null === $this->_hintUrl) {
235
+ $this->_hintUrl = Mage::helper('core/hint')->getHintByCode(self::XPATH_HINT_KEY);
236
+ }
237
+ return $this->_hintUrl;
238
+ }
239
+
240
+ /**
241
+ * Return store switcher hint html
242
+ *
243
+ * @return string
244
+ */
245
+ public function getHintHtml()
246
+ {
247
+ $html = '';
248
+ $url = $this->getHintUrl();
249
+ if ($url) {
250
+ $html = '<a'
251
+ . ' href="'. $this->escapeUrl($url) . '"'
252
+ . ' onclick="this.target=\'_blank\'"'
253
+ . ' title="' . $this->__('What is this?') . '"'
254
+ . ' class="link-store-scope">'
255
+ . $this->__('What is this?')
256
+ . '</a>';
257
+ }
258
+ return $html;
259
+ }
260
  }
app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Form fieldset renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset
35
+ extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface
36
+ {
37
+ /**
38
+ * Form element which re-rendering
39
+ *
40
+ * @var Varien_Data_Form_Element_Fieldset
41
+ */
42
+ protected $_element;
43
+
44
+ /**
45
+ * Constructor
46
+ */
47
+ protected function _construct()
48
+ {
49
+ $this->setTemplate('store/switcher/form/renderer/fieldset.phtml');
50
+ }
51
+
52
+ /**
53
+ * Retrieve an element
54
+ *
55
+ * @return Varien_Data_Form_Element_Fieldset
56
+ */
57
+ public function getElement()
58
+ {
59
+ return $this->_element;
60
+ }
61
+
62
+ /**
63
+ * Render element
64
+ *
65
+ * @param Varien_Data_Form_Element_Abstract $element
66
+ * @return string
67
+ */
68
+ public function render(Varien_Data_Form_Element_Abstract $element)
69
+ {
70
+ $this->_element = $element;
71
+ return $this->toHtml();
72
+ }
73
+
74
+ /**
75
+ * Return html for store switcher hint
76
+ *
77
+ * @return string
78
+ */
79
+ public function getHintHtml()
80
+ {
81
+ return Mage::getBlockSingleton('adminhtml/store_switcher')->getHintHtml();
82
+ }
83
+ }
app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Form fieldset renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element
35
+ extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
36
+ implements Varien_Data_Form_Element_Renderer_Interface
37
+ {
38
+ /**
39
+ * Form element which re-rendering
40
+ *
41
+ * @var Varien_Data_Form_Element_Fieldset
42
+ */
43
+ protected $_element;
44
+
45
+ /**
46
+ * Constructor
47
+ */
48
+ protected function _construct()
49
+ {
50
+ $this->setTemplate('store/switcher/form/renderer/fieldset/element.phtml');
51
+ }
52
+
53
+ /**
54
+ * Retrieve an element
55
+ *
56
+ * @return Varien_Data_Form_Element_Fieldset
57
+ */
58
+ public function getElement()
59
+ {
60
+ return $this->_element;
61
+ }
62
+
63
+ /**
64
+ * Render element
65
+ *
66
+ * @param Varien_Data_Form_Element_Abstract $element
67
+ * @return string
68
+ */
69
+ public function render(Varien_Data_Form_Element_Abstract $element)
70
+ {
71
+ $this->_element = $element;
72
+ return $this->toHtml();
73
+ }
74
+
75
+ /**
76
+ * Return html for store switcher hint
77
+ *
78
+ * @return string
79
+ */
80
+ public function getHintHtml()
81
+ {
82
+ return Mage::getBlockSingleton('adminhtml/store_switcher')->getHintHtml();
83
+ }
84
+ }
app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Account/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Cache/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -332,12 +332,16 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge
332
 
333
  if ($e->depends) {
334
  foreach ($e->depends->children() as $dependent) {
 
335
  $dependentId = $section->getName()
336
  . '_' . $group->getName()
337
  . '_' . $fieldPrefix
338
  . $dependent->getName();
339
  $shouldBeAddedDependence = true;
340
  $dependentValue = (string) $dependent;
 
 
 
341
  $dependentFieldName = $fieldPrefix . $dependent->getName();
342
  $dependentField = $group->fields->$dependentFieldName;
343
  /*
@@ -350,10 +354,12 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge
350
  . '/' . $group->getName()
351
  . '/' . $fieldPrefix
352
  . $dependent->getName();
353
- $shouldBeAddedDependence = $dependentValue != Mage::getStoreConfig(
354
- $dependentFullPath,
355
- $this->getStoreCode()
356
- );
 
 
357
  }
358
  if($shouldBeAddedDependence) {
359
  $this->_getDependence()
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
332
 
333
  if ($e->depends) {
334
  foreach ($e->depends->children() as $dependent) {
335
+ /* @var $dependent Mage_Core_Model_Config_Element */
336
  $dependentId = $section->getName()
337
  . '_' . $group->getName()
338
  . '_' . $fieldPrefix
339
  . $dependent->getName();
340
  $shouldBeAddedDependence = true;
341
  $dependentValue = (string) $dependent;
342
+ if (isset($dependent['separator'])) {
343
+ $dependentValue = explode((string)$dependent['separator'], $dependentValue);
344
+ }
345
  $dependentFieldName = $fieldPrefix . $dependent->getName();
346
  $dependentField = $group->fields->$dependentFieldName;
347
  /*
354
  . '/' . $group->getName()
355
  . '/' . $fieldPrefix
356
  . $dependent->getName();
357
+ $dependentValueInStore = Mage::getStoreConfig($dependentFullPath, $this->getStoreCode());
358
+ if (is_array($dependentValue)) {
359
+ $shouldBeAddedDependence = !in_array($dependentValueInStore, $dependentValue);
360
+ } else {
361
+ $shouldBeAddedDependence = $dependentValue != $dependentValueInStore;
362
+ }
363
  }
364
  if($shouldBeAddedDependence) {
365
  $this->_getDependence()
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -66,20 +66,23 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset
66
  {
67
  $default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
68
 
69
- $html = '<div class="entry-edit-head collapseable" ><a id="'.$element->getHtmlId().'-head" href="#" onclick="Fieldset.toggleCollapse(\''.$element->getHtmlId().'\', \''.$this->getUrl('*/*/state').'\'); return false;">'.$element->getLegend().'</a></div>';
70
- $html.= '<input id="'.$element->getHtmlId().'-state" name="config_state['.$element->getId().']" type="hidden" value="'.(int)$this->_getCollapseState($element).'" />';
71
- $html.= '<fieldset class="'.$this->_getFieldsetCss().'" id="'.$element->getHtmlId().'">';
72
- $html.= '<legend>'.$element->getLegend().'</legend>';
 
 
 
73
 
74
  if ($element->getComment()) {
75
- $html .= '<div class="comment">'.$element->getComment().'</div>';
76
  }
77
  // field label column
78
- $html.= '<table cellspacing="0" class="form-list"><colgroup class="label" /><colgroup class="value" />';
79
  if (!$default) {
80
- $html.= '<colgroup class="use-default" />';
81
  }
82
- $html.= '<colgroup class="scope-label" /><colgroup class="" /><tbody>';
83
 
84
  return $html;
85
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
66
  {
67
  $default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
68
 
69
+ $html = '<div class="entry-edit-head collapseable" ><a id="' . $element->getHtmlId()
70
+ . '-head" href="#" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \''
71
+ . $this->getUrl('*/*/state') . '\'); return false;">' . $element->getLegend() . '</a></div>';
72
+ $html .= '<input id="'.$element->getHtmlId() . '-state" name="config_state[' . $element->getId()
73
+ . ']" type="hidden" value="' . (int)$this->_getCollapseState($element) . '" />';
74
+ $html .= '<fieldset class="' . $this->_getFieldsetCss() . '" id="' . $element->getHtmlId() . '">';
75
+ $html .= '<legend>' . $element->getLegend() . '</legend>';
76
 
77
  if ($element->getComment()) {
78
+ $html .= '<span class="comment" style="display: block;">' . $element->getComment() . '</span>';
79
  }
80
  // field label column
81
+ $html .= '<table cellspacing="0" class="form-list"><colgroup class="label" /><colgroup class="value" />';
82
  if (!$default) {
83
+ $html .= '<colgroup class="use-default" />';
84
  }
85
+ $html .= '<colgroup class="scope-label" /><colgroup class="" /><tbody>';
86
 
87
  return $html;
88
  }
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -38,6 +38,13 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput
38
 
39
  $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
40
 
 
 
 
 
 
 
 
41
  sort($modules);
42
 
43
  foreach ($modules as $moduleName) {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
38
 
39
  $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
40
 
41
+ $dispatchResult = new Varien_Object($modules);
42
+ Mage::dispatchEvent(
43
+ 'adminhtml_system_config_advanced_disableoutput_render_before',
44
+ array('modules' => $dispatchResult)
45
+ );
46
+ $modules = $dispatchResult->toArray();
47
+
48
  sort($modules);
49
 
50
  foreach ($modules as $moduleName) {
app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -106,4 +106,13 @@ class Mage_Adminhtml_Block_System_Config_Switcher extends Mage_Adminhtml_Block_T
106
  return $options;
107
  }
108
 
 
 
 
 
 
 
 
 
 
109
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
106
  return $options;
107
  }
108
 
109
+ /**
110
+ * Return store switcher hint html
111
+ *
112
+ * @return mixed
113
+ */
114
+ public function getHintHtml()
115
+ {
116
+ return Mage::getBlockSingleton('adminhtml/store_switcher')->getHintHtml();
117
+ }
118
  }
app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -80,7 +80,7 @@ class Mage_Adminhtml_Block_System_Config_Tabs extends Mage_Adminhtml_Block_Widge
80
  $configFields = Mage::getSingleton('adminhtml/config');
81
  $sections = $configFields->getSections($current);
82
  $tabs = (array)$configFields->getTabs()->children();
83
-
84
 
85
  $sections = (array)$sections;
86
 
@@ -99,7 +99,7 @@ class Mage_Adminhtml_Block_System_Config_Tabs extends Mage_Adminhtml_Block_Widge
99
 
100
 
101
  foreach ($sections as $section) {
102
-
103
  $hasChildren = $configFields->hasChildren($section, $websiteCode, $storeCode);
104
 
105
  //$code = $section->getPath();
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
80
  $configFields = Mage::getSingleton('adminhtml/config');
81
  $sections = $configFields->getSections($current);
82
  $tabs = (array)$configFields->getTabs()->children();
83
+
84
 
85
  $sections = (array)$sections;
86
 
99
 
100
 
101
  foreach ($sections as $section) {
102
+ Mage::dispatchEvent('adminhtml_block_system_config_init_tab_sections_before', array('section' => $section));
103
  $hasChildren = $configFields->hasChildren($section, $websiteCode, $storeCode);
104
 
105
  //$code = $section->getPath();
app/code/core/Mage/Adminhtml/Block/System/Convert/Gui.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/View.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Filter/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/History.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Currency.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Main.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Rates.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Design.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_System_Design_Edit_Tab_General extends Mage_Adminhtml_Block_Widget_Form
@@ -33,13 +33,15 @@ class Mage_Adminhtml_Block_System_Design_Edit_Tab_General extends Mage_Adminhtml
33
  $fieldset = $form->addFieldset('general', array('legend'=>Mage::helper('core')->__('General Settings')));
34
 
35
  if (!Mage::app()->isSingleStoreMode()) {
36
- $fieldset->addField('store_id', 'select', array(
37
  'label' => Mage::helper('core')->__('Store'),
38
  'title' => Mage::helper('core')->__('Store'),
39
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(),
40
  'name' => 'store_id',
41
  'required' => true,
42
  ));
 
 
43
  } else {
44
  $fieldset->addField('store_id', 'hidden', array(
45
  'name' => 'store_id',
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_System_Design_Edit_Tab_General extends Mage_Adminhtml_Block_Widget_Form
33
  $fieldset = $form->addFieldset('general', array('legend'=>Mage::helper('core')->__('General Settings')));
34
 
35
  if (!Mage::app()->isSingleStoreMode()) {
36
+ $field = $fieldset->addField('store_id', 'select', array(
37
  'label' => Mage::helper('core')->__('Store'),
38
  'title' => Mage::helper('core')->__('Store'),
39
  'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(),
40
  'name' => 'store_id',
41
  'required' => true,
42
  ));
43
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
44
+ $field->setRenderer($renderer);
45
  } else {
46
  $fieldset->addField('store_id', 'hidden', array(
47
  'name' => 'store_id',
app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Email/Template.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -45,7 +45,7 @@ class Mage_Adminhtml_Block_System_Email_Template_Edit_Form extends Mage_Adminhtm
45
  if ($head = $this->getLayout()->getBlock('head')) {
46
  $head->addItem('js', 'prototype/window.js')
47
  ->addItem('js_css', 'prototype/windows/themes/default.css')
48
- ->addItem('js_css', 'prototype/windows/themes/magento.css')
49
  ->addItem('js', 'mage/adminhtml/variables.js');
50
  }
51
  return parent::_prepareLayout();
@@ -72,7 +72,8 @@ class Mage_Adminhtml_Block_System_Email_Template_Edit_Form extends Mage_Adminhtm
72
  'container_id' => 'used_currently_for',
73
  'after_element_html' =>
74
  '<script type="text/javascript">' .
75
- (!$this->getEmailTemplate()->getSystemConfigPathsWhereUsedCurrently() ? '$(\'' . 'used_currently_for' . '\').hide(); ' : '') .
 
76
  '</script>',
77
  ));
78
  }
@@ -83,7 +84,8 @@ class Mage_Adminhtml_Block_System_Email_Template_Edit_Form extends Mage_Adminhtm
83
  'container_id' => 'used_default_for',
84
  'after_element_html' =>
85
  '<script type="text/javascript">' .
86
- (!(bool)$this->getEmailTemplate()->getOrigTemplateCode() ? '$(\'' . 'used_default_for' . '\').hide(); ' : '') .
 
87
  '</script>',
88
  ));
89
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
45
  if ($head = $this->getLayout()->getBlock('head')) {
46
  $head->addItem('js', 'prototype/window.js')
47
  ->addItem('js_css', 'prototype/windows/themes/default.css')
48
+ ->addCss('lib/prototype/windows/themes/magento.css')
49
  ->addItem('js', 'mage/adminhtml/variables.js');
50
  }
51
  return parent::_prepareLayout();
72
  'container_id' => 'used_currently_for',
73
  'after_element_html' =>
74
  '<script type="text/javascript">' .
75
+ (!$this->getEmailTemplate()->getSystemConfigPathsWhereUsedCurrently()
76
+ ? '$(\'' . 'used_currently_for' . '\').hide(); ' : '') .
77
  '</script>',
78
  ));
79
  }
84
  'container_id' => 'used_default_for',
85
  'after_element_html' =>
86
  '<script type="text/javascript">' .
87
+ (!(bool)$this->getEmailTemplate()->getOrigTemplateCode()
88
+ ? '$(\'' . 'used_default_for' . '\').hide(); ' : '') .
89
  '</script>',
90
  ));
91
  }
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -32,19 +32,20 @@
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_System_Email_Template_Grid_Filter_Type extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select
 
36
  {
37
  protected static $_types = array(
38
- null => null,
39
  Mage_Newsletter_Model_Template::TYPE_HTML => 'HTML',
40
- Mage_Newsletter_Model_Template::TYPE_TEXT => 'Text',
41
  );
42
 
43
  protected function _getOptions()
44
  {
45
  $result = array();
46
- foreach (self::$_types as $code=>$label) {
47
- $result[] = array('value'=>$code, 'label'=>Mage::helper('adminhtml')->__($label));
48
  }
49
 
50
  return $result;
@@ -57,8 +58,6 @@ class Mage_Adminhtml_Block_System_Email_Template_Grid_Filter_Type extends Mage_A
57
  return null;
58
  }
59
 
60
- return array('eq'=>$this->getValue());
61
  }
62
-
63
-
64
- }// Class Mage_Adminhtml_Block_Newsletter_Queue_Grid_Filter_Status END
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_System_Email_Template_Grid_Filter_Type
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select
37
  {
38
  protected static $_types = array(
39
+ null => null,
40
  Mage_Newsletter_Model_Template::TYPE_HTML => 'HTML',
41
+ Mage_Newsletter_Model_Template::TYPE_TEXT => 'Text',
42
  );
43
 
44
  protected function _getOptions()
45
  {
46
  $result = array();
47
+ foreach (self::$_types as $code => $label) {
48
+ $result[] = array('value' => $code, 'label' => Mage::helper('adminhtml')->__($label));
49
  }
50
 
51
  return $result;
58
  return null;
59
  }
60
 
61
+ return array('eq' => $this->getValue());
62
  }
63
+ }
 
 
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -32,11 +32,12 @@
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Type extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
  protected static $_types = array(
38
- Mage_Newsletter_Model_Template::TYPE_HTML => 'HTML',
39
- Mage_Newsletter_Model_Template::TYPE_TEXT => 'Text',
40
  );
41
  public function render(Varien_Object $row)
42
  {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Type
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
  protected static $_types = array(
39
+ Mage_Newsletter_Model_Template::TYPE_HTML => 'HTML',
40
+ Mage_Newsletter_Model_Template::TYPE_TEXT => 'Text',
41
  );
42
  public function render(Varien_Object $row)
43
  {
app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,23 +29,33 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_System_Email_Template_Preview extends Mage_Adminhtml_Block_Widget
35
  {
36
-
 
 
 
 
37
  protected function _toHtml()
38
  {
 
39
  $template = Mage::getModel('core/email_template');
40
- if($id = (int)$this->getRequest()->getParam('id')) {
 
41
  $template->load($id);
42
  } else {
43
  $template->setTemplateType($this->getRequest()->getParam('type'));
44
  $template->setTemplateText($this->getRequest()->getParam('text'));
45
  $template->setTemplateStyles($this->getRequest()->getParam('styles'));
46
  }
 
 
 
 
47
  $template->setTemplateText(
48
- $this->escapeHtml($template->getTemplateText())
49
  );
50
 
51
  Varien_Profiler::start("email_template_proccessing");
@@ -53,7 +63,7 @@ class Mage_Adminhtml_Block_System_Email_Template_Preview extends Mage_Adminhtml_
53
 
54
  $templateProcessed = $template->getProcessedTemplate($vars, true);
55
 
56
- if($template->isPlain()) {
57
  $templateProcessed = "<pre>" . htmlspecialchars($templateProcessed) . "</pre>";
58
  }
59
 
@@ -61,5 +71,4 @@ class Mage_Adminhtml_Block_System_Email_Template_Preview extends Mage_Adminhtml_
61
 
62
  return $templateProcessed;
63
  }
64
-
65
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_System_Email_Template_Preview extends Mage_Adminhtml_Block_Widget
35
  {
36
+ /**
37
+ * Prepare html output
38
+ *
39
+ * @return string
40
+ */
41
  protected function _toHtml()
42
  {
43
+ /** @var $template Mage_Core_Model_Email_Template */
44
  $template = Mage::getModel('core/email_template');
45
+ $id = (int)$this->getRequest()->getParam('id');
46
+ if ($id) {
47
  $template->load($id);
48
  } else {
49
  $template->setTemplateType($this->getRequest()->getParam('type'));
50
  $template->setTemplateText($this->getRequest()->getParam('text'));
51
  $template->setTemplateStyles($this->getRequest()->getParam('styles'));
52
  }
53
+
54
+ /* @var $filter Mage_Core_Model_Input_Filter_MaliciousCode */
55
+ $filter = Mage::getSingleton('core/input_filter_maliciousCode');
56
+
57
  $template->setTemplateText(
58
+ $filter->filter($template->getTemplateText())
59
  );
60
 
61
  Varien_Profiler::start("email_template_proccessing");
63
 
64
  $templateProcessed = $template->getProcessedTemplate($vars, true);
65
 
66
+ if ($template->isPlain()) {
67
  $templateProcessed = "<pre>" . htmlspecialchars($templateProcessed) . "</pre>";
68
  }
69
 
71
 
72
  return $templateProcessed;
73
  }
 
74
  }
app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -109,8 +109,11 @@ class Mage_Adminhtml_Block_System_Store_Edit_Form extends Mage_Adminhtml_Block_W
109
  ));
110
 
111
  if (Mage::registry('store_action') == 'edit') {
112
- $groups = Mage::getModel('core/store_group')->getCollection()->addWebsiteFilter($websiteModel->getId())->toOptionArray();
113
- //array_unshift($groups, array('label'=>'', 'value'=>0));
 
 
 
114
  $fieldset->addField('website_default_group_id', 'select', array(
115
  'name' => 'website[default_group_id]',
116
  'label' => Mage::helper('core')->__('Default Store'),
@@ -202,7 +205,8 @@ class Mage_Adminhtml_Block_System_Store_Edit_Form extends Mage_Adminhtml_Block_W
202
  ));
203
 
204
  if (Mage::registry('store_action') == 'edit') {
205
- $stores = Mage::getModel('core/store')->getCollection()->addGroupFilter($groupModel->getId())->toOptionArray();
 
206
  //array_unshift($stores, array('label'=>'', 'value'=>0));
207
  $fieldset->addField('group_default_store_id', 'select', array(
208
  'name' => 'group[default_store_id]',
@@ -335,6 +339,8 @@ class Mage_Adminhtml_Block_System_Store_Edit_Form extends Mage_Adminhtml_Block_W
335
  $form->setUseContainer(true);
336
  $this->setForm($form);
337
 
 
 
338
  return parent::_prepareForm();
339
  }
340
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
109
  ));
110
 
111
  if (Mage::registry('store_action') == 'edit') {
112
+ $groups = Mage::getModel('core/store_group')->getCollection()
113
+ ->addWebsiteFilter($websiteModel->getId())
114
+ ->setWithoutStoreViewFilter()
115
+ ->toOptionArray();
116
+
117
  $fieldset->addField('website_default_group_id', 'select', array(
118
  'name' => 'website[default_group_id]',
119
  'label' => Mage::helper('core')->__('Default Store'),
205
  ));
206
 
207
  if (Mage::registry('store_action') == 'edit') {
208
+ $stores = Mage::getModel('core/store')->getCollection()
209
+ ->addGroupFilter($groupModel->getId())->toOptionArray();
210
  //array_unshift($stores, array('label'=>'', 'value'=>0));
211
  $fieldset->addField('group_default_store_id', 'select', array(
212
  'name' => 'group[default_store_id]',
339
  $form->setUseContainer(true);
340
  $this->setForm($form);
341
 
342
+ Mage::dispatchEvent('adminhtml_store_edit_form_prepare_form', array('block' => $this));
343
+
344
  return parent::_prepareForm();
345
  }
346
  }
app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Group.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -32,13 +32,16 @@
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_System_Store_Grid_Render_Group extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
  public function render(Varien_Object $row)
38
  {
39
  if (!$row->getData($this->getColumn()->getIndex())) {
40
  return null;
41
  }
42
- return '<a title="'.Mage::helper('core')->__('Edit Store').'" href="'.$this->getUrl('*/*/editGroup', array('group_id'=>$row->getGroupId())).'">' . $row->getData($this->getColumn()->getIndex()) . '</a>';
 
 
43
  }
44
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_System_Store_Grid_Render_Group
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
  public function render(Varien_Object $row)
39
  {
40
  if (!$row->getData($this->getColumn()->getIndex())) {
41
  return null;
42
  }
43
+ return '<a title="' . Mage::helper('core')->__('Edit Store') . '"
44
+ href="' . $this->getUrl('*/*/editGroup', array('group_id' => $row->getGroupId())) . '">'
45
+ . $this->escapeHtml($row->getData($this->getColumn()->getIndex())) . '</a>';
46
  }
47
  }
app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Store.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -32,13 +32,16 @@
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_System_Store_Grid_Render_Store extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
  public function render(Varien_Object $row)
38
  {
39
  if (!$row->getData($this->getColumn()->getIndex())) {
40
  return null;
41
  }
42
- return '<a title="'.Mage::helper('core')->__('Edit Store View').'" href="'.$this->getUrl('*/*/editStore', array('store_id'=>$row->getStoreId())).'">' . $row->getData($this->getColumn()->getIndex()) . '</a>';
 
 
43
  }
44
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_System_Store_Grid_Render_Store
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
  public function render(Varien_Object $row)
39
  {
40
  if (!$row->getData($this->getColumn()->getIndex())) {
41
  return null;
42
  }
43
+ return '<a title="' . Mage::helper('core')->__('Edit Store View') . '"
44
+ href="' . $this->getUrl('*/*/editStore', array('store_id' => $row->getStoreId())) . '">'
45
+ . $this->escapeHtml($row->getData($this->getColumn()->getIndex())) . '</a>';
46
  }
47
  }
app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Website.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,12 +31,16 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_System_Store_Grid_Render_Website extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
 
35
  {
36
 
37
  public function render(Varien_Object $row)
38
  {
39
- return '<a title="'.Mage::helper('core')->__('Edit Website').'" href="'.$this->getUrl('*/*/editWebsite', array('website_id'=>$row->getWebsiteId())).'">' . $row->getData($this->getColumn()->getIndex()) . '</a>';
 
 
40
  }
41
 
42
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+
35
+ class Mage_Adminhtml_Block_System_Store_Grid_Render_Website
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
 
39
  public function render(Varien_Object $row)
40
  {
41
+ return '<a title="' . Mage::helper('core')->__('Edit Website') . '"
42
+ href="' . $this->getUrl('*/*/editWebsite', array('website_id' => $row->getWebsiteId())) . '">'
43
+ . $this->escapeHtml($row->getData($this->getColumn()->getIndex())) . '</a>';
44
  }
45
 
46
  }
app/code/core/Mage/Adminhtml/Block/System/Store/Store.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Variable.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Assigned/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Edit/Accordion.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Edit/Assigned.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -42,6 +42,11 @@ class Mage_Adminhtml_Block_Tag_Edit_Form extends Mage_Adminhtml_Block_Widget_For
42
  $this->setTitle(Mage::helper('tag')->__('Block Information'));
43
  }
44
 
 
 
 
 
 
45
  protected function _prepareForm()
46
  {
47
  $model = Mage::registry('tag_tag');
@@ -50,7 +55,8 @@ class Mage_Adminhtml_Block_Tag_Edit_Form extends Mage_Adminhtml_Block_Widget_For
50
  array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')
51
  );
52
 
53
- $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('tag')->__('General Information')));
 
54
 
55
  if ($model->getTagId()) {
56
  $fieldset->addField('tag_id', 'hidden', array(
@@ -73,7 +79,7 @@ class Mage_Adminhtml_Block_Tag_Edit_Form extends Mage_Adminhtml_Block_Widget_For
73
  'label' => Mage::helper('tag')->__('Tag Name'),
74
  'title' => Mage::helper('tag')->__('Tag Name'),
75
  'required' => true,
76
- 'after_element_html' => ' [GLOBAL]',
77
  ));
78
 
79
  $fieldset->addField('status', 'select', array(
@@ -86,14 +92,14 @@ class Mage_Adminhtml_Block_Tag_Edit_Form extends Mage_Adminhtml_Block_Widget_For
86
  Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('tag')->__('Pending'),
87
  Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('tag')->__('Approved'),
88
  ),
89
- 'after_element_html' => ' [GLOBAL]',
90
  ));
91
 
92
  $fieldset->addField('base_popularity', 'text', array(
93
  'name' => 'base_popularity',
94
  'label' => Mage::helper('tag')->__('Base Popularity'),
95
  'title' => Mage::helper('tag')->__('Base Popularity'),
96
- 'after_element_html' => ' [STORE VIEW]',
97
  ));
98
 
99
  if (!$model->getId() && !Mage::getSingleton('adminhtml/session')->getTagData() ) {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
42
  $this->setTitle(Mage::helper('tag')->__('Block Information'));
43
  }
44
 
45
+ /**
46
+ * Prepare form
47
+ *
48
+ * @return Mage_Adminhtml_Block_Widget_Form
49
+ */
50
  protected function _prepareForm()
51
  {
52
  $model = Mage::registry('tag_tag');
55
  array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')
56
  );
57
 
58
+ $fieldset = $form->addFieldset('base_fieldset',
59
+ array('legend'=>Mage::helper('tag')->__('General Information')));
60
 
61
  if ($model->getTagId()) {
62
  $fieldset->addField('tag_id', 'hidden', array(
79
  'label' => Mage::helper('tag')->__('Tag Name'),
80
  'title' => Mage::helper('tag')->__('Tag Name'),
81
  'required' => true,
82
+ 'after_element_html' => ' ' . Mage::helper('adminhtml')->__('[GLOBAL]'),
83
  ));
84
 
85
  $fieldset->addField('status', 'select', array(
92
  Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('tag')->__('Pending'),
93
  Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('tag')->__('Approved'),
94
  ),
95
+ 'after_element_html' => ' ' . Mage::helper('adminhtml')->__('[GLOBAL]'),
96
  ));
97
 
98
  $fieldset->addField('base_popularity', 'text', array(
99
  'name' => 'base_popularity',
100
  'label' => Mage::helper('tag')->__('Base Popularity'),
101
  'title' => Mage::helper('tag')->__('Base Popularity'),
102
+ 'after_element_html' => ' ' . Mage::helper('tag')->__('[STORE VIEW]'),
103
  ));
104
 
105
  if (!$model->getId() && !Mage::getSingleton('adminhtml/session')->getTagData() ) {
app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Grid/Products.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Pending.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Product/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Store/Switcher.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Tag.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Class.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Class/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -45,15 +45,10 @@ class Mage_Adminhtml_Block_Tax_Rate_Form extends Mage_Adminhtml_Block_Widget_For
45
 
46
  protected function _prepareForm()
47
  {
48
- $rateId = (int)$this->getRequest()->getParam('rate');
49
- $rateObject = new Varien_Object();
50
- $rateModel = Mage::getSingleton('tax/calculation_rate');
51
- $rateObject->setData($rateModel->getData());
52
-
53
  $form = new Varien_Data_Form();
54
 
55
- $countries = Mage::getModel('adminhtml/system_config_source_country')
56
- ->toOptionArray();
57
  unset($countries[0]);
58
 
59
  if (!$rateObject->hasTaxCountryId()) {
@@ -69,125 +64,84 @@ class Mage_Adminhtml_Block_Tax_Rate_Form extends Mage_Adminhtml_Block_Widget_For
69
  ->addCountryFilter($rateObject->getTaxCountryId());
70
 
71
  $regions = $regionCollection->toOptionArray();
72
-
73
  if ($regions) {
74
  $regions[0]['label'] = '*';
75
  } else {
76
- $regions = array(array('value'=>'', 'label'=>'*'));
77
  }
78
 
79
- $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('tax')->__('Tax Rate Information')));
80
 
81
- if( $rateObject->getTaxCalculationRateId() > 0 ) {
82
- $fieldset->addField('tax_calculation_rate_id', 'hidden',
83
- array(
84
- 'name' => "tax_calculation_rate_id",
85
- 'value' => $rateObject->getTaxCalculationRateId()
86
- )
87
- );
88
  }
89
 
90
- $fieldset->addField('code', 'text',
91
- array(
92
- 'name' => 'code',
93
- 'label' => Mage::helper('tax')->__('Tax Identifier'),
94
- 'title' => Mage::helper('tax')->__('Tax Identifier'),
95
- 'class' => 'required-entry',
96
- 'value' => $rateModel->getCode(),
97
- 'required' => true,
98
- )
99
- );
100
-
101
- $fieldset->addField('tax_country_id', 'select',
102
- array(
103
- 'name' => 'tax_country_id',
104
- 'label' => Mage::helper('tax')->__('Country'),
105
- 'required' => true,
106
- 'values' => $countries
107
- )
108
- );
109
 
110
- $fieldset->addField('tax_region_id', 'select',
111
- array(
112
- 'name' => 'tax_region_id',
113
- 'label' => Mage::helper('tax')->__('State'),
114
- 'values' => $regions
115
- )
116
- );
117
 
118
- /* FIXME!!! {*
119
- $fieldset->addField('tax_county_id', 'select',
120
- array(
121
- 'name' => 'tax_county_id',
122
- 'label' => Mage::helper('tax')->__('County'),
123
- 'values' => array(
124
- array(
125
- 'label' => '*',
126
- 'value' => ''
127
- )
128
- ),
129
- 'value' => $rateObject->getTaxCountyId()
130
- )
131
- );
132
- } */
133
 
134
  $fieldset->addField('zip_is_range', 'select', array(
135
- 'name' => 'zip_is_range',
136
- 'label' => Mage::helper('tax')->__('Zip/Post is Range'),
137
- 'options' => array(
138
- '0' => Mage::helper('tax')->__('No'),
139
- '1' => Mage::helper('tax')->__('Yes'),
140
- )
141
  ));
142
 
143
  if (!$rateObject->hasTaxPostcode()) {
144
  $rateObject->setTaxPostcode(Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_DEFAULT_POSTCODE));
145
  }
146
 
147
- $fieldset->addField('tax_postcode', 'text',
148
- array(
149
- 'name' => 'tax_postcode',
150
- 'label' => Mage::helper('tax')->__('Zip/Post Code'),
151
- 'note' => Mage::helper('tax')->__("'*' - matches any; 'xyz*' - matches any that begins on 'xyz' and not longer than %d.", Mage::helper('tax')->getPostCodeSubStringLength()),
152
- )
153
- );
154
-
155
- $fieldset->addField('zip_from', 'text',
156
- array(
157
- 'name' => 'zip_from',
158
- 'label' => Mage::helper('tax')->__('Range From'),
159
- 'value' => $rateObject->getZipFrom(),
160
- 'required' => true,
161
- 'class' => 'validate-digits'
162
- )
163
- );
164
 
165
- $fieldset->addField('zip_to', 'text',
166
- array(
167
- 'name' => 'zip_to',
168
- 'label' => Mage::helper('tax')->__('Range To'),
169
- 'value' => $rateObject->getZipTo(),
170
- 'required' => true,
171
- 'class' => 'validate-digits'
172
- )
173
- );
174
 
175
- if ($rateObject->getRate()) {
176
- $value = 1*$rateObject->getRate();
177
- } else {
178
- $value = 0;
179
- }
 
 
180
 
181
- $fieldset->addField('rate', 'text',
182
- array(
183
- 'name' => "rate",
184
- 'label' => Mage::helper('tax')->__('Rate Percent'),
185
- 'title' => Mage::helper('tax')->__('Rate Percent'),
186
- 'value' => number_format($value, 4),
187
- 'required' => true,
188
- 'class' => 'validate-not-negative-number'
189
- )
190
- );
191
 
192
  $form->setAction($this->getUrl('*/tax_rate/save'));
193
  $form->setUseContainer(true);
@@ -198,18 +152,23 @@ class Mage_Adminhtml_Block_Tax_Rate_Form extends Mage_Adminhtml_Block_Widget_For
198
  $form->addElement(Mage::getBlockSingleton('adminhtml/tax_rate_title_fieldset')->setLegend(Mage::helper('tax')->__('Tax Titles')));
199
  }
200
 
201
- $form->setValues($rateObject->getData());
 
 
 
 
202
  $this->setForm($form);
203
 
204
- $this->setChild('form_after',
 
205
  $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
206
- ->addFieldMap("zip_is_range", 'zip_is_range')
207
- ->addFieldMap("tax_postcode", 'tax_postcode')
208
- ->addFieldMap("zip_from", 'zip_from')
209
- ->addFieldMap("zip_to", 'zip_to')
210
- ->addFieldDependence('zip_from', 'zip_is_range', '1')
211
- ->addFieldDependence('zip_to', 'zip_is_range', '1')
212
- ->addFieldDependence('tax_postcode', 'zip_is_range', '0')
213
  );
214
 
215
  return parent::_prepareForm();
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
45
 
46
  protected function _prepareForm()
47
  {
48
+ $rateObject = new Varien_Object(Mage::getSingleton('tax/calculation_rate')->getData());
 
 
 
 
49
  $form = new Varien_Data_Form();
50
 
51
+ $countries = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray();
 
52
  unset($countries[0]);
53
 
54
  if (!$rateObject->hasTaxCountryId()) {
64
  ->addCountryFilter($rateObject->getTaxCountryId());
65
 
66
  $regions = $regionCollection->toOptionArray();
 
67
  if ($regions) {
68
  $regions[0]['label'] = '*';
69
  } else {
70
+ $regions = array(array('value' => '', 'label' => '*'));
71
  }
72
 
73
+ $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('tax')->__('Tax Rate Information')));
74
 
75
+ if ($rateObject->getTaxCalculationRateId() > 0) {
76
+ $fieldset->addField('tax_calculation_rate_id', 'hidden', array(
77
+ 'name' => 'tax_calculation_rate_id',
78
+ 'value' => $rateObject->getTaxCalculationRateId()
79
+ ));
 
 
80
  }
81
 
82
+ $fieldset->addField('code', 'text', array(
83
+ 'name' => 'code',
84
+ 'label' => Mage::helper('tax')->__('Tax Identifier'),
85
+ 'title' => Mage::helper('tax')->__('Tax Identifier'),
86
+ 'class' => 'required-entry',
87
+ 'required' => true,
88
+ ));
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
+ $fieldset->addField('tax_country_id', 'select', array(
91
+ 'name' => 'tax_country_id',
92
+ 'label' => Mage::helper('tax')->__('Country'),
93
+ 'required' => true,
94
+ 'values' => $countries
95
+ ));
 
96
 
97
+ $fieldset->addField('tax_region_id', 'select', array(
98
+ 'name' => 'tax_region_id',
99
+ 'label' => Mage::helper('tax')->__('State'),
100
+ 'values' => $regions
101
+ ));
 
 
 
 
 
 
 
 
 
 
102
 
103
  $fieldset->addField('zip_is_range', 'select', array(
104
+ 'name' => 'zip_is_range',
105
+ 'label' => Mage::helper('tax')->__('Zip/Post is Range'),
106
+ 'options' => array(
107
+ '0' => Mage::helper('tax')->__('No'),
108
+ '1' => Mage::helper('tax')->__('Yes'),
109
+ )
110
  ));
111
 
112
  if (!$rateObject->hasTaxPostcode()) {
113
  $rateObject->setTaxPostcode(Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_DEFAULT_POSTCODE));
114
  }
115
 
116
+ $fieldset->addField('tax_postcode', 'text', array(
117
+ 'name' => 'tax_postcode',
118
+ 'label' => Mage::helper('tax')->__('Zip/Post Code'),
119
+ 'note' => Mage::helper('tax')->__("'*' - matches any; 'xyz*' - matches any that begins on 'xyz' and not longer than %d.", Mage::helper('tax')->getPostCodeSubStringLength()),
120
+ ));
 
 
 
 
 
 
 
 
 
 
 
 
121
 
122
+ $fieldset->addField('zip_from', 'text', array(
123
+ 'name' => 'zip_from',
124
+ 'label' => Mage::helper('tax')->__('Range From'),
125
+ 'required' => true,
126
+ 'maxlength' => 9,
127
+ 'class' => 'validate-digits'
128
+ ));
 
 
129
 
130
+ $fieldset->addField('zip_to', 'text', array(
131
+ 'name' => 'zip_to',
132
+ 'label' => Mage::helper('tax')->__('Range To'),
133
+ 'required' => true,
134
+ 'maxlength' => 9,
135
+ 'class' => 'validate-digits'
136
+ ));
137
 
138
+ $fieldset->addField('rate', 'text', array(
139
+ 'name' => 'rate',
140
+ 'label' => Mage::helper('tax')->__('Rate Percent'),
141
+ 'title' => Mage::helper('tax')->__('Rate Percent'),
142
+ 'required' => true,
143
+ 'class' => 'validate-not-negative-number'
144
+ ));
 
 
 
145
 
146
  $form->setAction($this->getUrl('*/tax_rate/save'));
147
  $form->setUseContainer(true);
152
  $form->addElement(Mage::getBlockSingleton('adminhtml/tax_rate_title_fieldset')->setLegend(Mage::helper('tax')->__('Tax Titles')));
153
  }
154
 
155
+ $rateData = $rateObject->getData();
156
+ if ($rateObject->getZipIsRange()) {
157
+ list($rateData['zip_from'], $rateData['zip_to']) = explode('-', $rateData['tax_postcode']);
158
+ }
159
+ $form->setValues($rateData);
160
  $this->setForm($form);
161
 
162
+ $this->setChild(
163
+ 'form_after',
164
  $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
165
+ ->addFieldMap('zip_is_range', 'zip_is_range')
166
+ ->addFieldMap('tax_postcode', 'tax_postcode')
167
+ ->addFieldMap('zip_from', 'zip_from')
168
+ ->addFieldMap('zip_to', 'zip_to')
169
+ ->addFieldDependence('zip_from', 'zip_is_range', '1')
170
+ ->addFieldDependence('zip_to', 'zip_is_range', '1')
171
+ ->addFieldDependence('tax_postcode', 'zip_is_range', '0')
172
  );
173
 
174
  return parent::_prepareForm();
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Tax_Rate_Grid extends Mage_Adminhtml_Block_Widget_Grid
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Tax_Rate_Grid extends Mage_Adminhtml_Block_Widget_Grid
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExport.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title/Fieldset.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rule.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Tax/Rule/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Tax_Rule_Grid extends Mage_Adminhtml_Block_Widget_Grid
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Block_Tax_Rule_Grid extends Mage_Adminhtml_Block_Widget_Grid
app/code/core/Mage/Adminhtml/Block/Template.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Text/List.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Urlrewrite.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Urlrewrite/Category/Tree.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -158,6 +158,8 @@ class Mage_Adminhtml_Block_Urlrewrite_Edit_Form extends Mage_Adminhtml_Block_Wid
158
  'disabled' => true,
159
  'value' => $formValues['store_id'],
160
  ));
 
 
161
  if ($noStoreError) {
162
  $element->setAfterElementHtml($noStoreError);
163
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
158
  'disabled' => true,
159
  'value' => $formValues['store_id'],
160
  ));
161
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
162
+ $element->setRenderer($renderer);
163
  if ($noStoreError) {
164
  $element->setAfterElementHtml($noStoreError);
165
  }
app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Urlrewrite/Link.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Urlrewrite/Selector.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Accordion.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Accordion/Item.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Breadcrumbs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Button.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -56,14 +56,16 @@ class Mage_Adminhtml_Block_Widget_Button extends Mage_Adminhtml_Block_Widget
56
  $html = $this->getBeforeHtml().'<button '
57
  . ($this->getId()?' id="'.$this->getId() . '"':'')
58
  . ($this->getElementName()?' name="'.$this->getElementName() . '"':'')
59
- . ($this->getTitle()?' title="'.$this->getTitle() . '"':'')
 
 
60
  . ' type="'.$this->getType() . '"'
61
  . ' class="scalable ' . $this->getClass() . ($this->getDisabled() ? ' disabled' : '') . '"'
62
  . ' onclick="'.$this->getOnClick().'"'
63
  . ' style="'.$this->getStyle() .'"'
64
  . ($this->getValue()?' value="'.$this->getValue() . '"':'')
65
  . ($this->getDisabled() ? ' disabled="disabled"' : '')
66
- . '><span>' .$this->getLabel().'</span></button>'.$this->getAfterHtml();
67
 
68
  return $html;
69
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
56
  $html = $this->getBeforeHtml().'<button '
57
  . ($this->getId()?' id="'.$this->getId() . '"':'')
58
  . ($this->getElementName()?' name="'.$this->getElementName() . '"':'')
59
+ . ' title="'
60
+ . Mage::helper('core')->quoteEscape($this->getTitle() ? $this->getTitle() : $this->getLabel())
61
+ . '"'
62
  . ' type="'.$this->getType() . '"'
63
  . ' class="scalable ' . $this->getClass() . ($this->getDisabled() ? ' disabled' : '') . '"'
64
  . ' onclick="'.$this->getOnClick().'"'
65
  . ' style="'.$this->getStyle() .'"'
66
  . ($this->getValue()?' value="'.$this->getValue() . '"':'')
67
  . ($this->getDisabled() ? ' disabled="disabled"' : '')
68
+ . '><span><span><span>' .$this->getLabel().'</span></span></span></button>'.$this->getAfterHtml();
69
 
70
  return $html;
71
  }
app/code/core/Mage/Adminhtml/Block/Widget/Container.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Form.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -201,11 +201,10 @@ class Mage_Adminhtml_Block_Widget_Form extends Mage_Adminhtml_Block_Widget
201
  $element->setValues($attribute->getSource()->getAllOptions(true, true));
202
  } else if ($inputType == 'multiselect') {
203
  $element->setValues($attribute->getSource()->getAllOptions(false, true));
 
204
  } else if ($inputType == 'date') {
205
  $element->setImage($this->getSkinUrl('images/grid-cal.gif'));
206
- $element->setFormat(
207
- Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)
208
- );
209
  } else if ($inputType == 'multiline') {
210
  $element->setLineCount($attribute->getMultilineCount());
211
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
201
  $element->setValues($attribute->getSource()->getAllOptions(true, true));
202
  } else if ($inputType == 'multiselect') {
203
  $element->setValues($attribute->getSource()->getAllOptions(false, true));
204
+ $element->setCanBeEmpty(true);
205
  } else if ($inputType == 'date') {
206
  $element->setImage($this->getSkinUrl('images/grid-cal.gif'));
207
+ $element->setFormat(Mage::app()->getLocale()->getDateFormatWithLongYear());
 
 
208
  } else if ($inputType == 'multiline') {
209
  $element->setLineCount($attribute->getMultilineCount());
210
  }
app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Form/Element.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -73,8 +73,6 @@ class Mage_Adminhtml_Block_Widget_Form_Element_Dependence extends Mage_Adminhtml
73
  /**
74
  * Register field name dependence one from each other by specified values
75
  *
76
- * @TODO: multiple values per dependency is not implemented. The values OR comparison is anticipated
77
- *
78
  * @param string $fieldName
79
  * @param string $fieldNameFrom
80
  * @param string|array $refValues
@@ -82,9 +80,6 @@ class Mage_Adminhtml_Block_Widget_Form_Element_Dependence extends Mage_Adminhtml
82
  */
83
  public function addFieldDependence($fieldName, $fieldNameFrom, $refValues)
84
  {
85
- if (is_array($refValues)) {
86
- Mage::throwException('Dependency from multiple values is not implemented yet. Please fix to your widget.xml');
87
- }
88
  $this->_depends[$fieldName][$fieldNameFrom] = $refValues;
89
  return $this;
90
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
73
  /**
74
  * Register field name dependence one from each other by specified values
75
  *
 
 
76
  * @param string $fieldName
77
  * @param string $fieldNameFrom
78
  * @param string|array $refValues
80
  */
81
  public function addFieldDependence($fieldName, $fieldNameFrom, $refValues)
82
  {
 
 
 
83
  $this->_depends[$fieldName][$fieldNameFrom] = $refValues;
84
  return $this;
85
  }
app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Gallery.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Element.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,8 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface
 
35
  {
36
  protected $_element;
37
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element extends Mage_Adminhtml_Block_Template
35
+ implements Varien_Data_Form_Element_Renderer_Interface
36
  {
37
  protected $_element;
38
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -175,6 +175,13 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget
175
  */
176
  protected $_massactionIdField = null;
177
 
 
 
 
 
 
 
 
178
  /**
179
  * Massaction block name
180
  *
@@ -543,8 +550,8 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget
543
 
544
  protected function _preparePage()
545
  {
546
- $this->getCollection()->setPageSize($this->getParam($this->getVarNameLimit(), $this->_defaultLimit));
547
- $this->getCollection()->setCurPage($this->getParam($this->getVarNamePage(), $this->_defaultPage));
548
  }
549
 
550
  protected function _prepareColumns()
@@ -589,11 +596,12 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget
589
  $columnId = 'massaction';
590
  $massactionColumn = $this->getLayout()->createBlock('adminhtml/widget_grid_column')
591
  ->setData(array(
592
- 'index' => $this->getMassactionIdField(),
593
- 'type' => 'massaction',
594
- 'name' => $this->getMassactionBlock()->getFormFieldName(),
595
- 'align' => 'center',
596
- 'is_system' => true
 
597
  ));
598
 
599
  if ($this->getNoFilterMassactionColumn()) {
@@ -793,7 +801,7 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget
793
  /**
794
  * Retrieve grid export types
795
  *
796
- * @return array
797
  */
798
  public function getExportTypes()
799
  {
@@ -1287,7 +1295,7 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget
1287
  }
1288
 
1289
  /**
1290
- * Retrive massaction row identifier field
1291
  *
1292
  * @return string
1293
  */
@@ -1308,6 +1316,28 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget
1308
  return $this;
1309
  }
1310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1311
  /**
1312
  * Retrive massaction block name
1313
  *
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
175
  */
176
  protected $_massactionIdField = null;
177
 
178
+ /**
179
+ * Massaction row id filter
180
+ *
181
+ * @var string
182
+ */
183
+ protected $_massactionIdFilter = null;
184
+
185
  /**
186
  * Massaction block name
187
  *
550
 
551
  protected function _preparePage()
552
  {
553
+ $this->getCollection()->setPageSize((int) $this->getParam($this->getVarNameLimit(), $this->_defaultLimit));
554
+ $this->getCollection()->setCurPage((int) $this->getParam($this->getVarNamePage(), $this->_defaultPage));
555
  }
556
 
557
  protected function _prepareColumns()
596
  $columnId = 'massaction';
597
  $massactionColumn = $this->getLayout()->createBlock('adminhtml/widget_grid_column')
598
  ->setData(array(
599
+ 'index' => $this->getMassactionIdField(),
600
+ 'filter_index' => $this->getMassactionIdFilter(),
601
+ 'type' => 'massaction',
602
+ 'name' => $this->getMassactionBlock()->getFormFieldName(),
603
+ 'align' => 'center',
604
+ 'is_system' => true
605
  ));
606
 
607
  if ($this->getNoFilterMassactionColumn()) {
801
  /**
802
  * Retrieve grid export types
803
  *
804
+ * @return array|false
805
  */
806
  public function getExportTypes()
807
  {
1295
  }
1296
 
1297
  /**
1298
+ * Retrieve massaction row identifier field
1299
  *
1300
  * @return string
1301
  */
1316
  return $this;
1317
  }
1318
 
1319
+ /**
1320
+ * Retrieve massaction row identifier filter
1321
+ *
1322
+ * @return string
1323
+ */
1324
+ public function getMassactionIdFilter()
1325
+ {
1326
+ return $this->_massactionIdFilter;
1327
+ }
1328
+
1329
+ /**
1330
+ * Set massaction row identifier filter
1331
+ *
1332
+ * @param string $idFilter
1333
+ * @return Mage_Adminhtml_Block_Widget_Grid
1334
+ */
1335
+ public function setMassactionIdFilter($idFilter)
1336
+ {
1337
+ $this->_massactionIdFilter = $idFilter;
1338
+ return $this;
1339
+ }
1340
+
1341
  /**
1342
  * Retrive massaction block name
1343
  *
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Block.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Country.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Massaction.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Radio.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Range.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Store.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -30,11 +30,17 @@
30
  *
31
  * @category Mage
32
  * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Store extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Abstract
 
36
  {
37
 
 
 
 
 
 
38
  public function getHtml()
39
  {
40
  $storeModel = Mage::getSingleton('adminhtml/system_store');
@@ -45,10 +51,12 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Store extends Mage_Adminhtm
45
 
46
  $allShow = $this->getColumn()->getStoreAll();
47
 
48
- $html = '<select name="' . $this->_getHtmlName() . '" ' . $this->getColumn()->getValidateClass() . '>';
 
49
  $value = $this->getColumn()->getValue();
50
  if ($allShow) {
51
- $html .= '<option value="0"' . ($value == 0 ? ' selected="selected"' : '') . '>' . Mage::helper('adminhtml')->__('All Store Views') . '</option>';
 
52
  } else {
53
  $html .= '<option value=""' . (!$value ? ' selected="selected"' : '') . '></option>';
54
  }
@@ -65,14 +73,17 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Store extends Mage_Adminhtm
65
  }
66
  if (!$websiteShow) {
67
  $websiteShow = true;
68
- $html .= '<optgroup label="' . $website->getName() . '"></optgroup>';
69
  }
70
  if (!$groupShow) {
71
  $groupShow = true;
72
- $html .= '<optgroup label="&nbsp;&nbsp;&nbsp;&nbsp;' . $group->getName() . '">';
 
73
  }
74
  $value = $this->getValue();
75
- $html .= '<option value="' . $store->getId() . '"' . ($value == $store->getId() ? ' selected="selected"' : '') . '>&nbsp;&nbsp;&nbsp;&nbsp;' . $store->getName() . '</option>';
 
 
76
  }
77
  if ($groupShow) {
78
  $html .= '</optgroup>';
@@ -87,6 +98,11 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Store extends Mage_Adminhtm
87
  return $html;
88
  }
89
 
 
 
 
 
 
90
  public function getCondition()
91
  {
92
  if (is_null($this->getValue())) {
@@ -94,8 +110,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Store extends Mage_Adminhtm
94
  }
95
  if ($this->getValue() == '_deleted_') {
96
  return array('null' => true);
97
- }
98
- else {
99
  return array('eq' => $this->getValue());
100
  }
101
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
30
  *
31
  * @category Mage
32
  * @package Mage_Adminhtml
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Store
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Abstract
37
  {
38
 
39
+ /**
40
+ * Render HTML of the element
41
+ *
42
+ * @return string
43
+ */
44
  public function getHtml()
45
  {
46
  $storeModel = Mage::getSingleton('adminhtml/system_store');
51
 
52
  $allShow = $this->getColumn()->getStoreAll();
53
 
54
+ $html = '<select name="' . $this->escapeHtml($this->_getHtmlName()) . '" '
55
+ . $this->getColumn()->getValidateClass() . '>';
56
  $value = $this->getColumn()->getValue();
57
  if ($allShow) {
58
+ $html .= '<option value="0"' . ($value == 0 ? ' selected="selected"' : '') . '>'
59
+ . Mage::helper('adminhtml')->__('All Store Views') . '</option>';
60
  } else {
61
  $html .= '<option value=""' . (!$value ? ' selected="selected"' : '') . '></option>';
62
  }
73
  }
74
  if (!$websiteShow) {
75
  $websiteShow = true;
76
+ $html .= '<optgroup label="' . $this->escapeHtml($website->getName()) . '"></optgroup>';
77
  }
78
  if (!$groupShow) {
79
  $groupShow = true;
80
+ $html .= '<optgroup label="&nbsp;&nbsp;&nbsp;&nbsp;'
81
+ . $this->escapeHtml($group->getName()) . '">';
82
  }
83
  $value = $this->getValue();
84
+ $selected = $value == $store->getId() ? ' selected="selected"' : '';
85
+ $html .= '<option value="' . $store->getId() . '"' . $selected . '>&nbsp;&nbsp;&nbsp;&nbsp;'
86
+ . $this->escapeHtml($store->getName()) . '</option>';
87
  }
88
  if ($groupShow) {
89
  $html .= '</optgroup>';
98
  return $html;
99
  }
100
 
101
+ /**
102
+ * Form condition from element's value
103
+ *
104
+ * @return array|null
105
+ */
106
  public function getCondition()
107
  {
108
  if (is_null($this->getValue())) {
110
  }
111
  if ($this->getValue() == '_deleted_') {
112
  return array('null' => true);
113
+ } else {
 
114
  return array('eq' => $this->getValue());
115
  }
116
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Theme.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -105,7 +105,6 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
105
 
106
  public function renderHeader()
107
  {
108
- $out = '';
109
  if (false !== $this->getColumn()->getGrid()->getSortable() && false !== $this->getColumn()->getSortable()) {
110
  $className = 'not-sort';
111
  $dir = strtolower($this->getColumn()->getDir());
@@ -116,8 +115,7 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
116
  $out = '<a href="#" name="' . $this->getColumn()->getId() . '" title="' . $nDir
117
  . '" class="' . $className . '"><span class="sort-title">'
118
  . $this->getColumn()->getHeader().'</span></a>';
119
- }
120
- else {
121
  $out = $this->getColumn()->getHeader();
122
  }
123
  return $out;
@@ -126,13 +124,6 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
126
  public function renderProperty()
127
  {
128
  $out = '';
129
- /**
130
- * Now we generate 2 "col" definition instead span=2
131
- */
132
- // if ($this->getColumn()->getEditable() && !$this->getColumn()->getEditOnly()) {
133
- // $out .= ' span="2"';
134
- // }
135
-
136
  $width = $this->_defaultWidth;
137
 
138
  if ($this->getColumn()->hasData('width')) {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
105
 
106
  public function renderHeader()
107
  {
 
108
  if (false !== $this->getColumn()->getGrid()->getSortable() && false !== $this->getColumn()->getSortable()) {
109
  $className = 'not-sort';
110
  $dir = strtolower($this->getColumn()->getDir());
115
  $out = '<a href="#" name="' . $this->getColumn()->getId() . '" title="' . $nDir
116
  . '" class="' . $className . '"><span class="sort-title">'
117
  . $this->getColumn()->getHeader().'</span></a>';
118
+ } else {
 
119
  $out = $this->getColumn()->getHeader();
120
  }
121
  return $out;
124
  public function renderProperty()
125
  {
126
  $out = '';
 
 
 
 
 
 
 
127
  $width = $this->_defaultWidth;
128
 
129
  if ($this->getColumn()->hasData('width')) {
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,9 +29,10 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
 
35
  {
36
 
37
  /**
@@ -82,7 +83,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action extends Mage_Admin
82
  $actionCaption = '';
83
  $this->_transformActionData($action, $actionCaption, $row);
84
 
85
- $htmlAttibutes = array('value'=>$this->htmlEscape(Mage::helper('core')->jsonEncode($action)));
86
  $actionAttributes->setData($htmlAttibutes);
87
  return '<option ' . $actionAttributes->serialize() . '>' . $actionCaption . '</option>';
88
  }
@@ -103,7 +104,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action extends Mage_Admin
103
 
104
  if(isset($action['confirm'])) {
105
  $action['onclick'] = 'return window.confirm(\''
106
- . addslashes($this->htmlEscape($action['confirm']))
107
  . '\')';
108
  unset($action['confirm']);
109
  }
@@ -122,15 +123,15 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action extends Mage_Admin
122
  */
123
  protected function _transformActionData(&$action, &$actionCaption, Varien_Object $row)
124
  {
125
- foreach ( $action as $attibute => $value ) {
126
- if(isset($action[$attibute]) && !is_array($action[$attibute])) {
127
- $this->getColumn()->setFormat($action[$attibute]);
128
- $action[$attibute] = parent::render($row);
129
  } else {
130
  $this->getColumn()->setFormat(null);
131
  }
132
 
133
- switch ($attibute) {
134
  case 'caption':
135
  $actionCaption = $action['caption'];
136
  unset($action['caption']);
@@ -151,7 +152,8 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action extends Mage_Admin
151
  break;
152
 
153
  case 'popup':
154
- $action['onclick'] = 'popWin(this.href, \'_blank\', \'width=800,height=700,resizable=1,scrollbars=1\');return false;';
 
155
  break;
156
 
157
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
36
  {
37
 
38
  /**
83
  $actionCaption = '';
84
  $this->_transformActionData($action, $actionCaption, $row);
85
 
86
+ $htmlAttibutes = array('value'=>$this->escapeHtml(Mage::helper('core')->jsonEncode($action)));
87
  $actionAttributes->setData($htmlAttibutes);
88
  return '<option ' . $actionAttributes->serialize() . '>' . $actionCaption . '</option>';
89
  }
104
 
105
  if(isset($action['confirm'])) {
106
  $action['onclick'] = 'return window.confirm(\''
107
+ . addslashes($this->escapeHtml($action['confirm']))
108
  . '\')';
109
  unset($action['confirm']);
110
  }
123
  */
124
  protected function _transformActionData(&$action, &$actionCaption, Varien_Object $row)
125
  {
126
+ foreach ( $action as $attribute => $value ) {
127
+ if(isset($action[$attribute]) && !is_array($action[$attribute])) {
128
+ $this->getColumn()->setFormat($action[$attribute]);
129
+ $action[$attribute] = parent::render($row);
130
  } else {
131
  $this->getColumn()->setFormat(null);
132
  }
133
 
134
+ switch ($attribute) {
135
  case 'caption':
136
  $actionCaption = $action['caption'];
137
  unset($action['caption']);
152
  break;
153
 
154
  case 'popup':
155
+ $action['onclick'] =
156
+ 'popWin(this.href,\'_blank\',\'width=800,height=700,resizable=1,scrollbars=1\');return false;';
157
  break;
158
 
159
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Checkbox.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,13 +29,19 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
35
  {
36
  protected $_defaultWidth = 55;
37
  protected $_values;
38
 
 
 
 
 
 
39
  public function getValues()
40
  {
41
  if (is_null($this->_values)) {
@@ -79,11 +85,26 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox extends Mage_Adm
79
  return $this->_getCheckboxHtml($v, $checked);
80
  }
81
 
 
 
 
 
 
82
  protected function _getCheckboxHtml($value, $checked)
83
  {
84
- return '<input type="checkbox" name="'.$this->getColumn()->getFieldName().'" value="' . $value . '" class="'. ($this->getColumn()->getInlineCss() ? $this->getColumn()->getInlineCss() : 'checkbox' ).'"'.$checked.$this->getDisabled().'/>';
 
 
 
 
 
85
  }
86
 
 
 
 
 
 
87
  public function renderHeader()
88
  {
89
  if($this->getColumn()->getHeader()) {
@@ -99,6 +120,11 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox extends Mage_Adm
99
  if ($this->getColumn()->getDisabled()) {
100
  $disabled = ' disabled="disabled"';
101
  }
102
- return '<input type="checkbox" name="'.$this->getColumn()->getFieldName().'" onclick="'.$this->getColumn()->getGrid()->getJsObjectName().'.checkCheckboxes(this)" class="checkbox"'.$checked.$disabled.' title="'.Mage::helper('adminhtml')->__('Select All').'"/>';
 
 
 
 
 
103
  }
104
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  protected $_defaultWidth = 55;
38
  protected $_values;
39
 
40
+ /**
41
+ * Returns values of the column
42
+ *
43
+ * @return array
44
+ */
45
  public function getValues()
46
  {
47
  if (is_null($this->_values)) {
85
  return $this->_getCheckboxHtml($v, $checked);
86
  }
87
 
88
+ /**
89
+ * @param string $value Value of the element
90
+ * @param bool $checked Whether it is checked
91
+ * @return string
92
+ */
93
  protected function _getCheckboxHtml($value, $checked)
94
  {
95
+ $html = '<input type="checkbox" ';
96
+ $html .= 'name="' . $this->getColumn()->getFieldName() . '" ';
97
+ $html .= 'value="' . $this->escapeHtml($value) . '" ';
98
+ $html .= 'class="'. ($this->getColumn()->getInlineCss() ? $this->getColumn()->getInlineCss() : 'checkbox') .'"';
99
+ $html .= $checked . $this->getDisabled() . '/>';
100
+ return $html;
101
  }
102
 
103
+ /**
104
+ * Renders header of the column
105
+ *
106
+ * @return string
107
+ */
108
  public function renderHeader()
109
  {
110
  if($this->getColumn()->getHeader()) {
120
  if ($this->getColumn()->getDisabled()) {
121
  $disabled = ' disabled="disabled"';
122
  }
123
+ $html = '<input type="checkbox" ';
124
+ $html .= 'name="' . $this->getColumn()->getFieldName() . '" ';
125
+ $html .= 'onclick="' . $this->getColumn()->getGrid()->getJsObjectName() . '.checkCheckboxes(this)" ';
126
+ $html .= 'class="checkbox"' . $checked . $disabled . ' ';
127
+ $html .= 'title="'.Mage::helper('adminhtml')->__('Select All') . '"/>';
128
+ return $html;
129
  }
130
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Concat.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,10 +29,11 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Concat extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
 
38
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Concat
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
 
39
  /**
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php CHANGED
@@ -20,16 +20,19 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
  * Country column renderer
29
  *
30
- * @author Magento Core Team <core@magentocommerce.com>
 
 
31
  */
32
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Country extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
33
  {
34
  /**
35
  * Render country grid column
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
  * Country column renderer
29
  *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Country
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  /**
38
  * Render country grid column
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,10 +29,11 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
  protected $_defaultWidth = 100;
38
 
@@ -65,6 +66,12 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency extends Mage_Adm
65
  return $this->getColumn()->getDefault();
66
  }
67
 
 
 
 
 
 
 
68
  protected function _getCurrencyCode($row)
69
  {
70
  if ($code = $this->getColumn()->getCurrencyCode()) {
@@ -76,6 +83,12 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency extends Mage_Adm
76
  return false;
77
  }
78
 
 
 
 
 
 
 
79
  protected function _getRate($row)
80
  {
81
  if ($rate = $this->getColumn()->getRate()) {
@@ -87,6 +100,11 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency extends Mage_Adm
87
  return 1;
88
  }
89
 
 
 
 
 
 
90
  public function renderCss()
91
  {
92
  return parent::renderCss() . ' a-right';
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
  protected $_defaultWidth = 100;
39
 
66
  return $this->getColumn()->getDefault();
67
  }
68
 
69
+ /**
70
+ * Returns currency code, false on error
71
+ *
72
+ * @param $row
73
+ * @return string|false
74
+ */
75
  protected function _getCurrencyCode($row)
76
  {
77
  if ($code = $this->getColumn()->getCurrencyCode()) {
83
  return false;
84
  }
85
 
86
+ /**
87
+ * Get rate for current row, 1 by default
88
+ *
89
+ * @param $row
90
+ * @return float|int
91
+ */
92
  protected function _getRate($row)
93
  {
94
  if ($rate = $this->getColumn()->getRate()) {
100
  return 1;
101
  }
102
 
103
+ /**
104
+ * Returns HTML for CSS
105
+ *
106
+ * @return string
107
+ */
108
  public function renderCss()
109
  {
110
  return parent::renderCss() . ' a-right';
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,10 +29,11 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
  protected $_defaultWidth = 160;
38
  /**
@@ -56,7 +57,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date extends Mage_Adminht
56
  );
57
  }
58
  catch (Exception $e) {
59
-
60
  }
61
  }
62
  $format = self::$_format;
@@ -76,15 +77,18 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date extends Mage_Adminht
76
  $format = $this->_getFormat();
77
  try {
78
  if($this->getColumn()->getGmtoffset()) {
79
- $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
 
80
  } else {
81
- $data = Mage::getSingleton('core/locale')->date($data, Zend_Date::ISO_8601, null, false)->toString($format);
 
82
  }
83
  }
84
  catch (Exception $e)
85
  {
86
  if($this->getColumn()->getTimezone()) {
87
- $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
 
88
  } else {
89
  $data = Mage::getSingleton('core/locale')->date($data, null, null, false)->toString($format);
90
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
  protected $_defaultWidth = 160;
39
  /**
57
  );
58
  }
59
  catch (Exception $e) {
60
+ Mage::logException($e);
61
  }
62
  }
63
  $format = self::$_format;
77
  $format = $this->_getFormat();
78
  try {
79
  if($this->getColumn()->getGmtoffset()) {
80
+ $data = Mage::app()->getLocale()
81
+ ->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
82
  } else {
83
+ $data = Mage::getSingleton('core/locale')
84
+ ->date($data, Zend_Date::ISO_8601, null, false)->toString($format);
85
  }
86
  }
87
  catch (Exception $e)
88
  {
89
  if($this->getColumn()->getTimezone()) {
90
+ $data = Mage::app()->getLocale()
91
+ ->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
92
  } else {
93
  $data = Mage::getSingleton('core/locale')->date($data, null, null, false)->toString($format);
94
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,10 +29,11 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Datetime extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
  /**
38
  * Date format string
@@ -55,7 +56,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Datetime extends Mage_Adm
55
  );
56
  }
57
  catch (Exception $e) {
58
-
59
  }
60
  }
61
  $format = self::$_format;
@@ -74,11 +75,13 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Datetime extends Mage_Adm
74
  if ($data = $this->_getValue($row)) {
75
  $format = $this->_getFormat();
76
  try {
77
- $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
 
78
  }
79
  catch (Exception $e)
80
  {
81
- $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
 
82
  }
83
  return $data;
84
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Datetime
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
  /**
39
  * Date format string
56
  );
57
  }
58
  catch (Exception $e) {
59
+ Mage::logException($e);
60
  }
61
  }
62
  $format = self::$_format;
75
  if ($data = $this->_getValue($row)) {
76
  $format = $this->_getFormat();
77
  try {
78
+ $data = Mage::app()->getLocale()
79
+ ->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
80
  }
81
  catch (Exception $e)
82
  {
83
+ $data = Mage::app()->getLocale()
84
+ ->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
85
  }
86
  return $data;
87
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,9 +29,10 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Input extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
35
  {
36
  protected $_values;
37
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Input
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  protected $_values;
38
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,13 +29,26 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
  interface Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface
36
  {
 
 
 
 
 
 
 
37
  public function setColumn($column);
38
 
 
 
 
 
 
 
39
  public function getColumn();
40
 
41
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
  interface Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface
36
  {
37
+ /**
38
+ * Set column for renderer
39
+ *
40
+ * @abstract
41
+ * @param $column
42
+ * @return void
43
+ */
44
  public function setColumn($column);
45
 
46
+ /**
47
+ * Returns row associated with the renderer
48
+ *
49
+ * @abstract
50
+ * @return void
51
+ */
52
  public function getColumn();
53
 
54
  /**
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php CHANGED
@@ -20,12 +20,16 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
  * Long INT to IP renderer
 
 
 
 
29
  */
30
  class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Ip
31
  extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
  * Long INT to IP renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
  class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Ip
35
  extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Longtext.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,9 +29,10 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Longtext extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
35
  {
36
  /**
37
  * Render contents as a long text
@@ -40,7 +41,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Longtext extends Mage_Adm
40
  * Also it can be html-escaped and nl2br()
41
  *
42
  * @param Varien_Object $row
43
- * @return unknown
44
  */
45
  public function render(Varien_Object $row)
46
  {
@@ -54,7 +55,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Longtext extends Mage_Adm
54
  }
55
  $text = Mage::helper('core/string')->truncate(parent::_getValue($row), $truncateLength);
56
  if ($this->getColumn()->getEscape()) {
57
- $text = $this->htmlEscape($text);
58
  }
59
  if ($this->getColumn()->getNl2br()) {
60
  $text = nl2br($text);
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Longtext
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  /**
38
  * Render contents as a long text
41
  * Also it can be html-escaped and nl2br()
42
  *
43
  * @param Varien_Object $row
44
+ * @return string
45
  */
46
  public function render(Varien_Object $row)
47
  {
55
  }
56
  $text = Mage::helper('core/string')->truncate(parent::_getValue($row), $truncateLength);
57
  if ($this->getColumn()->getEscape()) {
58
+ $text = $this->escapeHtml($text);
59
  }
60
  if ($this->getColumn()->getNl2br()) {
61
  $text = nl2br($text);
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Massaction.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -30,17 +30,28 @@
30
  *
31
  * @category Mage
32
  * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox
 
36
  {
37
  protected $_defaultWidth = 20;
38
 
 
 
 
 
 
39
  public function renderHeader()
40
  {
41
  return '&nbsp;';
42
  }
43
 
 
 
 
 
 
44
  public function renderProperty()
45
  {
46
  $out = parent::renderProperty();
@@ -49,18 +60,32 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction extends Mage_A
49
  return $out;
50
  }
51
 
 
 
 
 
 
 
52
  public function render(Varien_Object $row)
53
  {
54
- if ($this->getColumn()->getGrid()->getMassactionIdFieldOnlyIndexValue()){
55
- $this->setNoObjectId(true);
56
- }
57
  return parent::render($row);
58
  }
59
- //
60
 
 
 
 
 
 
 
 
61
  protected function _getCheckboxHtml($value, $checked)
62
  {
63
- return '<input type="checkbox" name="'.$this->getColumn()->getName().'" value="' . $value . '" class="massaction-checkbox"'.$checked.'/>';
 
 
64
  }
65
 
66
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
30
  *
31
  * @category Mage
32
  * @package Mage_Adminhtml
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox
37
  {
38
  protected $_defaultWidth = 20;
39
 
40
+ /**
41
+ * Render header of the row
42
+ *
43
+ * @return string
44
+ */
45
  public function renderHeader()
46
  {
47
  return '&nbsp;';
48
  }
49
 
50
+ /**
51
+ * Render HTML properties
52
+ *
53
+ * @return string
54
+ */
55
  public function renderProperty()
56
  {
57
  $out = parent::renderProperty();
60
  return $out;
61
  }
62
 
63
+ /**
64
+ * Returns HTML of the object
65
+ *
66
+ * @param Varien_Object $row
67
+ * @return string
68
+ */
69
  public function render(Varien_Object $row)
70
  {
71
+ if ($this->getColumn()->getGrid()->getMassactionIdFieldOnlyIndexValue()) {
72
+ $this->setNoObjectId(true);
73
+ }
74
  return parent::render($row);
75
  }
 
76
 
77
+ /**
78
+ * Returns HTML of the checkbox
79
+ *
80
+ * @param string $value
81
+ * @param bool $checked
82
+ * @return string
83
+ */
84
  protected function _getCheckboxHtml($value, $checked)
85
  {
86
+ $html = '<input type="checkbox" name="' . $this->getColumn()->getName() . '" ';
87
+ $html .= 'value="' . $this->escapeHtml($value) . '" class="massaction-checkbox"' . $checked . '/>';
88
+ return $html;
89
  }
90
 
91
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,13 +29,19 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
-
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Number extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  protected $_defaultWidth = 100;
38
 
 
 
 
 
 
 
39
  protected function _getValue(Varien_Object $row)
40
  {
41
  $data = parent::_getValue($row);
@@ -50,6 +56,11 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Number extends Mage_Admin
50
  return $this->getColumn()->getDefault();
51
  }
52
 
 
 
 
 
 
53
  public function renderCss()
54
  {
55
  return parent::renderCss() . ' a-right';
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Number
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  protected $_defaultWidth = 100;
38
 
39
+ /**
40
+ * Returns value of the row
41
+ *
42
+ * @param Varien_Object $row
43
+ * @return mixed|string
44
+ */
45
  protected function _getValue(Varien_Object $row)
46
  {
47
  $data = parent::_getValue($row);
56
  return $this->getColumn()->getDefault();
57
  }
58
 
59
+ /**
60
+ * Renders CSS
61
+ *
62
+ * @return string
63
+ */
64
  public function renderCss()
65
  {
66
  return parent::renderCss() . ' a-right';
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,9 +29,10 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Options extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
 
35
  {
36
  /**
37
  * Render a grid cell as options
@@ -49,19 +50,18 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Options extends Mage_Admi
49
  $res = array();
50
  foreach ($value as $item) {
51
  if (isset($options[$item])) {
52
- $res[] = $options[$item];
53
  }
54
  elseif ($showMissingOptionValues) {
55
- $res[] = $item;
56
  }
57
  }
58
  return implode(', ', $res);
59
  } elseif (isset($options[$value])) {
60
- return $options[$value];
61
  } elseif (in_array($value, $options)) {
62
- return $value;
63
  }
64
- return '';
65
  }
66
  }
67
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Options
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
36
  {
37
  /**
38
  * Render a grid cell as options
50
  $res = array();
51
  foreach ($value as $item) {
52
  if (isset($options[$item])) {
53
+ $res[] = $this->escapeHtml($options[$item]);
54
  }
55
  elseif ($showMissingOptionValues) {
56
+ $res[] = $this->escapeHtml($item);
57
  }
58
  }
59
  return implode(', ', $res);
60
  } elseif (isset($options[$value])) {
61
+ return $this->escapeHtml($options[$value]);
62
  } elseif (in_array($value, $options)) {
63
+ return $this->escapeHtml($value);
64
  }
 
65
  }
66
  }
67
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,10 +29,10 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
-
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  protected $_defaultWidth = 100;
38
  /**
@@ -63,6 +63,12 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price extends Mage_Adminh
63
  return $this->getColumn()->getDefault();
64
  }
65
 
 
 
 
 
 
 
66
  protected function _getCurrencyCode($row)
67
  {
68
  if ($code = $this->getColumn()->getCurrencyCode()) {
@@ -74,6 +80,12 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price extends Mage_Adminh
74
  return false;
75
  }
76
 
 
 
 
 
 
 
77
  protected function _getRate($row)
78
  {
79
  if ($rate = $this->getColumn()->getRate()) {
@@ -85,6 +97,11 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price extends Mage_Adminh
85
  return 1;
86
  }
87
 
 
 
 
 
 
88
  public function renderCss()
89
  {
90
  return parent::renderCss() . ' a-right';
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  protected $_defaultWidth = 100;
38
  /**
63
  return $this->getColumn()->getDefault();
64
  }
65
 
66
+ /**
67
+ * Returns currency code for the row, false on error
68
+ *
69
+ * @param Varien_Object $row
70
+ * @return string|bool
71
+ */
72
  protected function _getCurrencyCode($row)
73
  {
74
  if ($code = $this->getColumn()->getCurrencyCode()) {
80
  return false;
81
  }
82
 
83
+ /**
84
+ * Returns rate for the row, 1 by default
85
+ *
86
+ * @param Varien_Object $row
87
+ * @return float|int
88
+ */
89
  protected function _getRate($row)
90
  {
91
  if ($rate = $this->getColumn()->getRate()) {
97
  return 1;
98
  }
99
 
100
+ /**
101
+ * Renders CSS
102
+ *
103
+ * @return string
104
+ */
105
  public function renderCss()
106
  {
107
  return parent::renderCss() . ' a-right';
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Radio.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,13 +29,19 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Radio extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
35
  {
36
  protected $_defaultWidth = 55;
37
  protected $_values;
38
 
 
 
 
 
 
39
  public function getValues()
40
  {
41
  if (is_null($this->_values)) {
@@ -55,11 +61,12 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Radio extends Mage_Adminh
55
  $value = $row->getData($this->getColumn()->getIndex());
56
  if (is_array($values)) {
57
  $checked = in_array($value, $values) ? ' checked="checked"' : '';
58
- }
59
- else {
60
  $checked = ($value === $this->getColumn()->getValue()) ? ' checked="checked"' : '';
61
  }
62
- return '<input type="radio" name="'.$this->getColumn()->getHtmlName().'" value="' . $row->getId() . '" class="radio"'.$checked.'/>';
 
 
63
  }
64
 
65
  /*
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Radio
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  protected $_defaultWidth = 55;
38
  protected $_values;
39
 
40
+ /**
41
+ * Returns all values for the column
42
+ *
43
+ * @return array
44
+ */
45
  public function getValues()
46
  {
47
  if (is_null($this->_values)) {
61
  $value = $row->getData($this->getColumn()->getIndex());
62
  if (is_array($values)) {
63
  $checked = in_array($value, $values) ? ' checked="checked"' : '';
64
+ } else {
 
65
  $checked = ($value === $this->getColumn()->getValue()) ? ' checked="checked"' : '';
66
  }
67
+ $html = '<input type="radio" name="' . $this->getColumn()->getHtmlName() . '" ';
68
+ $html .= 'value="' . $row->getId() . '" class="radio"' . $checked . '/>';
69
+ return $html;
70
  }
71
 
72
  /*
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,10 +29,11 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Select extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
 
38
  /**
@@ -43,11 +44,13 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Select extends Mage_Admin
43
  */
44
  public function render(Varien_Object $row)
45
  {
46
- $html = '<select name="'.( $this->getColumn()->getName() ? $this->getColumn()->getName() : $this->getColumn()->getId() ).'" ' . $this->getColumn()->getValidateClass() . '>';
 
47
  $value = $row->getData($this->getColumn()->getIndex());
48
  foreach ($this->getColumn()->getOptions() as $val => $label){
49
  $selected = ( ($val == $value && (!is_null($value))) ? ' selected="selected"' : '' );
50
- $html.= '<option value="' . $val . '"' . $selected . '>' . $label . '</option>';
 
51
  }
52
  $html.='</select>';
53
  return $html;
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Select
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
 
39
  /**
44
  */
45
  public function render(Varien_Object $row)
46
  {
47
+ $name = $this->getColumn()->getName() ? $this->getColumn()->getName() : $this->getColumn()->getId();
48
+ $html = '<select name="' . $this->escapeHtml($name) . '" ' . $this->getColumn()->getValidateClass() . '>';
49
  $value = $row->getData($this->getColumn()->getIndex());
50
  foreach ($this->getColumn()->getOptions() as $val => $label){
51
  $selected = ( ($val == $value && (!is_null($value))) ? ' selected="selected"' : '' );
52
+ $html .= '<option value="' . $this->escapeHtml($val) . '"' . $selected . '>';
53
+ $html .= $this->escapeHtml($label) . '</option>';
54
  }
55
  $html.='</select>';
56
  return $html;
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -30,9 +30,10 @@
30
  *
31
  * @category Mage
32
  * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Store extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
  protected $_skipAllStoresLabel = false;
38
  protected $_skipEmptyStoresLabel = false;
@@ -93,7 +94,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Store extends Mage_Adminh
93
  return $out;
94
  }
95
 
96
- if (empty($origStores)&& !$skipEmptyStoresLabel) {
97
  return '';
98
  }
99
  if (!is_array($origStores)) {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
30
  *
31
  * @category Mage
32
  * @package Mage_Adminhtml
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Store
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
  protected $_skipAllStoresLabel = false;
39
  protected $_skipEmptyStoresLabel = false;
94
  return $out;
95
  }
96
 
97
+ if (empty($origStores) && !$skipEmptyStoresLabel) {
98
  return '';
99
  }
100
  if (!is_array($origStores)) {
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,10 +29,11 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
- * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
36
  {
37
  /**
38
  * Format variables pattern
@@ -55,18 +56,18 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text extends Mage_Adminht
55
  // If no format and it column not filtered specified return data as is.
56
  $data = parent::_getValue($row);
57
  $string = is_null($data) ? $defaultValue : $data;
58
- return htmlspecialchars($string);
59
  }
60
  elseif (preg_match_all($this->_variablePattern, $format, $matches)) {
61
  // Parsing of format string
62
- $formatedString = $format;
63
  foreach ($matches[0] as $matchIndex=>$match) {
64
  $value = $row->getData($matches[1][$matchIndex]);
65
- $formatedString = str_replace($match, $value, $formatedString);
66
  }
67
- return $formatedString;
68
  } else {
69
- return htmlspecialchars($format);
70
  }
71
  }
72
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
 
35
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
36
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
37
  {
38
  /**
39
  * Format variables pattern
56
  // If no format and it column not filtered specified return data as is.
57
  $data = parent::_getValue($row);
58
  $string = is_null($data) ? $defaultValue : $data;
59
+ return $this->escapeHtml($string);
60
  }
61
  elseif (preg_match_all($this->_variablePattern, $format, $matches)) {
62
  // Parsing of format string
63
+ $formattedString = $format;
64
  foreach ($matches[0] as $matchIndex=>$match) {
65
  $value = $row->getData($matches[1][$matchIndex]);
66
+ $formattedString = str_replace($match, $value, $formattedString);
67
  }
68
+ return $formattedString;
69
  } else {
70
+ return $this->escapeHtml($format);
71
  }
72
  }
73
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Theme.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,8 @@
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Theme extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
 
35
  {
36
  /**
37
  * Renders grid column
@@ -47,7 +48,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Theme extends Mage_Adminh
47
  $value = 'all';
48
  }
49
 
50
- return $this->_getValueLabel($options, $value);
51
  }
52
 
53
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Theme
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  /**
38
  * Renders grid column
48
  $value = 'all';
49
  }
50
 
51
+ return $this->escapeHtml($this->_getValueLabel($options, $value));
52
  }
53
 
54
  /**
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Wrapline.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -29,9 +29,10 @@
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
 
32
  */
33
-
34
- class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Wrapline extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
35
  {
36
  /**
37
  * Default max length of a line at one row
@@ -50,9 +51,11 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Wrapline extends Mage_Adm
50
  {
51
  $line = parent::_getValue($row);
52
  $wrappedLine = '';
53
- $lineLength = ($this->getColumn()->getData('lineLength')?$this->getColumn()->getData('lineLength'):$this->_defaultMaxLineLength);
54
- for($i=0, $n=floor(Mage::helper('core/string')->strlen($line)/$lineLength); $i<=$n; $i++) {
55
- $wrappedLine .= Mage::helper('core/string')->substr($line, ($lineLength*$i), $lineLength)."<br />";
 
 
56
  }
57
  return $wrappedLine;
58
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
29
  *
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
  */
34
+ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Wrapline
35
+ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
36
  {
37
  /**
38
  * Default max length of a line at one row
51
  {
52
  $line = parent::_getValue($row);
53
  $wrappedLine = '';
54
+ $lineLength = $this->getColumn()->getData('lineLength')
55
+ ? $this->getColumn()->getData('lineLength')
56
+ : $this->_defaultMaxLineLength;
57
+ for($i = 0, $n = floor(Mage::helper('core/string')->strlen($line) / $lineLength); $i <= $n; $i++) {
58
+ $wrappedLine .= Mage::helper('core/string')->substr($line, ($lineLength * $i), $lineLength) . "<br />";
59
  }
60
  return $wrappedLine;
61
  }
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php CHANGED
@@ -20,13 +20,15 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
  * Grid widget massaction block
29
  *
 
 
30
  * @category Mage
31
  * @package Mage_Adminhtml
32
  * @author Magento Core Team <core@magentocommerce.com>
@@ -40,6 +42,9 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract extends Mage
40
  */
41
  protected $_items = array();
42
 
 
 
 
43
  public function __construct()
44
  {
45
  parent::__construct();
@@ -187,10 +192,8 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract extends Mage
187
  if($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) {
188
  $selected = explode(',', $selected);
189
  return join(',', $selected);
190
- // return Mage::helper('core')->jsonEncode($selected);
191
  } else {
192
  return '';
193
- // return '[]';
194
  }
195
  }
196
 
@@ -221,13 +224,14 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract extends Mage
221
 
222
  public function getJavaScript()
223
  {
224
- return "
225
- var {$this->getJsObjectName()} = new varienGridMassaction('{$this->getHtmlId()}', {$this->getGridJsObjectName()}, '{$this->getSelectedJson()}', '{$this->getFormFieldNameInternal()}', '{$this->getFormFieldName()}');
226
- {$this->getJsObjectName()}.setItems({$this->getItemsJson()});
227
- {$this->getJsObjectName()}.setGridIds('{$this->getGridIdsJson()}');
228
- ". ($this->getUseAjax() ? "{$this->getJsObjectName()}.setUseAjax(true);" : '') . "
229
- ". ($this->getUseSelectAll() ? "{$this->getJsObjectName()}.setUseSelectAll(true);" : '') .
230
- "{$this->getJsObjectName()}.errorText = '{$this->getErrorText()}';";
 
231
  }
232
 
233
  public function getGridIdsJson()
@@ -240,10 +244,8 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract extends Mage
240
 
241
  if(!empty($gridIds)) {
242
  return join(",", $gridIds);
243
- //return Mage::helper('core')->jsonEncode($gridIds);
244
  }
245
  return '';
246
- //return '[]';
247
  }
248
 
249
  public function getHtmlId()
@@ -288,4 +290,3 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract extends Mage
288
  return $this;
289
  }
290
  }
291
- // Class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract End
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
  /**
28
  * Grid widget massaction block
29
  *
30
+ * @method Mage_Sales_Model_Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors
31
+ * @method boolean getHideFormElement()
32
  * @category Mage
33
  * @package Mage_Adminhtml
34
  * @author Magento Core Team <core@magentocommerce.com>
42
  */
43
  protected $_items = array();
44
 
45
+ /**
46
+ * Sets Massaction template
47
+ */
48
  public function __construct()
49
  {
50
  parent::__construct();
192
  if($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) {
193
  $selected = explode(',', $selected);
194
  return join(',', $selected);
 
195
  } else {
196
  return '';
 
197
  }
198
  }
199
 
224
 
225
  public function getJavaScript()
226
  {
227
+ return " var {$this->getJsObjectName()} = new varienGridMassaction('{$this->getHtmlId()}', "
228
+ . "{$this->getGridJsObjectName()}, '{$this->getSelectedJson()}'"
229
+ . ", '{$this->getFormFieldNameInternal()}', '{$this->getFormFieldName()}');"
230
+ . "{$this->getJsObjectName()}.setItems({$this->getItemsJson()}); "
231
+ . "{$this->getJsObjectName()}.setGridIds('{$this->getGridIdsJson()}');"
232
+ . ($this->getUseAjax() ? "{$this->getJsObjectName()}.setUseAjax(true);" : '')
233
+ . ($this->getUseSelectAll() ? "{$this->getJsObjectName()}.setUseSelectAll(true);" : '')
234
+ . "{$this->getJsObjectName()}.errorText = '{$this->getErrorText()}';";
235
  }
236
 
237
  public function getGridIdsJson()
244
 
245
  if(!empty($gridIds)) {
246
  return join(",", $gridIds);
 
247
  }
248
  return '';
 
249
  }
250
 
251
  public function getHtmlId()
290
  return $this;
291
  }
292
  }
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Default.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Tab/Interface.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/Tree.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Block/Widget/View/Container.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Controller/Action.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -33,8 +33,16 @@
33
  */
34
  class Mage_Adminhtml_Controller_Action extends Mage_Core_Controller_Varien_Action
35
  {
 
 
 
36
  const FLAG_IS_URLS_CHECKED = 'check_url_settings';
37
 
 
 
 
 
 
38
  /**
39
  * Array of actions which can be processed without secret key validation
40
  *
@@ -59,7 +67,7 @@ class Mage_Adminhtml_Controller_Action extends Mage_Core_Controller_Varien_Actio
59
  *
60
  * @var string
61
  */
62
- protected $_sessionNamespace = 'adminhtml';
63
 
64
  protected function _isAllowed()
65
  {
@@ -213,8 +221,12 @@ class Mage_Adminhtml_Controller_Action extends Mage_Core_Controller_Varien_Actio
213
 
214
  $configData = Mage::getModel('core/config_data');
215
 
216
- $defaultUnsecure= (string) Mage::getConfig()->getNode('default/'.Mage_Core_Model_Store::XML_PATH_UNSECURE_BASE_URL);
217
- $defaultSecure = (string) Mage::getConfig()->getNode('default/'.Mage_Core_Model_Store::XML_PATH_SECURE_BASE_URL);
 
 
 
 
218
 
219
  if ($defaultSecure == '{{base_url}}' || $defaultUnsecure == '{{base_url}}') {
220
  $this->_getSession()->addNotice(
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
33
  */
34
  class Mage_Adminhtml_Controller_Action extends Mage_Core_Controller_Varien_Action
35
  {
36
+ /**
37
+ * Name of "is URLs checked" flag
38
+ */
39
  const FLAG_IS_URLS_CHECKED = 'check_url_settings';
40
 
41
+ /**
42
+ * Session namespace to refer in other places
43
+ */
44
+ const SESSION_NAMESPACE = 'adminhtml';
45
+
46
  /**
47
  * Array of actions which can be processed without secret key validation
48
  *
67
  *
68
  * @var string
69
  */
70
+ protected $_sessionNamespace = self::SESSION_NAMESPACE;
71
 
72
  protected function _isAllowed()
73
  {
221
 
222
  $configData = Mage::getModel('core/config_data');
223
 
224
+ $defaultUnsecure = (string)Mage::getConfig()->getNode(
225
+ 'default/' . Mage_Core_Model_Store::XML_PATH_UNSECURE_BASE_URL
226
+ );
227
+ $defaultSecure = (string)Mage::getConfig()->getNode(
228
+ 'default/' . Mage_Core_Model_Store::XML_PATH_SECURE_BASE_URL
229
+ );
230
 
231
  if ($defaultSecure == '{{base_url}}' || $defaultUnsecure == '{{base_url}}') {
232
  $this->_getSession()->addNotice(
app/code/core/Mage/Adminhtml/Controller/Report/Abstract.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * Admin abstract reports controller
30
+ *
31
+ * @category Mage
32
+ * @package Mage_Adminhtml
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ abstract class Mage_Adminhtml_Controller_Report_Abstract extends Mage_Adminhtml_Controller_Action
36
+ {
37
+ /**
38
+ * Admin session model
39
+ *
40
+ * @var null|Mage_Admin_Model_Session
41
+ */
42
+ protected $_adminSession = null;
43
+
44
+ /**
45
+ * Retrieve admin session model
46
+ *
47
+ * @return Mage_Admin_Model_Session
48
+ */
49
+ protected function _getSession()
50
+ {
51
+ if (is_null($this->_adminSession)) {
52
+ $this->_adminSession = Mage::getSingleton('admin/session');
53
+ }
54
+ return $this->_adminSession;
55
+ }
56
+
57
+ /**
58
+ * Add report breadcrumbs
59
+ *
60
+ * @return Mage_Adminhtml_Controller_Report_Abstract
61
+ */
62
+ public function _initAction()
63
+ {
64
+ $this->loadLayout()
65
+ ->_addBreadcrumb(Mage::helper('reports')->__('Reports'), Mage::helper('reports')->__('Reports'));
66
+ return $this;
67
+ }
68
+
69
+ /**
70
+ * Report action init operations
71
+ *
72
+ * @param array|Varien_Object $blocks
73
+ * @return Mage_Adminhtml_Controller_Report_Abstract
74
+ */
75
+ public function _initReportAction($blocks)
76
+ {
77
+ if (!is_array($blocks)) {
78
+ $blocks = array($blocks);
79
+ }
80
+
81
+ $requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter'));
82
+ $requestData = $this->_filterDates($requestData, array('from', 'to'));
83
+ $requestData['store_ids'] = $this->getRequest()->getParam('store_ids');
84
+ $params = new Varien_Object();
85
+
86
+ foreach ($requestData as $key => $value) {
87
+ if (!empty($value)) {
88
+ $params->setData($key, $value);
89
+ }
90
+ }
91
+
92
+ foreach ($blocks as $block) {
93
+ if ($block) {
94
+ $block->setPeriodType($params->getData('period_type'));
95
+ $block->setFilterData($params);
96
+ }
97
+ }
98
+
99
+ return $this;
100
+ }
101
+
102
+ /**
103
+ * Add refresh statistics links
104
+ *
105
+ * @param string $flagCode
106
+ * @param string $refreshCode
107
+ * @return Mage_Adminhtml_Controller_Report_Abstract
108
+ */
109
+ protected function _showLastExecutionTime($flagCode, $refreshCode)
110
+ {
111
+ $flag = Mage::getModel('reports/flag')->setReportFlagCode($flagCode)->loadSelf();
112
+ $updatedAt = ($flag->hasData())
113
+ ? Mage::app()->getLocale()->storeDate(
114
+ 0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true
115
+ )
116
+ : 'undefined';
117
+
118
+ $refreshStatsLink = $this->getUrl('*/report_statistics');
119
+ $directRefreshLink = $this->getUrl('*/report_statistics/refreshRecent', array('code' => $refreshCode));
120
+
121
+ Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('adminhtml')->__('Last updated: %s. To refresh last day\'s <a href="%s">statistics</a>, click <a href="%s">here</a>.', $updatedAt, $refreshStatsLink, $directRefreshLink));
122
+ return $this;
123
+ }
124
+ }
app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Exception.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Addresses.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Catalog.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Composite.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Dashboard/Order.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Js.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Media/Js.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -28,9 +28,10 @@
28
  /**
29
  * Media library js helper
30
  *
 
31
  * @category Mage
32
  * @package Mage_Adminhtml
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
  class Mage_Adminhtml_Helper_Media_Js extends Mage_Core_Helper_Js
36
  {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
28
  /**
29
  * Media library js helper
30
  *
31
+ * @deprecated since 1.7.0.0
32
  * @category Mage
33
  * @package Mage_Adminhtml
34
+ * @author Magento Core Team <core@magentocommerce.com>
35
  */
36
  class Mage_Adminhtml_Helper_Media_Js extends Mage_Core_Helper_Js
37
  {
app/code/core/Mage/Adminhtml/Helper/Rss.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Helper/Sales.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Config.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Config/Data.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -45,6 +45,8 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object
45
  $this->_validate();
46
  $this->_getScope();
47
 
 
 
48
  $section = $this->getSection();
49
  $website = $this->getWebsite();
50
  $store = $this->getStore();
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
45
  $this->_validate();
46
  $this->_getScope();
47
 
48
+ Mage::dispatchEvent('model_config_data_save_before', array('object' => $this));
49
+
50
  $section = $this->getSection();
51
  $website = $this->getWebsite();
52
  $store = $this->getStore();
app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Email/Template.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Extension.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Report/Item.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_Report_Item extends Varien_Object
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_Report_Item extends Varien_Object
app/code/core/Mage/Adminhtml/Model/Sales/Order.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -71,9 +71,7 @@ class Mage_Adminhtml_Model_Sales_Order
71
  foreach ($order->getAllItems() as $item) {
72
  if (!$productCollection->getItemById($item->getProductId())) {
73
  $this->_getSession()->addError(
74
- Mage::helper('adminhtml')->__('The item %s (SKU %s) does not exist in the catalog anymore.',
75
- $item->getName(),
76
- $item->getSku()
77
  ));
78
  $hasBadItems = true;
79
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
71
  foreach ($order->getAllItems() as $item) {
72
  if (!$productCollection->getItemById($item->getProductId())) {
73
  $this->_getSession()->addError(
74
+ Mage::helper('adminhtml')->__('The item %s (SKU %s) does not exist in the catalog anymore.', $item->getName(), $item->getSku()
 
 
75
  ));
76
  $hasBadItems = true;
77
  }
app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -32,7 +32,7 @@
32
  * @package Mage_Adminhtml
33
  * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
- class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
36
  {
37
  /**
38
  * Quote session object
@@ -111,6 +111,13 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
111
  */
112
  protected $_errors = array();
113
 
 
 
 
 
 
 
 
114
  public function __construct()
115
  {
116
  $this->_session = Mage::getSingleton('adminhtml/session_quote');
@@ -233,7 +240,22 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
233
  */
234
  public function getQuote()
235
  {
236
- return $this->getSession()->getQuote();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  }
238
 
239
  /**
@@ -510,7 +532,8 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
510
  $item = $this->_getQuoteItem($item);
511
  if ($item) {
512
  $removeItem = false;
513
- switch ($moveTo) {
 
514
  case 'order':
515
  $info = $item->getBuyRequest();
516
  $info->setOptions($this->_prepareOptionsForRequest($item))
@@ -563,8 +586,27 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
563
  }
564
  break;
565
  case 'wishlist':
566
- $wishlist = $this->getCustomerWishlist();
567
- if ($wishlist && $item->getProduct()->isVisibleInSiteVisibility()) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
568
  $info = $item->getBuyRequest();
569
  $info->setOptions($this->_prepareOptionsForRequest($item))
570
  ->setQty($qty)
@@ -633,6 +675,9 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
633
  $this->removeItem($itemId, $from);
634
  }
635
  }
 
 
 
636
  return $this;
637
  }
638
 
@@ -716,6 +761,8 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
716
  $stockItem = $product->getStockItem();
717
  if ($stockItem && $stockItem->getIsQtyDecimal()) {
718
  $product->setIsQtyDecimal(1);
 
 
719
  }
720
 
721
  $product->setCartQty($config->getQty());
@@ -1305,21 +1352,28 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
1305
 
1306
  /**
1307
  * Prepare quote customer
 
 
1308
  */
1309
  public function _prepareCustomer()
1310
  {
 
1311
  $quote = $this->getQuote();
1312
  if ($quote->getCustomerIsGuest()) {
1313
  return $this;
1314
  }
1315
 
1316
- $customer = $this->getSession()->getCustomer();
1317
- $store = $this->getSession()->getStore();
1318
- $customerIsInStore = $this->_customerIsInStore($store);
1319
- $billingAddress = null;
1320
- $shippingAddress = null;
 
 
 
1321
 
1322
  if ($customer->getId()) {
 
1323
  if (!$customerIsInStore) {
1324
  $customer->setId(null)
1325
  ->setStore($store)
@@ -1328,70 +1382,82 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
1328
  ->setPassword($customer->generatePassword());
1329
  $this->_setCustomerData($customer);
1330
  }
1331
- if ($this->getBillingAddress()->getSaveInAddressBook() || !$customerIsInStore) {
1332
- $billingAddress = $this->getBillingAddress()->exportCustomerAddress();
 
 
1333
  $customerAddressId = $this->getBillingAddress()->getCustomerAddressId();
1334
  if ($customerAddressId && $customer->getId()) {
1335
- $customer->getAddressItemById($customerAddressId)->addData($billingAddress->getData());
1336
  } else {
1337
- $customer->addAddress($billingAddress);
1338
  }
1339
  }
1340
- if (!$this->getQuote()->isVirtual() && ($this->getShippingAddress()->getSaveInAddressBook()
1341
- || !$customerIsInStore)
1342
- ) {
1343
- $shippingAddress = $this->getShippingAddress()->exportCustomerAddress();
1344
  $customerAddressId = $this->getShippingAddress()->getCustomerAddressId();
1345
  if ($customerAddressId && $customer->getId()) {
1346
- $customer->getAddressItemById($customerAddressId)->addData($shippingAddress->getData());
1347
  } elseif (!empty($customerAddressId)
1348
- && $billingAddress !== null
1349
  && $this->getBillingAddress()->getCustomerAddressId() == $customerAddressId
1350
  ) {
1351
- $billingAddress->setIsDefaultShipping(true);
1352
  } else {
1353
- $customer->addAddress($shippingAddress);
1354
  }
1355
  }
1356
 
1357
- if (is_null($customer->getDefaultBilling()) && $billingAddress) {
1358
- $billingAddress->setIsDefaultBilling(true);
1359
  }
 
1360
  if (is_null($customer->getDefaultShipping())) {
1361
- if ($this->getShippingAddress()->getSameAsBilling() && $billingAddress) {
1362
- $billingAddress->setIsDefaultShipping(true);
1363
- } elseif ($shippingAddress) {
1364
- $shippingAddress->setIsDefaultShipping(true);
1365
  }
1366
  }
1367
  } else {
1368
- $customer->addData($this->getBillingAddress()->exportCustomerAddress()->getData())
 
 
 
1369
  ->setPassword($customer->generatePassword())
1370
  ->setStore($store);
1371
  $customer->setEmail($this->_getNewCustomerEmail($customer));
1372
  $this->_setCustomerData($customer);
1373
 
1374
- $customerBilling = $this->getBillingAddress()->exportCustomerAddress();
1375
- $customerBilling->setIsDefaultBilling(true);
1376
- $customer->addAddress($customerBilling);
 
1377
 
1378
- $shipping = $this->getShippingAddress();
1379
- if (!$this->getQuote()->isVirtual() && !$shipping->getSameAsBilling()) {
1380
- $customerShipping = $shipping->exportCustomerAddress();
1381
- $customerShipping->setIsDefaultShipping(true);
1382
- $customer->addAddress($customerShipping);
 
 
 
 
 
1383
  } else {
1384
- $customerBilling->setIsDefaultShipping(true);
1385
  }
1386
  }
1387
 
1388
- // set quote customer data to customer
1389
  $this->_setCustomerData($customer);
1390
 
1391
- // set customer to quote and convert customer data to quote
1392
  $quote->setCustomer($customer);
1393
 
1394
- // add user defined attributes to quote
1395
  $form = $this->_getCustomerForm()->setEntity($customer);
1396
  foreach ($form->getUserAttributes() as $attribute) {
1397
  $quoteCode = sprintf('customer_%s', $attribute->getAttributeCode());
@@ -1399,7 +1465,7 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object
1399
  }
1400
 
1401
  if ($customer->getId()) {
1402
- // we should not change account data for existing customer, so restore it
1403
  $this->_getCustomerForm()
1404
  ->setEntity($customer)
1405
  ->resetEntityData();
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
32
  * @package Mage_Adminhtml
33
  * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
+ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object implements Mage_Checkout_Model_Cart_Interface
36
  {
37
  /**
38
  * Quote session object
111
  */
112
  protected $_errors = array();
113
 
114
+ /**
115
+ * Quote associated with the model
116
+ *
117
+ * @var Mage_Sales_Model_Quote
118
+ */
119
+ protected $_quote;
120
+
121
  public function __construct()
122
  {
123
  $this->_session = Mage::getSingleton('adminhtml/session_quote');
240
  */
241
  public function getQuote()
242
  {
243
+ if (!$this->_quote) {
244
+ $this->_quote = $this->getSession()->getQuote();
245
+ }
246
+ return $this->_quote;
247
+ }
248
+
249
+ /**
250
+ * Set quote object
251
+ *
252
+ * @param Mage_Sales_Model_Quote $quote
253
+ * @return Mage_Adminhtml_Model_Sales_Order_Create
254
+ */
255
+ public function setQuote(Mage_Sales_Model_Quote $quote)
256
+ {
257
+ $this->_quote = $quote;
258
+ return $this;
259
  }
260
 
261
  /**
532
  $item = $this->_getQuoteItem($item);
533
  if ($item) {
534
  $removeItem = false;
535
+ $moveTo = explode('_', $moveTo);
536
+ switch ($moveTo[0]) {
537
  case 'order':
538
  $info = $item->getBuyRequest();
539
  $info->setOptions($this->_prepareOptionsForRequest($item))
586
  }
587
  break;
588
  case 'wishlist':
589
+ $wishlist = null;
590
+ if (!isset($moveTo[1])) {
591
+ $wishlist = Mage::getModel('wishlist/wishlist')->loadByCustomer(
592
+ $this->getSession()->getCustomer(),
593
+ true
594
+ );
595
+ } else {
596
+ $wishlist = Mage::getModel('wishlist/wishlist')->load($moveTo[1]);
597
+ if (!$wishlist->getId()
598
+ || $wishlist->getCustomerId() != $this->getSession()->getCustomerId()
599
+ ) {
600
+ $wishlist = null;
601
+ }
602
+ }
603
+ if (!$wishlist) {
604
+ Mage::throwException(Mage::helper('wishlist')->__('Could not find wishlist'));
605
+ }
606
+ $wishlist->setStore($this->getSession()->getStore())
607
+ ->setSharedStoreIds($this->getSession()->getStore()->getWebsite()->getStoreIds());
608
+
609
+ if ($wishlist->getId() && $item->getProduct()->isVisibleInSiteVisibility()) {
610
  $info = $item->getBuyRequest();
611
  $info->setOptions($this->_prepareOptionsForRequest($item))
612
  ->setQty($qty)
675
  $this->removeItem($itemId, $from);
676
  }
677
  }
678
+ if (isset($data['empty_customer_cart']) && (int)$data['empty_customer_cart'] == 1) {
679
+ $this->getCustomerCart()->removeAllItems()->collectTotals()->save();
680
+ }
681
  return $this;
682
  }
683
 
761
  $stockItem = $product->getStockItem();
762
  if ($stockItem && $stockItem->getIsQtyDecimal()) {
763
  $product->setIsQtyDecimal(1);
764
+ } else {
765
+ $config->setQty((int) $config->getQty());
766
  }
767
 
768
  $product->setCartQty($config->getQty());
1352
 
1353
  /**
1354
  * Prepare quote customer
1355
+ *
1356
+ * @return Mage_Adminhtml_Model_Sales_Order_Create
1357
  */
1358
  public function _prepareCustomer()
1359
  {
1360
+ /** @var $quote Mage_Sales_Model_Quote */
1361
  $quote = $this->getQuote();
1362
  if ($quote->getCustomerIsGuest()) {
1363
  return $this;
1364
  }
1365
 
1366
+ /** @var $customer Mage_Customer_Model_Customer */
1367
+ $customer = $this->getSession()->getCustomer();
1368
+ /** @var $store Mage_Core_Model_Store */
1369
+ $store = $this->getSession()->getStore();
1370
+
1371
+ $customerIsInStore = $this->_customerIsInStore($store);
1372
+ $customerBillingAddress = null;
1373
+ $customerShippingAddress = null;
1374
 
1375
  if ($customer->getId()) {
1376
+ // Create new customer if customer is not registered in specified store
1377
  if (!$customerIsInStore) {
1378
  $customer->setId(null)
1379
  ->setStore($store)
1382
  ->setPassword($customer->generatePassword());
1383
  $this->_setCustomerData($customer);
1384
  }
1385
+
1386
+ if ($this->getBillingAddress()->getSaveInAddressBook()) {
1387
+ /** @var $customerBillingAddress Mage_Customer_Model_Address */
1388
+ $customerBillingAddress = $this->getBillingAddress()->exportCustomerAddress();
1389
  $customerAddressId = $this->getBillingAddress()->getCustomerAddressId();
1390
  if ($customerAddressId && $customer->getId()) {
1391
+ $customer->getAddressItemById($customerAddressId)->addData($customerBillingAddress->getData());
1392
  } else {
1393
+ $customer->addAddress($customerBillingAddress);
1394
  }
1395
  }
1396
+
1397
+ if (!$this->getQuote()->isVirtual() && $this->getShippingAddress()->getSaveInAddressBook()) {
1398
+ /** @var $customerShippingAddress Mage_Customer_Model_Address */
1399
+ $customerShippingAddress = $this->getShippingAddress()->exportCustomerAddress();
1400
  $customerAddressId = $this->getShippingAddress()->getCustomerAddressId();
1401
  if ($customerAddressId && $customer->getId()) {
1402
+ $customer->getAddressItemById($customerAddressId)->addData($customerShippingAddress->getData());
1403
  } elseif (!empty($customerAddressId)
1404
+ && $customerBillingAddress !== null
1405
  && $this->getBillingAddress()->getCustomerAddressId() == $customerAddressId
1406
  ) {
1407
+ $customerBillingAddress->setIsDefaultShipping(true);
1408
  } else {
1409
+ $customer->addAddress($customerShippingAddress);
1410
  }
1411
  }
1412
 
1413
+ if (is_null($customer->getDefaultBilling()) && $customerBillingAddress) {
1414
+ $customerBillingAddress->setIsDefaultBilling(true);
1415
  }
1416
+
1417
  if (is_null($customer->getDefaultShipping())) {
1418
+ if ($this->getShippingAddress()->getSameAsBilling() && $customerBillingAddress) {
1419
+ $customerBillingAddress->setIsDefaultShipping(true);
1420
+ } elseif ($customerShippingAddress) {
1421
+ $customerShippingAddress->setIsDefaultShipping(true);
1422
  }
1423
  }
1424
  } else {
1425
+ // Prepare new customer
1426
+ /** @var $customerBillingAddress Mage_Customer_Model_Address */
1427
+ $customerBillingAddress = $this->getBillingAddress()->exportCustomerAddress();
1428
+ $customer->addData($customerBillingAddress->getData())
1429
  ->setPassword($customer->generatePassword())
1430
  ->setStore($store);
1431
  $customer->setEmail($this->_getNewCustomerEmail($customer));
1432
  $this->_setCustomerData($customer);
1433
 
1434
+ if ($this->getBillingAddress()->getSaveInAddressBook()) {
1435
+ $customerBillingAddress->setIsDefaultBilling(true);
1436
+ $customer->addAddress($customerBillingAddress);
1437
+ }
1438
 
1439
+ /** @var $shippingAddress Mage_Sales_Model_Quote_Address */
1440
+ $shippingAddress = $this->getShippingAddress();
1441
+ if (!$this->getQuote()->isVirtual()
1442
+ && !$shippingAddress->getSameAsBilling()
1443
+ && $shippingAddress->getSaveInAddressBook()
1444
+ ) {
1445
+ /** @var $customerShippingAddress Mage_Customer_Model_Address */
1446
+ $customerShippingAddress = $shippingAddress->exportCustomerAddress();
1447
+ $customerShippingAddress->setIsDefaultShipping(true);
1448
+ $customer->addAddress($customerShippingAddress);
1449
  } else {
1450
+ $customerBillingAddress->setIsDefaultShipping(true);
1451
  }
1452
  }
1453
 
1454
+ // Set quote customer data to customer
1455
  $this->_setCustomerData($customer);
1456
 
1457
+ // Set customer to quote and convert customer data to quote
1458
  $quote->setCustomer($customer);
1459
 
1460
+ // Add user defined attributes to quote
1461
  $form = $this->_getCustomerForm()->setEntity($customer);
1462
  foreach ($form->getUserAttributes() as $attribute) {
1463
  $quoteCode = sprintf('customer_%s', $attribute->getAttributeCode());
1465
  }
1466
 
1467
  if ($customer->getId()) {
1468
+ // Restore account data for existing customer
1469
  $this->_getCustomerForm()
1470
  ->setEntity($customer)
1471
  ->resetEntityData();
app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Search/Catalog.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Search/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Search/Order.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Session.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/Session/Quote.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -86,17 +86,6 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom extends Mage_Core_
86
  self::CONFIG_SCOPE,
87
  self::CONFIG_SCOPE_ID
88
  );
89
- } else {
90
- Mage::getConfig()->deleteConfig(
91
- self::XML_PATH_SECURE_BASE_URL,
92
- self::CONFIG_SCOPE,
93
- self::CONFIG_SCOPE_ID
94
- );
95
- Mage::getConfig()->deleteConfig(
96
- self::XML_PATH_UNSECURE_BASE_URL,
97
- self::CONFIG_SCOPE,
98
- self::CONFIG_SCOPE_ID
99
- );
100
  }
101
 
102
  return $this;
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
86
  self::CONFIG_SCOPE,
87
  self::CONFIG_SCOPE_ID
88
  );
 
 
 
 
 
 
 
 
 
 
 
89
  }
90
 
91
  return $this;
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -42,12 +42,12 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Password_Link_Expirationp
42
  protected function _beforeSave()
43
  {
44
  parent::_beforeSave();
45
- $resetPasswordLinkExpirationPeriod = (int) $this->getValue();
46
- // This value must be greater than 0
47
  if ($resetPasswordLinkExpirationPeriod < 1) {
48
- $resetPasswordLinkExpirationPeriod = (int) $this->getOldValue();
49
  }
50
- $this->setValue((string) $resetPasswordLinkExpirationPeriod);
51
  return $this;
52
  }
53
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
42
  protected function _beforeSave()
43
  {
44
  parent::_beforeSave();
45
+ $resetPasswordLinkExpirationPeriod = (int)$this->getValue();
46
+
47
  if ($resetPasswordLinkExpirationPeriod < 1) {
48
+ $resetPasswordLinkExpirationPeriod = (int)$this->getOldValue();
49
  }
50
+ $this->setValue((string)$resetPasswordLinkExpirationPeriod);
51
  return $this;
52
  }
53
  }
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -51,4 +51,29 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom extends Mage_Co
51
 
52
  return $this;
53
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
51
 
52
  return $this;
53
  }
54
+
55
+ /**
56
+ * Delete custom admin url from configuration if "Use Custom Admin Url" option disabled
57
+ *
58
+ * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom
59
+ */
60
+ protected function _afterSave()
61
+ {
62
+ $value = $this->getValue();
63
+
64
+ if (!$value) {
65
+ Mage::getConfig()->deleteConfig(
66
+ Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::XML_PATH_SECURE_BASE_URL,
67
+ Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::CONFIG_SCOPE,
68
+ Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::CONFIG_SCOPE_ID
69
+ );
70
+ Mage::getConfig()->deleteConfig(
71
+ Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::XML_PATH_UNSECURE_BASE_URL,
72
+ Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::CONFIG_SCOPE,
73
+ Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::CONFIG_SCOPE_ID
74
+ );
75
+ }
76
+
77
+ return $this;
78
+ }
79
  }
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cookie.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Config Cookie Restriction mode backend
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Model_System_Config_Backend_Cookie extends Mage_Core_Model_Config_Data
35
+ {
36
+ protected $_eventPrefix = 'adminhtml_system_config_backend_cookie';
37
+ }
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -43,12 +43,12 @@ class Mage_Adminhtml_Model_System_Config_Backend_Customer_Password_Link_Expirati
43
  protected function _beforeSave()
44
  {
45
  parent::_beforeSave();
46
- $resetPasswordLinkExpirationPeriod = (int) $this->getValue();
47
- // This value must be greater than 0
48
  if ($resetPasswordLinkExpirationPeriod < 1) {
49
- $resetPasswordLinkExpirationPeriod = (int) $this->getOldValue();
50
  }
51
- $this->setValue((string) $resetPasswordLinkExpirationPeriod);
52
  return $this;
53
  }
54
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
43
  protected function _beforeSave()
44
  {
45
  parent::_beforeSave();
46
+ $resetPasswordLinkExpirationPeriod = (int)$this->getValue();
47
+
48
  if ($resetPasswordLinkExpirationPeriod < 1) {
49
+ $resetPasswordLinkExpirationPeriod = (int)$this->getOldValue();
50
  }
51
+ $this->setValue((string)$resetPasswordLinkExpirationPeriod);
52
  return $this;
53
  }
54
  }
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Package.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Logo.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Backend model for uploading transactional emails custom logo image
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Model_System_Config_Backend_Email_Logo extends Mage_Adminhtml_Model_System_Config_Backend_Image
35
+ {
36
+ /**
37
+ * The tail part of directory path for uploading
38
+ */
39
+ const UPLOAD_DIR = 'email/logo';
40
+
41
+ /**
42
+ * Token for the root part of directory path for uploading
43
+ */
44
+ const UPLOAD_ROOT_TOKEN = 'system/filesystem/media';
45
+
46
+ /**
47
+ * Upload max file size in kilobytes
48
+ *
49
+ * @var int
50
+ */
51
+ protected $_maxFileSize = 2048;
52
+
53
+ /**
54
+ * Return path to directory for upload file
55
+ *
56
+ * @return string
57
+ */
58
+ protected function _getUploadDir()
59
+ {
60
+ $uploadDir = $this->_appendScopeInfo(self::UPLOAD_DIR);
61
+ $uploadRoot = $this->_getUploadRoot(self::UPLOAD_ROOT_TOKEN);
62
+ $uploadDir = $uploadRoot . DS . $uploadDir;
63
+ return $uploadDir;
64
+ }
65
+
66
+ /**
67
+ * Makes a decision about whether to add info about the scope
68
+ *
69
+ * @return boolean
70
+ */
71
+ protected function _addWhetherScopeInfo()
72
+ {
73
+ return true;
74
+ }
75
+
76
+ /**
77
+ * Save uploaded file before saving config value
78
+ *
79
+ * Save changes and delete file if "delete" option passed
80
+ *
81
+ * @return Mage_Adminhtml_Model_System_Config_Backend_Email_Logo
82
+ */
83
+ protected function _beforeSave()
84
+ {
85
+ $value = $this->getValue();
86
+ $deleteFlag = (is_array($value) && !empty($value['delete']));
87
+ $fileTmpName = $_FILES['groups']['tmp_name'][$this->getGroupId()]['fields'][$this->getField()]['value'];
88
+
89
+ if ($this->getOldValue() && ($fileTmpName || $deleteFlag)) {
90
+ $io = new Varien_Io_File();
91
+ $io->rm($this->_getUploadRoot(self::UPLOAD_ROOT_TOKEN) . DS . self::UPLOAD_DIR . DS . $this->getOldValue());
92
+ }
93
+ return parent::_beforeSave();
94
+ }
95
+ }
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php CHANGED
@@ -20,11 +20,10 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 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
  /**
29
  * System config file field backend model
30
  *
@@ -34,6 +33,12 @@
34
  */
35
  class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Config_Data
36
  {
 
 
 
 
 
 
37
 
38
  /**
39
  * Save uploaded file before saving config value
@@ -43,10 +48,6 @@ class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Co
43
  protected function _beforeSave()
44
  {
45
  $value = $this->getValue();
46
- if (is_array($value) && !empty($value['delete'])) {
47
- $this->setValue('');
48
- }
49
-
50
  if ($_FILES['groups']['tmp_name'][$this->getGroupId()]['fields'][$this->getField()]['value']){
51
 
52
  $uploadDir = $this->_getUploadDir();
@@ -60,6 +61,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Co
60
  $uploader = new Mage_Core_Model_File_Uploader($file);
61
  $uploader->setAllowedExtensions($this->_getAllowedExtensions());
62
  $uploader->setAllowRenameFiles(true);
 
63
  $result = $uploader->save($uploadDir);
64
 
65
  } catch (Exception $e) {
@@ -74,11 +76,30 @@ class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Co
74
  }
75
  $this->setValue($filename);
76
  }
 
 
 
 
 
 
77
  }
78
 
79
  return $this;
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  /**
83
  * Makes a decision about whether to add info about the scope.
84
  *
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
 
27
  /**
28
  * System config file field backend model
29
  *
33
  */
34
  class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Config_Data
35
  {
36
+ /**
37
+ * Upload max file size in kilobytes
38
+ *
39
+ * @var int
40
+ */
41
+ protected $_maxFileSize = 0;
42
 
43
  /**
44
  * Save uploaded file before saving config value
48
  protected function _beforeSave()
49
  {
50
  $value = $this->getValue();
 
 
 
 
51
  if ($_FILES['groups']['tmp_name'][$this->getGroupId()]['fields'][$this->getField()]['value']){
52
 
53
  $uploadDir = $this->_getUploadDir();
61
  $uploader = new Mage_Core_Model_File_Uploader($file);
62
  $uploader->setAllowedExtensions($this->_getAllowedExtensions());
63
  $uploader->setAllowRenameFiles(true);
64
+ $uploader->addValidateCallback('size', $this, 'validateMaxSize');
65
  $result = $uploader->save($uploadDir);
66
 
67
  } catch (Exception $e) {
76
  }
77
  $this->setValue($filename);
78
  }
79
+ } else {
80
+ if (is_array($value) && !empty($value['delete'])) {
81
+ $this->setValue('');
82
+ } else {
83
+ $this->unsValue();
84
+ }
85
  }
86
 
87
  return $this;
88
  }
89
 
90
+ /**
91
+ * Validation callback for checking max file size
92
+ *
93
+ * @param string $filePath Path to temporary uploaded file
94
+ * @throws Mage_Core_Exception
95
+ */
96
+ public function validateMaxSize($filePath)
97
+ {
98
+ if ($this->_maxFileSize > 0 && filesize($filePath) > ($this->_maxFileSize * 1024)) {
99
+ throw Mage::exception('Mage_Core', Mage::helper('adminhtml')->__('Uploaded file is larger than %.2f kilobytes allowed by server', $this->_maxFileSize));
100
+ }
101
+ }
102
+
103
  /**
104
  * Makes a decision about whether to add info about the scope.
105
  *
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Adminhtml_Model_System_Config_Backend_Filename extends Mage_Core_Model_Config_Data
29
+ {
30
+ protected function _beforeSave()
31
+ {
32
+ $value = $this->getValue();
33
+ $value = basename($value);
34
+ $this->setValue($value);
35
+ return $this;
36
+ }
37
+ }
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -77,7 +77,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Image_Favicon extends Mage_Admi
77
  */
78
  protected function _getAllowedExtensions()
79
  {
80
- return array('ico', 'png', 'gif', 'jpeg', 'apng', 'svg');
81
  }
82
 
83
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
77
  */
78
  protected function _getAllowedExtensions()
79
  {
80
+ return array('ico', 'png', 'gif', 'jpg', 'jpeg', 'apng', 'svg');
81
  }
82
 
83
  /**
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Layer/Children.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -48,8 +48,11 @@ class Mage_Adminhtml_Model_System_Config_Backend_Locale extends Mage_Core_Model_
48
 
49
  $values = explode(',', $this->getValue());
50
  $exceptions = array();
 
51
  foreach ($collection as $data) {
52
  $match = false;
 
 
53
  if (preg_match('/(base|default)$/', $data->getPath(), $match)) {
54
  if (!in_array($data->getValue(), $values)) {
55
  $currencyName = Mage::app()->getLocale()->currency($data->getValue())->getName();
@@ -76,11 +79,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Locale extends Mage_Core_Model_
76
  break;
77
  }
78
 
79
- $exceptions[] = Mage::helper('adminhtml')->__('Currency "%s" is used as %s in %s.',
80
- $currencyName,
81
- $fieldName,
82
- $scopeName
83
- );
84
  }
85
  }
86
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
48
 
49
  $values = explode(',', $this->getValue());
50
  $exceptions = array();
51
+
52
  foreach ($collection as $data) {
53
  $match = false;
54
+ $scopeName = Mage::helper('adminhtml')->__('Default scope');
55
+
56
  if (preg_match('/(base|default)$/', $data->getPath(), $match)) {
57
  if (!in_array($data->getValue(), $values)) {
58
  $currencyName = Mage::app()->getLocale()->currency($data->getValue())->getName();
79
  break;
80
  }
81
 
82
+ $exceptions[] = Mage::helper('adminhtml')->__('Currency "%s" is used as %s in %s.', $currencyName, $fieldName, $scopeName);
 
 
 
 
83
  }
84
  }
85
  }
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -34,9 +34,22 @@
34
  */
35
  class Mage_Adminhtml_Model_System_Config_Backend_Locale_Timezone extends Mage_Core_Model_Config_Data
36
  {
 
 
 
 
 
 
 
 
37
  protected function _beforeSave()
38
  {
39
- if (!in_array($this->getValue(), DateTimeZone::listIdentifiers())) {
 
 
 
 
 
40
  Mage::throwException(Mage::helper('adminhtml')->__('Invalid timezone'));
41
  }
42
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
34
  */
35
  class Mage_Adminhtml_Model_System_Config_Backend_Locale_Timezone extends Mage_Core_Model_Config_Data
36
  {
37
+ /**
38
+ * Const for PHP 5.3+ compatibility
39
+ * This value copied from DateTimeZone::ALL_WITH_BC in PHP 5.3+
40
+ *
41
+ * @constant ALL_WITH_BC
42
+ */
43
+ const ALL_WITH_BC = 4095;
44
+
45
  protected function _beforeSave()
46
  {
47
+ $allWithBc = self::ALL_WITH_BC;
48
+ if (defined('DateTimeZone::ALL_WITH_BC')) {
49
+ $allWithBc = DateTimeZone::ALL_WITH_BC;
50
+ }
51
+
52
+ if (!in_array($this->getValue(), DateTimeZone::listIdentifiers($allWithBc))) {
53
  Mage::throwException(Mage::helper('adminhtml')->__('Invalid timezone'));
54
  }
55
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -94,8 +94,9 @@ class Mage_Adminhtml_Model_System_Config_Source_Admin_Page
94
  $parentArr = array();
95
  $sortOrder = 0;
96
  foreach ($parent->children() as $childName=>$child) {
97
-
98
- if ($child->depends && !$this->_checkDepends($child->depends)) {
 
99
  continue;
100
  }
101
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
94
  $parentArr = array();
95
  $sortOrder = 0;
96
  foreach ($parent->children() as $childName=>$child) {
97
+ if ((1 == $child->disabled)
98
+ || ($child->depends && !$this->_checkDepends($child->depends))
99
+ ) {
100
  continue;
101
  }
102
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Cms_Page
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Cms_Page
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Source model of customer address types
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Model_System_Config_Source_Customer_Address_Type
35
+ {
36
+ /**
37
+ * Retrieve possible customer address types
38
+ *
39
+ * @return array
40
+ */
41
+ public function toOptionArray()
42
+ {
43
+ return array(
44
+ Mage_Customer_Model_Address_Abstract::TYPE_BILLING => Mage::helper('adminhtml')->__('Billing Address'),
45
+ Mage_Customer_Model_Address_Abstract::TYPE_SHIPPING => Mage::helper('adminhtml')->__('Shipping Address')
46
+ );
47
+ }
48
+ }
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Mage_Adminhtml_Model_System_Config_Source_Customer_Group_Multiselect
28
+ {
29
+ /**
30
+ * Customer groups options array
31
+ *
32
+ * @var null|array
33
+ */
34
+ protected $_options;
35
+
36
+ /**
37
+ * Retrieve customer groups as array
38
+ *
39
+ * @return array
40
+ */
41
+ public function toOptionArray()
42
+ {
43
+ if (!$this->_options) {
44
+ $this->_options = Mage::getResourceModel('customer/group_collection')
45
+ ->setRealGroupsFilter()
46
+ ->loadData()->toOptionArray();
47
+ }
48
+ return $this->_options;
49
+ }
50
+ }
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Package
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Package
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php CHANGED
@@ -20,18 +20,17 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Dev_Dbautoup
27
  {
28
  public function toOptionArray()
29
  {
30
- $hlp = Mage::helper('adminhtml');
31
  return array(
32
- array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ALWAYS, 'label'=>$hlp->__('Always (during development)')),
33
- array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ONCE, 'label'=>$hlp->__('Only Once (version upgrade)')),
34
- array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_NEVER, 'label'=>$hlp->__('Never (production)')),
35
  );
36
  }
37
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Dev_Dbautoup
27
  {
28
  public function toOptionArray()
29
  {
 
30
  return array(
31
+ array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ALWAYS, 'label' => Mage::helper('adminhtml')->__('Always (during development)')),
32
+ array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ONCE, 'label' => Mage::helper('adminhtml')->__('Only Once (version upgrade)')),
33
+ array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_NEVER, 'label' => Mage::helper('adminhtml')->__('Never (production)')),
34
  );
35
  }
36
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Language.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Nooptreq
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Nooptreq
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -31,7 +31,11 @@ class Mage_Adminhtml_Model_System_Config_Source_Price_Step
31
  return array(
32
  array(
33
  'value' => Mage_Catalog_Model_Layer_Filter_Price::RANGE_CALCULATION_AUTO,
34
- 'label' => Mage::helper('adminhtml')->__('Automatic')
 
 
 
 
35
  ),
36
  array(
37
  'value' => Mage_Catalog_Model_Layer_Filter_Price::RANGE_CALCULATION_MANUAL,
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
31
  return array(
32
  array(
33
  'value' => Mage_Catalog_Model_Layer_Filter_Price::RANGE_CALCULATION_AUTO,
34
+ 'label' => Mage::helper('adminhtml')->__('Automatic (equalize price ranges)')
35
+ ),
36
+ array(
37
+ 'value' => Mage_Catalog_Model_Layer_Filter_Price::RANGE_CALCULATION_IMPROVED,
38
+ 'label' => Mage::helper('adminhtml')->__('Automatic (equalize product counts)')
39
  ),
40
  array(
41
  'value' => Mage_Catalog_Model_Layer_Filter_Price::RANGE_CALCULATION_MANUAL,
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -41,13 +41,16 @@ class Mage_Adminhtml_Model_System_Config_Source_Product_Options_Type
41
  array('value' => '', 'label' => Mage::helper('adminhtml')->__('-- Please select --'))
42
  );
43
 
 
 
44
  foreach (Mage::getConfig()->getNode(self::PRODUCT_OPTIONS_GROUPS_PATH)->children() as $group) {
45
  $types = array();
46
  $typesPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types';
47
  foreach (Mage::getConfig()->getNode($typesPath)->children() as $type) {
48
- $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types/' . $type->getName() . '/label';
 
49
  $types[] = array(
50
- 'label' => (string) Mage::getConfig()->getNode($labelPath),
51
  'value' => $type->getName()
52
  );
53
  }
@@ -55,7 +58,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Product_Options_Type
55
  $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/label';
56
 
57
  $groups[] = array(
58
- 'label' => (string) Mage::getConfig()->getNode($labelPath),
59
  'value' => $types
60
  );
61
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
41
  array('value' => '', 'label' => Mage::helper('adminhtml')->__('-- Please select --'))
42
  );
43
 
44
+ $helper = Mage::helper('catalog');
45
+
46
  foreach (Mage::getConfig()->getNode(self::PRODUCT_OPTIONS_GROUPS_PATH)->children() as $group) {
47
  $types = array();
48
  $typesPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types';
49
  foreach (Mage::getConfig()->getNode($typesPath)->children() as $type) {
50
+ $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types/' . $type->getName()
51
+ . '/label';
52
  $types[] = array(
53
+ 'label' => $helper->__((string) Mage::getConfig()->getNode($labelPath)),
54
  'value' => $type->getName()
55
  );
56
  }
58
  $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/label';
59
 
60
  $groups[] = array(
61
+ 'label' => $helper->__((string) Mage::getConfig()->getNode($labelPath)),
62
  'value' => $types
63
  );
64
  }
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allowedmethods.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Taxclass.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Shipping_Taxclass
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Shipping_Taxclass
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Tax_Apply_On
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Tax_Apply_On
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Tax_Basedon
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Tax_Basedon
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Tax_Catalog
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Tax_Catalog
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Web_Protocol
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Web_Protocol
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Web_Redirect
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_System_Config_Source_Web_Redirect
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -44,4 +44,17 @@ class Mage_Adminhtml_Model_System_Config_Source_Yesno
44
  );
45
  }
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
44
  );
45
  }
46
 
47
+ /**
48
+ * Get options in "key-value" format
49
+ *
50
+ * @return array
51
+ */
52
+ public function toArray()
53
+ {
54
+ return array(
55
+ 0 => Mage::helper('adminhtml')->__('No'),
56
+ 1 => Mage::helper('adminhtml')->__('Yes'),
57
+ );
58
+ }
59
+
60
  }
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/Model/System/Store.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -488,7 +488,7 @@ class Mage_Adminhtml_Model_System_Store extends Varien_Object
488
  if (isset($this->_storeCollection[$storeId])) {
489
  $data = $this->_storeCollection[$storeId];
490
  $name .= $this->getWebsiteName($data->getWebsiteId());
491
- $name .= ($name ? '/' : '').$this->getGroupName($data->getGroupId());
492
  }
493
  }
494
  return $name;
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
488
  if (isset($this->_storeCollection[$storeId])) {
489
  $data = $this->_storeCollection[$storeId];
490
  $name .= $this->getWebsiteName($data->getWebsiteId());
491
+ $name .= ($name ? '/' : '') . $this->getGroupName($data->getGroupId());
492
  }
493
  }
494
  return $name;
app/code/core/Mage/Adminhtml/Model/Url.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_Url extends Mage_Core_Model_Url
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Model_Url extends Mage_Core_Model_Url
app/code/core/Mage/Adminhtml/controllers/AjaxController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Api/UserController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Api_UserController extends Mage_Adminhtml_Controller_Action
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Api_UserController extends Mage_Adminhtml_Controller_Action
app/code/core/Mage/Adminhtml/controllers/CacheController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Catalog/Category/WidgetController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -107,7 +107,7 @@ class Mage_Adminhtml_Catalog_CategoryController extends Mage_Adminhtml_Controlle
107
  $_prevStoreId = Mage::getSingleton('admin/session')
108
  ->getLastViewedStore(true);
109
 
110
- if ($_prevStoreId != null && !$this->getRequest()->getQuery('isAjax')) {
111
  $params['store'] = $_prevStoreId;
112
  $redirect = true;
113
  }
@@ -178,13 +178,23 @@ class Mage_Adminhtml_Catalog_CategoryController extends Mage_Adminhtml_Controlle
178
  ->setLastEditedCategory($category->getId());
179
  // $this->_initLayoutMessages('adminhtml/session');
180
  $this->loadLayout();
181
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array(
182
- 'messages' => $this->getLayout()->getMessagesBlock()->getGroupedHtml(),
183
- 'content' =>
184
- $this->getLayout()->getBlock('category.edit')->getFormHtml()
185
  . $this->getLayout()->getBlock('category.tree')
186
- ->getBreadcrumbsJavascript($breadcrumbsPath, 'editingCategoryBreadcrumbs')
187
- )));
 
 
 
 
 
 
 
 
 
 
 
188
  return;
189
  }
190
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
107
  $_prevStoreId = Mage::getSingleton('admin/session')
108
  ->getLastViewedStore(true);
109
 
110
+ if (!empty($_prevStoreId) && !$this->getRequest()->getQuery('isAjax')) {
111
  $params['store'] = $_prevStoreId;
112
  $redirect = true;
113
  }
178
  ->setLastEditedCategory($category->getId());
179
  // $this->_initLayoutMessages('adminhtml/session');
180
  $this->loadLayout();
181
+
182
+ $eventResponse = new Varien_Object(array(
183
+ 'content' => $this->getLayout()->getBlock('category.edit')->getFormHtml()
 
184
  . $this->getLayout()->getBlock('category.tree')
185
+ ->getBreadcrumbsJavascript($breadcrumbsPath, 'editingCategoryBreadcrumbs'),
186
+ 'messages' => $this->getLayout()->getMessagesBlock()->getGroupedHtml(),
187
+ ));
188
+
189
+ Mage::dispatchEvent('category_prepare_ajax_response', array(
190
+ 'response' => $eventResponse,
191
+ 'controller' => $this
192
+ ));
193
+
194
+ $this->getResponse()->setBody(
195
+ Mage::helper('core')->jsonEncode($eventResponse->getData())
196
+ );
197
+
198
  return;
199
  }
200
 
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -51,6 +51,9 @@ class Mage_Adminhtml_Catalog_Product_Action_AttributeController extends Mage_Adm
51
  $this->renderLayout();
52
  }
53
 
 
 
 
54
  public function saveAction()
55
  {
56
  if (!$this->_validateProducts()) {
@@ -95,7 +98,13 @@ class Mage_Adminhtml_Catalog_Product_Action_AttributeController extends Mage_Adm
95
  $value = null;
96
  }
97
  $attributesData[$attributeCode] = $value;
98
- } else if ($attribute->getFrontendInput() == 'multiselect') {
 
 
 
 
 
 
99
  if (is_array($value)) {
100
  $value = implode(',', $value);
101
  }
@@ -163,8 +172,7 @@ class Mage_Adminhtml_Catalog_Product_Action_AttributeController extends Mage_Adm
163
  }
164
 
165
  $this->_getSession()->addSuccess(
166
- $this->__('Total of %d record(s) were updated',
167
- count($this->_getHelper()->getProductIds()))
168
  );
169
  }
170
  catch (Mage_Core_Exception $e) {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
51
  $this->renderLayout();
52
  }
53
 
54
+ /**
55
+ * Update product attributes
56
+ */
57
  public function saveAction()
58
  {
59
  if (!$this->_validateProducts()) {
98
  $value = null;
99
  }
100
  $attributesData[$attributeCode] = $value;
101
+ } elseif ($attribute->getFrontendInput() == 'multiselect') {
102
+ // Check if 'Change' checkbox has been checked by admin for this attribute
103
+ $isChanged = (bool)$this->getRequest()->getPost($attributeCode . '_checkbox');
104
+ if (!$isChanged) {
105
+ unset($attributesData[$attributeCode]);
106
+ continue;
107
+ }
108
  if (is_array($value)) {
109
  $value = implode(',', $value);
110
  }
172
  }
173
 
174
  $this->_getSession()->addSuccess(
175
+ $this->__('Total of %d record(s) were updated', count($this->_getHelper()->getProductIds()))
 
176
  );
177
  }
178
  catch (Mage_Core_Exception $e) {
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -158,27 +158,9 @@ class Mage_Adminhtml_Catalog_Product_AttributeController extends Mage_Adminhtml_
158
  //labels
159
  foreach ($data['frontend_label'] as & $value) {
160
  if ($value) {
161
- $value = $helperCatalog->escapeHtml($value);
162
  }
163
  }
164
- //options
165
- if (!empty($data['option']['value'])) {
166
- foreach ($data['option']['value'] as &$options) {
167
- foreach ($options as &$label) {
168
- $label = $helperCatalog->escapeHtml($label);
169
- }
170
- }
171
- }
172
- //default value
173
- if (!empty($data['default_value'])) {
174
- $data['default_value'] = $helperCatalog->escapeHtml($data['default_value']);
175
- }
176
- if (!empty($data['default_value_text'])) {
177
- $data['default_value_text'] = $helperCatalog->escapeHtml($data['default_value_text']);
178
- }
179
- if (!empty($data['default_value_textarea'])) {
180
- $data['default_value_textarea'] = $helperCatalog->escapeHtml($data['default_value_textarea']);
181
- }
182
  }
183
  return $data;
184
  }
@@ -203,7 +185,8 @@ class Mage_Adminhtml_Catalog_Product_AttributeController extends Mage_Adminhtml_
203
  $validatorAttrCode = new Zend_Validate_Regex(array('pattern' => '/^[a-z][a-z_0-9]{1,254}$/'));
204
  if (!$validatorAttrCode->isValid($data['attribute_code'])) {
205
  $session->addError(
206
- $helper->__('Attribute code is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.'));
 
207
  $this->_redirect('*/*/edit', array('attribute_id' => $id, '_current' => true));
208
  return;
209
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
158
  //labels
159
  foreach ($data['frontend_label'] as & $value) {
160
  if ($value) {
161
+ $value = $helperCatalog->stripTags($value);
162
  }
163
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  }
165
  return $data;
166
  }
185
  $validatorAttrCode = new Zend_Validate_Regex(array('pattern' => '/^[a-z][a-z_0-9]{1,254}$/'));
186
  if (!$validatorAttrCode->isValid($data['attribute_code'])) {
187
  $session->addError(
188
+ Mage::helper('catalog')->__('Attribute code is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')
189
+ );
190
  $this->_redirect('*/*/edit', array('attribute_id' => $id, '_current' => true));
191
  return;
192
  }
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/DatafeedsController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -46,6 +46,11 @@ class Mage_Adminhtml_Catalog_Product_GalleryController extends Mage_Adminhtml_Co
46
  Mage::getSingleton('catalog/product_media_config')->getBaseTmpMediaPath()
47
  );
48
 
 
 
 
 
 
49
  /**
50
  * Workaround for prototype 1.7 methods "isJSON", "evalJSON" on Windows OS
51
  */
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
46
  Mage::getSingleton('catalog/product_media_config')->getBaseTmpMediaPath()
47
  );
48
 
49
+ Mage::dispatchEvent('catalog_product_gallery_upload_image_after', array(
50
+ 'result' => $result,
51
+ 'action' => $this
52
+ ));
53
+
54
  /**
55
  * Workaround for prototype 1.7 methods "isJSON", "evalJSON" on Windows OS
56
  */
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GroupController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -311,7 +311,9 @@ class Mage_Adminhtml_Catalog_Product_ReviewController extends Mage_Adminhtml_Con
311
  $session = Mage::getSingleton('adminhtml/session');
312
 
313
  if ($data = $this->getRequest()->getPost()) {
314
- if(isset($data['select_stores'])) {
 
 
315
  $data['stores'] = $data['select_stores'];
316
  }
317
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
311
  $session = Mage::getSingleton('adminhtml/session');
312
 
313
  if ($data = $this->getRequest()->getPost()) {
314
+ if (Mage::app()->isSingleStoreMode()) {
315
+ $data['stores'] = array(Mage::app()->getStore(true)->getId());
316
+ } else if (isset($data['select_stores'])) {
317
  $data['stores'] = $data['select_stores'];
318
  }
319
 
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -552,12 +552,7 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller
552
  $product = $this->_initProduct();
553
  $productData = $this->getRequest()->getPost('product');
554
  if ($productData) {
555
- if (!isset($productData['stock_data']['use_config_manage_stock'])) {
556
- $productData['stock_data']['use_config_manage_stock'] = 0;
557
- }
558
- if (isset($productData['stock_data']['qty']) && (float)$productData['stock_data']['qty'] > self::MAX_QTY_VALUE) {
559
- $productData['stock_data']['qty'] = self::MAX_QTY_VALUE;
560
- }
561
  }
562
 
563
  /**
@@ -669,6 +664,26 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller
669
  return $product;
670
  }
671
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  public function categoriesJsonAction()
673
  {
674
  $product = $this->_initProduct();
@@ -691,9 +706,8 @@ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller
691
 
692
  $data = $this->getRequest()->getPost();
693
  if ($data) {
694
- if (!isset($data['product']['stock_data']['use_config_manage_stock'])) {
695
- $data['product']['stock_data']['use_config_manage_stock'] = 0;
696
- }
697
  $product = $this->_initProductSave();
698
 
699
  try {
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
552
  $product = $this->_initProduct();
553
  $productData = $this->getRequest()->getPost('product');
554
  if ($productData) {
555
+ $this->_filterStockData($productData['stock_data']);
 
 
 
 
 
556
  }
557
 
558
  /**
664
  return $product;
665
  }
666
 
667
+ /**
668
+ * Filter product stock data
669
+ *
670
+ * @param array $stockData
671
+ */
672
+ protected function _filterStockData(&$stockData) {
673
+ if (!isset($stockData['use_config_manage_stock'])) {
674
+ $stockData['use_config_manage_stock'] = 0;
675
+ }
676
+ if (isset($stockData['qty']) && (float)$stockData['qty'] > self::MAX_QTY_VALUE) {
677
+ $stockData['qty'] = self::MAX_QTY_VALUE;
678
+ }
679
+ if (isset($stockData['min_qty']) && (int)$stockData['min_qty'] < 0) {
680
+ $stockData['min_qty'] = 0;
681
+ }
682
+ if (!isset($stockData['is_decimal_divided']) || $stockData['is_qty_decimal'] == 0) {
683
+ $stockData['is_decimal_divided'] = 0;
684
+ }
685
+ }
686
+
687
  public function categoriesJsonAction()
688
  {
689
  $product = $this->_initProduct();
706
 
707
  $data = $this->getRequest()->getPost();
708
  if ($data) {
709
+ $this->_filterStockData($data['product']['stock_data']);
710
+
 
711
  $product = $this->_initProductSave();
712
 
713
  try {
app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -178,9 +178,7 @@ class Mage_Adminhtml_Catalog_SearchController extends Mage_Adminhtml_Controller_
178
  $model->delete();
179
  }
180
  Mage::getSingleton('adminhtml/session')->addSuccess(
181
- Mage::helper('adminhtml')->__(
182
- 'Total of %d record(s) were deleted', count($searchIds)
183
- )
184
  );
185
  } catch (Exception $e) {
186
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
178
  $model->delete();
179
  }
180
  Mage::getSingleton('adminhtml/session')->addSuccess(
181
+ Mage::helper('adminhtml')->__('Total of %d record(s) were deleted', count($searchIds))
 
 
182
  );
183
  } catch (Exception $e) {
184
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
app/code/core/Mage/Adminhtml/controllers/CatalogController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -54,11 +54,13 @@ class Mage_Adminhtml_Checkout_AgreementController extends Mage_Adminhtml_Control
54
 
55
  $id = $this->getRequest()->getParam('id');
56
  $agreementModel = Mage::getModel('checkout/agreement');
57
- $hlp = Mage::helper('checkout');
58
  if ($id) {
59
  $agreementModel->load($id);
60
  if (!$agreementModel->getId()) {
61
- Mage::getSingleton('adminhtml/session')->addError($hlp->__('This condition no longer exists.'));
 
 
62
  $this->_redirect('*/*/');
63
  return;
64
  }
@@ -74,7 +76,7 @@ class Mage_Adminhtml_Checkout_AgreementController extends Mage_Adminhtml_Control
74
  Mage::register('checkout_agreement', $agreementModel);
75
 
76
  $this->_initAction()
77
- ->_addBreadcrumb($id ? $hlp->__('Edit Condition') : $hlp->__('New Condition'), $id ? $hlp->__('Edit Condition') : $hlp->__('New Condition'))
78
  ->_addContent($this->getLayout()->createBlock('adminhtml/checkout_agreement_edit')->setData('action', $this->getUrl('*/*/save')))
79
  ->renderLayout();
80
  }
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
54
 
55
  $id = $this->getRequest()->getParam('id');
56
  $agreementModel = Mage::getModel('checkout/agreement');
57
+
58
  if ($id) {
59
  $agreementModel->load($id);
60
  if (!$agreementModel->getId()) {
61
+ Mage::getSingleton('adminhtml/session')->addError(
62
+ Mage::helper('checkout')->__('This condition no longer exists.')
63
+ );
64
  $this->_redirect('*/*/');
65
  return;
66
  }
76
  Mage::register('checkout_agreement', $agreementModel);
77
 
78
  $this->_initAction()
79
+ ->_addBreadcrumb($id ? Mage::helper('checkout')->__('Edit Condition') : Mage::helper('checkout')->__('New Condition'), $id ? Mage::helper('checkout')->__('Edit Condition') : Mage::helper('checkout')->__('New Condition'))
80
  ->_addContent($this->getLayout()->createBlock('adminhtml/checkout_agreement_edit')->setData('action', $this->getUrl('*/*/save')))
81
  ->renderLayout();
82
  }
app/code/core/Mage/Adminhtml/controllers/Cms/Block/WidgetController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Cms/Page/WidgetController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Customer/Cart/Product/Composite/CartController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Customer/ConfigController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -102,14 +102,20 @@ class Mage_Adminhtml_Customer_GroupController extends Mage_Adminhtml_Controller_
102
  $customerGroup = Mage::getModel('customer/group');
103
  $id = $this->getRequest()->getParam('id');
104
  if (!is_null($id)) {
105
- $customerGroup->load($id);
106
  }
107
 
108
- if ($taxClass = $this->getRequest()->getParam('tax_class')) {
 
 
109
  try {
110
- $customerGroup->setCode($this->getRequest()->getParam('code'))
111
- ->setTaxClassId($taxClass)
112
- ->save();
 
 
 
 
113
  Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('customer')->__('The customer group has been saved.'));
114
  $this->getResponse()->setRedirect($this->getUrl('*/customer_group'));
115
  return;
@@ -122,7 +128,6 @@ class Mage_Adminhtml_Customer_GroupController extends Mage_Adminhtml_Controller_
122
  } else {
123
  $this->_forward('new');
124
  }
125
-
126
  }
127
 
128
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
102
  $customerGroup = Mage::getModel('customer/group');
103
  $id = $this->getRequest()->getParam('id');
104
  if (!is_null($id)) {
105
+ $customerGroup->load((int)$id);
106
  }
107
 
108
+ $taxClass = (int)$this->getRequest()->getParam('tax_class');
109
+
110
+ if ($taxClass) {
111
  try {
112
+ $customerGroupCode = (string)$this->getRequest()->getParam('code');
113
+
114
+ if (!empty($customerGroupCode)) {
115
+ $customerGroup->setCode($customerGroupCode);
116
+ }
117
+
118
+ $customerGroup->setTaxClassId($taxClass)->save();
119
  Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('customer')->__('The customer group has been saved.'));
120
  $this->getResponse()->setRedirect($this->getUrl('*/customer_group'));
121
  return;
128
  } else {
129
  $this->_forward('new');
130
  }
 
131
  }
132
 
133
  /**
app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Customer_OnlineController extends Mage_Adminhtml_Controller_Action
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  class Mage_Adminhtml_Customer_OnlineController extends Mage_Adminhtml_Controller_Action
app/code/core/Mage/Adminhtml/controllers/Customer/System/Config/ValidatevatController.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * VAT validation controller
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Customer_System_Config_ValidatevatController extends Mage_Adminhtml_Controller_Action
35
+ {
36
+ /**
37
+ * Perform customer VAT ID validation
38
+ *
39
+ * @return Varien_Object
40
+ */
41
+ protected function _validate()
42
+ {
43
+ return Mage::helper('customer')->checkVatNumber(
44
+ $this->getRequest()->getParam('country'),
45
+ $this->getRequest()->getParam('vat')
46
+ );
47
+ }
48
+
49
+ /**
50
+ * Check whether vat is valid
51
+ *
52
+ * @return void
53
+ */
54
+ public function validateAction()
55
+ {
56
+ $result = $this->_validate();
57
+ $this->getResponse()->setBody((int)$result->getIsValid());
58
+ }
59
+
60
+ /**
61
+ * Retrieve validation result as JSON
62
+ *
63
+ * @return void
64
+ */
65
+ public function validateAdvancedAction()
66
+ {
67
+ /** @var $coreHelper Mage_Core_Helper_Data */
68
+ $coreHelper = Mage::helper('core');
69
+
70
+ $result = $this->_validate();
71
+ $valid = $result->getIsValid();
72
+ $success = $result->getRequestSuccess();
73
+ // ID of the store where order is placed
74
+ $storeId = $this->getRequest()->getParam('store_id');
75
+ // Sanitize value if needed
76
+ if (!is_null($storeId)) {
77
+ $storeId = (int)$storeId;
78
+ }
79
+
80
+ $groupId = Mage::helper('customer')->getCustomerGroupIdBasedOnVatNumber(
81
+ $this->getRequest()->getParam('country'), $result, $storeId
82
+ );
83
+
84
+ $body = $coreHelper->jsonEncode(array(
85
+ 'valid' => $valid,
86
+ 'group' => $groupId,
87
+ 'success' => $success
88
+ ));
89
+ $this->getResponse()->setBody($body);
90
+ }
91
+ }
app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/CustomerController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -86,7 +86,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
86
  public function gridAction()
87
  {
88
  $this->loadLayout();
89
- $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/customer_grid')->toHtml());
90
  }
91
 
92
  /**
@@ -186,21 +186,27 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
186
  {
187
  $data = $this->getRequest()->getPost();
188
  if ($data) {
189
- $redirectBack = $this->getRequest()->getParam('back', false);
190
  $this->_initCustomer('customer_id');
191
 
192
- /* @var $customer Mage_Customer_Model_Customer */
193
  $customer = Mage::registry('current_customer');
194
 
195
- /* @var $customerForm Mage_Customer_Model_Form */
196
  $customerForm = Mage::getModel('customer/form');
197
  $customerForm->setEntity($customer)
198
  ->setFormCode('adminhtml_customer')
199
  ->ignoreInvisible(false)
200
  ;
201
 
202
- $formData = $customerForm->extractData($this->getRequest(), 'account');
203
- $errors = $customerForm->validateData($formData);
 
 
 
 
 
 
204
  if ($errors !== true) {
205
  foreach ($errors as $error) {
206
  $this->_getSession()->addError($error);
@@ -212,27 +218,36 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
212
 
213
  $customerForm->compactData($formData);
214
 
215
- // unset template data
216
  if (isset($data['address']['_template_'])) {
217
  unset($data['address']['_template_']);
218
  }
219
 
220
  $modifiedAddresses = array();
221
  if (!empty($data['address'])) {
222
- /* @var $addressForm Mage_Customer_Model_Form */
223
  $addressForm = Mage::getModel('customer/form');
224
  $addressForm->setFormCode('adminhtml_customer_address')->ignoreInvisible(false);
225
 
226
  foreach (array_keys($data['address']) as $index) {
227
  $address = $customer->getAddressItemById($index);
228
  if (!$address) {
229
- $address = Mage::getModel('customer/address');
230
  }
231
 
232
  $requestScope = sprintf('address/%s', $index);
233
  $formData = $addressForm->setEntity($address)
234
  ->extractData($this->getRequest(), $requestScope);
235
- $errors = $addressForm->validateData($formData);
 
 
 
 
 
 
 
 
 
236
  if ($errors !== true) {
237
  foreach ($errors as $error) {
238
  $this->_getSession()->addError($error);
@@ -257,7 +272,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
257
  }
258
  }
259
 
260
- // default billing and shipping
261
  if (isset($data['account']['default_billing'])) {
262
  $customer->setData('default_billing', $data['account']['default_billing']);
263
  }
@@ -268,17 +283,15 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
268
  $customer->setData('confirmation', $data['account']['confirmation']);
269
  }
270
 
271
- // not modified customer addresses mark for delete
272
  foreach ($customer->getAddressesCollection() as $customerAddress) {
273
  if ($customerAddress->getId() && !in_array($customerAddress->getId(), $modifiedAddresses)) {
274
  $customerAddress->setData('_deleted', true);
275
  }
276
  }
277
 
278
- if (isset($data['subscription'])) {
279
- $customer->setIsSubscribed(true);
280
- } else {
281
- $customer->setIsSubscribed(false);
282
  }
283
 
284
  if (isset($data['account']['sendemail_store_id'])) {
@@ -288,7 +301,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
288
  $isNewCustomer = $customer->isObjectNew();
289
  try {
290
  $sendPassToEmail = false;
291
- // force new customer active
292
  if ($isNewCustomer) {
293
  $customer->setPassword($data['account']['password']);
294
  $customer->setForceConfirmed(true);
@@ -305,14 +318,13 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
305
 
306
  $customer->save();
307
 
308
- // send welcome email
309
  if ($customer->getWebsiteId() && (isset($data['account']['sendemail']) || $sendPassToEmail)) {
310
  $storeId = $customer->getSendemailStoreId();
311
  if ($isNewCustomer) {
312
  $customer->sendNewAccountEmail('registered', '', $storeId);
313
- }
314
- // confirm not confirmed customer
315
- else if ((!$customer->getConfirmation())) {
316
  $customer->sendNewAccountEmail('confirmed', '', $storeId);
317
  }
318
  }
@@ -336,8 +348,8 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
336
 
337
  if ($redirectBack) {
338
  $this->_redirect('*/*/edit', array(
339
- 'id' => $customer->getId(),
340
- '_current'=>true
341
  ));
342
  return;
343
  }
@@ -401,7 +413,8 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
401
  */
402
  public function ordersAction() {
403
  $this->_initCustomer();
404
- $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/customer_edit_tab_orders')->toHtml());
 
405
  }
406
 
407
  /**
@@ -410,8 +423,8 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
410
  */
411
  public function lastOrdersAction() {
412
  $this->_initCustomer();
413
- $this->getResponse()->setBody(
414
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_view_orders')->toHtml());
415
  }
416
 
417
  /**
@@ -425,8 +438,8 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
425
  ->loadByCustomer(Mage::registry('current_customer'));
426
 
427
  Mage::register('subscriber', $subscriber);
428
- $this->getResponse()->setBody(
429
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter_grid')->toHtml());
430
  }
431
 
432
  public function wishlistAction()
@@ -459,8 +472,8 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
459
  public function viewWishlistAction()
460
  {
461
  $this->_initCustomer();
462
- $this->getResponse()->setBody(
463
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_view_wishlist')->toHtml());
464
  }
465
 
466
  /**
@@ -486,10 +499,9 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
486
  }
487
  }
488
 
489
- $this->getResponse()->setBody(
490
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_cart', 'admin.customer.view.cart',
491
- array('website_id'=>$websiteId))->toHtml()
492
- );
493
  }
494
 
495
  /**
@@ -499,57 +511,62 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
499
  public function viewCartAction()
500
  {
501
  $this->_initCustomer();
502
-
503
- $this->getResponse()->setBody(
504
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_view_cart', 'admin.customer.view.cart')
505
- ->setWebsiteId($this->getRequest()->getParam('website_id'))
506
- ->toHtml()
507
- );
508
  }
509
 
510
  /**
511
  * Get shopping carts from all websites for specified client
512
  *
513
- * @return string
514
  */
515
  public function cartsAction()
516
  {
517
  $this->_initCustomer();
518
- $this->getResponse()->setBody(
519
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_carts', 'admin.customer.carts')->toHtml()
520
- );
521
  }
522
 
 
 
 
 
523
  public function productReviewsAction()
524
  {
525
  $this->_initCustomer();
526
- $this->getResponse()->setBody(
527
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_reviews', 'admin.customer.reviews')
528
- ->setCustomerId(Mage::registry('current_customer')->getId())
529
- ->setUseAjax(true)
530
- ->toHtml()
531
- );
532
  }
533
 
 
 
 
 
534
  public function productTagsAction()
535
  {
536
  $this->_initCustomer();
537
- $this->getResponse()->setBody(
538
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_tag', 'admin.customer.tags')
539
- ->setCustomerId(Mage::registry('current_customer')->getId())
540
- ->setUseAjax(true)
541
- ->toHtml()
542
- );
543
  }
544
 
545
  public function tagGridAction()
546
  {
547
  $this->_initCustomer();
548
- $this->getResponse()->setBody(
549
- $this->getLayout()->createBlock('adminhtml/customer_edit_tab_tag', 'admin.customer.tags')
550
- ->setCustomerId(Mage::registry('current_customer'))
551
- ->toHtml()
552
  );
 
553
  }
554
 
555
  public function validateAction()
@@ -650,9 +667,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
650
  $customer->save();
651
  }
652
  Mage::getSingleton('adminhtml/session')->addSuccess(
653
- Mage::helper('adminhtml')->__(
654
- 'Total of %d record(s) were updated.', count($customersIds)
655
- )
656
  );
657
  } catch (Exception $e) {
658
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
@@ -674,9 +689,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
674
  $customer->save();
675
  }
676
  Mage::getSingleton('adminhtml/session')->addSuccess(
677
- Mage::helper('adminhtml')->__(
678
- 'Total of %d record(s) were updated.', count($customersIds)
679
- )
680
  );
681
  } catch (Exception $e) {
682
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
@@ -700,9 +713,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
700
  ->delete();
701
  }
702
  Mage::getSingleton('adminhtml/session')->addSuccess(
703
- Mage::helper('adminhtml')->__(
704
- 'Total of %d record(s) were deleted.', count($customersIds)
705
- )
706
  );
707
  } catch (Exception $e) {
708
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
@@ -725,9 +736,7 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
725
  $customer->save();
726
  }
727
  Mage::getSingleton('adminhtml/session')->addSuccess(
728
- Mage::helper('adminhtml')->__(
729
- 'Total of %d record(s) were updated.', count($customersIds)
730
- )
731
  );
732
  } catch (Exception $e) {
733
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
86
  public function gridAction()
87
  {
88
  $this->loadLayout();
89
+ $this->renderLayout();
90
  }
91
 
92
  /**
186
  {
187
  $data = $this->getRequest()->getPost();
188
  if ($data) {
189
+ $redirectBack = $this->getRequest()->getParam('back', false);
190
  $this->_initCustomer('customer_id');
191
 
192
+ /** @var $customer Mage_Customer_Model_Customer */
193
  $customer = Mage::registry('current_customer');
194
 
195
+ /** @var $customerForm Mage_Customer_Model_Form */
196
  $customerForm = Mage::getModel('customer/form');
197
  $customerForm->setEntity($customer)
198
  ->setFormCode('adminhtml_customer')
199
  ->ignoreInvisible(false)
200
  ;
201
 
202
+ $formData = $customerForm->extractData($this->getRequest(), 'account');
203
+
204
+ // Handle 'disable auto_group_change' attribute
205
+ if (isset($formData['disable_auto_group_change'])) {
206
+ $formData['disable_auto_group_change'] = empty($formData['disable_auto_group_change']) ? '0' : '1';
207
+ }
208
+
209
+ $errors = $customerForm->validateData($formData);
210
  if ($errors !== true) {
211
  foreach ($errors as $error) {
212
  $this->_getSession()->addError($error);
218
 
219
  $customerForm->compactData($formData);
220
 
221
+ // Unset template data
222
  if (isset($data['address']['_template_'])) {
223
  unset($data['address']['_template_']);
224
  }
225
 
226
  $modifiedAddresses = array();
227
  if (!empty($data['address'])) {
228
+ /** @var $addressForm Mage_Customer_Model_Form */
229
  $addressForm = Mage::getModel('customer/form');
230
  $addressForm->setFormCode('adminhtml_customer_address')->ignoreInvisible(false);
231
 
232
  foreach (array_keys($data['address']) as $index) {
233
  $address = $customer->getAddressItemById($index);
234
  if (!$address) {
235
+ $address = Mage::getModel('customer/address');
236
  }
237
 
238
  $requestScope = sprintf('address/%s', $index);
239
  $formData = $addressForm->setEntity($address)
240
  ->extractData($this->getRequest(), $requestScope);
241
+
242
+ // Set default billing and shipping flags to address
243
+ $isDefaultBilling = isset($data['account']['default_billing'])
244
+ && $data['account']['default_billing'] == $index;
245
+ $address->setIsDefaultBilling($isDefaultBilling);
246
+ $isDefaultShipping = isset($data['account']['default_shipping'])
247
+ && $data['account']['default_shipping'] == $index;
248
+ $address->setIsDefaultShipping($isDefaultShipping);
249
+
250
+ $errors = $addressForm->validateData($formData);
251
  if ($errors !== true) {
252
  foreach ($errors as $error) {
253
  $this->_getSession()->addError($error);
272
  }
273
  }
274
 
275
+ // Default billing and shipping
276
  if (isset($data['account']['default_billing'])) {
277
  $customer->setData('default_billing', $data['account']['default_billing']);
278
  }
283
  $customer->setData('confirmation', $data['account']['confirmation']);
284
  }
285
 
286
+ // Mark not modified customer addresses for delete
287
  foreach ($customer->getAddressesCollection() as $customerAddress) {
288
  if ($customerAddress->getId() && !in_array($customerAddress->getId(), $modifiedAddresses)) {
289
  $customerAddress->setData('_deleted', true);
290
  }
291
  }
292
 
293
+ if (Mage::getSingleton('admin/session')->isAllowed('customer/newsletter')) {
294
+ $customer->setIsSubscribed(isset($data['subscription']));
 
 
295
  }
296
 
297
  if (isset($data['account']['sendemail_store_id'])) {
301
  $isNewCustomer = $customer->isObjectNew();
302
  try {
303
  $sendPassToEmail = false;
304
+ // Force new customer confirmation
305
  if ($isNewCustomer) {
306
  $customer->setPassword($data['account']['password']);
307
  $customer->setForceConfirmed(true);
318
 
319
  $customer->save();
320
 
321
+ // Send welcome email
322
  if ($customer->getWebsiteId() && (isset($data['account']['sendemail']) || $sendPassToEmail)) {
323
  $storeId = $customer->getSendemailStoreId();
324
  if ($isNewCustomer) {
325
  $customer->sendNewAccountEmail('registered', '', $storeId);
326
+ } elseif ((!$customer->getConfirmation())) {
327
+ // Confirm not confirmed customer
 
328
  $customer->sendNewAccountEmail('confirmed', '', $storeId);
329
  }
330
  }
348
 
349
  if ($redirectBack) {
350
  $this->_redirect('*/*/edit', array(
351
+ 'id' => $customer->getId(),
352
+ '_current' => true
353
  ));
354
  return;
355
  }
413
  */
414
  public function ordersAction() {
415
  $this->_initCustomer();
416
+ $this->loadLayout();
417
+ $this->renderLayout();
418
  }
419
 
420
  /**
423
  */
424
  public function lastOrdersAction() {
425
  $this->_initCustomer();
426
+ $this->loadLayout();
427
+ $this->renderLayout();
428
  }
429
 
430
  /**
438
  ->loadByCustomer(Mage::registry('current_customer'));
439
 
440
  Mage::register('subscriber', $subscriber);
441
+ $this->loadLayout();
442
+ $this->renderLayout();
443
  }
444
 
445
  public function wishlistAction()
472
  public function viewWishlistAction()
473
  {
474
  $this->_initCustomer();
475
+ $this->loadLayout();
476
+ $this->renderLayout();
477
  }
478
 
479
  /**
499
  }
500
  }
501
 
502
+ $this->loadLayout();
503
+ $this->getLayout()->getBlock('admin.customer.view.edit.cart')->setWebsiteId($websiteId);
504
+ $this->renderLayout();
 
505
  }
506
 
507
  /**
511
  public function viewCartAction()
512
  {
513
  $this->_initCustomer();
514
+ $layout = $this->loadLayout()
515
+ ->getLayout()
516
+ ->getBlock('admin.customer.view.cart')
517
+ ->setWebsiteId();
518
+ $this->renderLayout();
 
519
  }
520
 
521
  /**
522
  * Get shopping carts from all websites for specified client
523
  *
 
524
  */
525
  public function cartsAction()
526
  {
527
  $this->_initCustomer();
528
+ $this->loadLayout();
529
+ $this->renderLayout();
 
530
  }
531
 
532
+ /**
533
+ * Get customer's product reviews list
534
+ *
535
+ */
536
  public function productReviewsAction()
537
  {
538
  $this->_initCustomer();
539
+ $this->loadLayout()
540
+ ->getLayout()
541
+ ->getBlock('admin.customer.reviews')
542
+ ->setCustomerId(Mage::registry('current_customer')->getId())
543
+ ->setUseAjax(true);
544
+ $this->renderLayout();
545
  }
546
 
547
+ /**
548
+ * Get customer's tags list
549
+ *
550
+ */
551
  public function productTagsAction()
552
  {
553
  $this->_initCustomer();
554
+ $this->loadLayout()
555
+ ->getLayout()
556
+ ->getBlock('admin.customer.tags')
557
+ ->setCustomerId(Mage::registry('current_customer')->getId())
558
+ ->setUseAjax(true);
559
+ $this->renderLayout();
560
  }
561
 
562
  public function tagGridAction()
563
  {
564
  $this->_initCustomer();
565
+ $this->loadLayout();
566
+ $this->getLayout()->getBlock('admin.customer.tags')->setCustomerId(
567
+ Mage::registry('current_customer')
 
568
  );
569
+ $this->renderLayout();
570
  }
571
 
572
  public function validateAction()
667
  $customer->save();
668
  }
669
  Mage::getSingleton('adminhtml/session')->addSuccess(
670
+ Mage::helper('adminhtml')->__('Total of %d record(s) were updated.', count($customersIds))
 
 
671
  );
672
  } catch (Exception $e) {
673
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
689
  $customer->save();
690
  }
691
  Mage::getSingleton('adminhtml/session')->addSuccess(
692
+ Mage::helper('adminhtml')->__('Total of %d record(s) were updated.', count($customersIds))
 
 
693
  );
694
  } catch (Exception $e) {
695
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
713
  ->delete();
714
  }
715
  Mage::getSingleton('adminhtml/session')->addSuccess(
716
+ Mage::helper('adminhtml')->__('Total of %d record(s) were deleted.', count($customersIds))
 
 
717
  );
718
  } catch (Exception $e) {
719
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
736
  $customer->save();
737
  }
738
  Mage::getSingleton('adminhtml/session')->addSuccess(
739
+ Mage::helper('adminhtml')->__('Total of %d record(s) were updated.', count($customersIds))
 
 
740
  );
741
  } catch (Exception $e) {
742
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
app/code/core/Mage/Adminhtml/controllers/DashboardController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -43,19 +43,34 @@ class Mage_Adminhtml_DashboardController extends Mage_Adminhtml_Controller_Actio
43
  $this->renderLayout();
44
  }
45
 
 
 
 
 
46
  public function productsViewedAction()
47
  {
48
- $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/dashboard_tab_products_viewed')->toHtml());
 
49
  }
50
 
 
 
 
 
51
  public function customersNewestAction()
52
  {
53
- $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/dashboard_tab_customers_newest')->toHtml());
 
54
  }
55
 
 
 
 
 
56
  public function customersMostAction()
57
  {
58
- $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/dashboard_tab_customers_most')->toHtml());
 
59
  }
60
 
61
  public function ajaxBlockAction()
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
43
  $this->renderLayout();
44
  }
45
 
46
+ /**
47
+ * Gets most viewed products list
48
+ *
49
+ */
50
  public function productsViewedAction()
51
  {
52
+ $this->loadLayout();
53
+ $this->renderLayout();
54
  }
55
 
56
+ /**
57
+ * Gets latest customers list
58
+ *
59
+ */
60
  public function customersNewestAction()
61
  {
62
+ $this->loadLayout();
63
+ $this->renderLayout();
64
  }
65
 
66
+ /**
67
+ * Gets the list of most active customers
68
+ *
69
+ */
70
  public function customersMostAction()
71
  {
72
+ $this->loadLayout();
73
+ $this->renderLayout();
74
  }
75
 
76
  public function ajaxBlockAction()
app/code/core/Mage/Adminhtml/controllers/IndexController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -76,15 +76,10 @@ class Mage_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
76
  return;
77
  }
78
  $loginData = $this->getRequest()->getParam('login');
79
- $data = array();
80
 
81
- if(is_array($loginData) && array_key_exists('username', $loginData)) {
82
- $data['username'] = $loginData['username'];
83
- } else {
84
- $data['username'] = null;
85
- }
86
-
87
- $this->_outTemplate('login', $data);
88
  }
89
 
90
  /**
@@ -234,40 +229,36 @@ class Mage_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
234
 
235
  if (!empty($email) && !empty($params)) {
236
  // Validate received data to be an email address
237
- if (!Zend_Validate::is($email, 'EmailAddress')) {
238
- $this->_getSession()->addError($this->__('Invalid email address.'));
239
- $this->_outTemplate('forgotpassword');
240
- return;
241
- }
242
- $collection = Mage::getResourceModel('admin/user_collection');
243
- /** @var $collection Mage_Admin_Model_Mysql4_User_Collection */
244
- $collection->addFieldToFilter('email', $email);
245
- $collection->load(false);
246
-
247
- if ($collection->getSize() > 0) {
248
- foreach ($collection as $item) {
249
- $user = Mage::getModel('admin/user')->load($item->getId());
250
- if ($user->getId()) {
251
- $newResetPasswordLinkToken = Mage::helper('admin')->generateResetPasswordLinkToken();
252
- $user->changeResetPasswordLinkToken($newResetPasswordLinkToken);
253
- $user->save();
254
- $user->sendPasswordResetConfirmationEmail();
255
  }
256
- break;
257
  }
 
 
 
 
 
 
258
  }
259
- $this->_getSession()
260
- ->addSuccess(Mage::helper('adminhtml')->__('If there is an account associated with %s you will receive an email with a link to reset your password.', Mage::helper('adminhtml')->htmlEscape($email)));
261
- $this->_redirect('*/*/login');
262
- return;
263
  } elseif (!empty($params)) {
264
  $this->_getSession()->addError(Mage::helper('adminhtml')->__('The email address is empty.'));
265
  }
266
-
267
- $data = array(
268
- 'email' => $email
269
- );
270
- $this->_outTemplate('forgotpassword', $data);
271
  }
272
 
273
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
76
  return;
77
  }
78
  $loginData = $this->getRequest()->getParam('login');
79
+ $username = (is_array($loginData) && array_key_exists('username', $loginData)) ? $loginData['username'] : null;
80
 
81
+ $this->loadLayout();
82
+ $this->renderLayout();
 
 
 
 
 
83
  }
84
 
85
  /**
229
 
230
  if (!empty($email) && !empty($params)) {
231
  // Validate received data to be an email address
232
+ if (Zend_Validate::is($email, 'EmailAddress')) {
233
+ $collection = Mage::getResourceModel('admin/user_collection');
234
+ /** @var $collection Mage_Admin_Model_Resource_User_Collection */
235
+ $collection->addFieldToFilter('email', $email);
236
+ $collection->load(false);
237
+
238
+ if ($collection->getSize() > 0) {
239
+ foreach ($collection as $item) {
240
+ $user = Mage::getModel('admin/user')->load($item->getId());
241
+ if ($user->getId()) {
242
+ $newResetPasswordLinkToken = Mage::helper('admin')->generateResetPasswordLinkToken();
243
+ $user->changeResetPasswordLinkToken($newResetPasswordLinkToken);
244
+ $user->save();
245
+ $user->sendPasswordResetConfirmationEmail();
246
+ }
247
+ break;
 
 
248
  }
 
249
  }
250
+ $this->_getSession()
251
+ ->addSuccess(Mage::helper('adminhtml')->__('If there is an account associated with %s you will receive an email with a link to reset your password.', Mage::helper('adminhtml')->escapeHtml($email)));
252
+ $this->_redirect('*/*/login');
253
+ return;
254
+ } else {
255
+ $this->_getSession()->addError($this->__('Invalid email address.'));
256
  }
 
 
 
 
257
  } elseif (!empty($params)) {
258
  $this->_getSession()->addError(Mage::helper('adminhtml')->__('The email address is empty.'));
259
  }
260
+ $this->loadLayout();
261
+ $this->renderLayout();
 
 
 
262
  }
263
 
264
  /**
app/code/core/Mage/Adminhtml/controllers/JsonController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Media/EditorController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Media/UploaderController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -117,9 +117,7 @@ class Mage_Adminhtml_Newsletter_SubscriberController extends Mage_Adminhtml_Cont
117
  $subscriber->unsubscribe();
118
  }
119
  Mage::getSingleton('adminhtml/session')->addSuccess(
120
- Mage::helper('adminhtml')->__(
121
- 'Total of %d record(s) were updated', count($subscribersIds)
122
- )
123
  );
124
  } catch (Exception $e) {
125
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
@@ -142,9 +140,7 @@ class Mage_Adminhtml_Newsletter_SubscriberController extends Mage_Adminhtml_Cont
142
  $subscriber->delete();
143
  }
144
  Mage::getSingleton('adminhtml/session')->addSuccess(
145
- Mage::helper('adminhtml')->__(
146
- 'Total of %d record(s) were deleted', count($subscribersIds)
147
- )
148
  );
149
  } catch (Exception $e) {
150
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
117
  $subscriber->unsubscribe();
118
  }
119
  Mage::getSingleton('adminhtml/session')->addSuccess(
120
+ Mage::helper('adminhtml')->__('Total of %d record(s) were updated', count($subscribersIds))
 
 
121
  );
122
  } catch (Exception $e) {
123
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
140
  $subscriber->delete();
141
  }
142
  Mage::getSingleton('adminhtml/session')->addSuccess(
143
+ Mage::helper('adminhtml')->__('Total of %d record(s) were deleted', count($subscribersIds))
 
 
144
  );
145
  } catch (Exception $e) {
146
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  /**
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  /**
app/code/core/Mage/Adminhtml/controllers/NotificationController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php CHANGED
@@ -20,7 +20,7 @@
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
- * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -185,7 +185,7 @@ class Mage_Adminhtml_Permissions_RoleController extends Mage_Adminhtml_Controlle
185
  }
186
 
187
  try {
188
- $roleName = Mage::helper('adminhtml')->stripTags($this->getRequest()->getParam('rolename', false));
189
 
190
  $role->setName($roleName)
191
  ->setPid($this->getRequest()->getParam('parent_id', false))
@@ -218,7 +218,7 @@ class Mage_Adminhtml_Permissions_RoleController extends Mage_Adminhtml_Controlle
218
  }
219
 
220
  //$this->getResponse()->setRedirect($this->getUrl("*/*/editrole/rid/$rid"));
221
- $this->_redirect('*/*/editrole', array('rid' => $rid));
222
  return;
223
  }
224
 
20
  *
21
  * @category Mage
22
  * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
185
  }
186
 
187
  try {
188
+ $roleName = $this->getRequest()->getParam('rolename', false);
189
 
190
  $role->setName($roleName)
191
  ->setPid($this->getRequest()->getParam('parent_id', false))
218
  }
219
 
220
  //$this->getResponse()->setRedirect($this->getUrl("*/*/editrole/rid/$rid"));
221
+ $this->_redirect('*/*/');
222
  return;
223
  }
224
 
app/code/{core/Mage/Adminhtml/controllers/Permissions/UserController.php → core} RENAMED
File without changes