Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update as of 10/09/2012

* Performance Testing Framework improvements:
  * Added ability to specify fixtures per scenario
  * Implemented Magento application cleanup between scenarios
  * Implemented support of PHP scenarios. The framework distinguishes type of the scenario by its extension: `jmx` or `php`
  * Added ability to skip warm-up for a certain scenario
  * JMeter scenarios are run with `jmeter` command instead of `java -jar ApacheJmeter.jar`. It's impossible to specify path to JMeter tool now, it should be accessible from command line as `jmeter`
* Implemented fixture for Performance Tests with 80k products distributed among 200 categories
* Tax rule management UI simplified:
  * Added `Jeditable` jQuery library
  * Added multiselect fields for customer tax class, product tax class and tax rate
  * Added ability to add/edit Tax Rate directly from Tax Rule page
* Simplified product creation workflow:
  * Added product types dropdown to "Add Product" button. Default attribute set is used for product creation
  * "Add Product" button opens form for Simple product with Default attribute set
  * Attribute set can be changed from product creation form
* Implemented auto-generation of product SKU and meta fields. The templates can be configured in `System -> Configuration -> Catalog -> Catalog -> Product Fields Auto-Generation`
* Added ability to unassign system attribute from an attribute set, if it's not "Minimal" one
* Specified UI IDs for base Backend elements. UI ID is represented as HTML "id" attribute intended to identify certain HTML element
* Refactored `Catalog_Model_Product_Indexer_Flat::matchEvent()` method - reduced cyclomatic complexity
* Updated DB structure to make possible to store Themes' and Widgets' layout updates
* Migration to jQuery:
  * Replaced Ajax, Dialog and Template mechanisms with jQuery analogs
  * Added jQuery loader for translation process
  * Migrated Inline-Translator to jQuery
* JavaScript improvements:
  * Implemented `editTrigger` jQuery widget intended to display "Edit" button for elements it is attached to
* Fixes:
  * Incorrect title for "Currency Symbols" page on Backend
  * References to website, store and store view aren't displayed on Backend, if Single Store mode is disabled
  * "Store" column and dropdown are displayed on `System -> Import/Export -> DataFlow-Profiles` page, when Single Store mode is enabled
  * Options are absent for `'tax_class_id'` product attribute
  * No exception/error message is produced, when attempting to commit/rollback asymmetric DB transaction
  * Links are not copied during downloadable product duplication
  * PayPal tab is absent in `System -> Configuration -> Sales` section
  * "Edit" link in wishlist opens Product View page instead of "Configure Product" page
  * Default value for a product attribute is not saved
  * Escaped HTML blocks with `Mage_Core_Helper_Data::jsonEncode`, where necessary
  * Impossible to add new Dataflow profile
  * Impossible to specify default option for new product attribute with "dropdown" type
  * Unable to send the email when creating new invoice/shipment/credit memo
  * "Segmentation Fault" in Integration tests
* GitHub requests:
  * [#36](#36) -- added ability to force set of "Include Tax" option for catalog prices
  * [#63](#63) -- removed obsolete "args" node in event subscribers
  * [#64](#64) -- fixed EAV text attribute validation for "0" value
  * [#72](#72) -- fixed collecting shipping totals for case, when previous invoice value is 0
  • Loading branch information...
commit 72f1ee692335819327a14e2a4c93aeea0ff29e9c 1 parent 215c077
@mage2-team mage2-team authored
Showing with 7,075 additions and 5,108 deletions.
  1. +49 −0 CHANGELOG.markdown
  2. +1 −1  app/code/core/Mage/Adminhtml/Block/Abstract.php
  3. +19 −31 app/code/core/Mage/Adminhtml/Block/Api/Buttons.php
  4. +17 −28 app/code/core/Mage/Adminhtml/Block/Backup.php
  5. +14 −23 app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php
  6. +2 −1  app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php
  7. +13 −19 app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php
  8. +12 −3 app/code/core/Mage/Adminhtml/Block/Catalog/Form.php
  9. +40 −7 app/code/core/Mage/Adminhtml/Block/Catalog/Product.php
  10. +18 −0 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php
  11. +4 −8 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php
  12. +50 −55 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php
  13. +11 −17 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php
  14. +5 −8 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php
  15. +4 −8 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php
  16. +61 −57 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php
  17. +14 −23 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php
  18. +11 −19 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php
  19. +7 −11 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php
  20. +10 −16 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php
  21. +1 −1  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php
  22. +0 −90 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php
  23. +10 −16 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php
  24. +26 −14 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php
  25. +1 −9 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
  26. +1 −3 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php
  27. +1 −1  app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php
  28. +1 −1  app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php
  29. +25 −34 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php
  30. +1 −1  app/code/core/Mage/Adminhtml/Block/Customer/Online.php
  31. +6 −18 app/code/core/Mage/Adminhtml/Block/Dashboard.php
  32. +25 −42 app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php
  33. +49 −73 app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php
  34. +10 −16 app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/List.php
  35. +1 −1  app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php
  36. +1 −1  app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php
  37. +5 −8 app/code/core/Mage/Adminhtml/Block/Report/Grid.php
  38. +6 −7 app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php
  39. +12 −3 app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php
  40. +1 −2  app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php
  41. +20 −32 app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php
  42. +1 −4 app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Form.php
  43. +11 −17 app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php
  44. +5 −8 app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php
  45. +2 −8 app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php
  46. +5 −8 app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php
  47. +5 −9 app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php
  48. +5 −9 app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php
  49. +4 −7 app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php
  50. +5 −8 app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php
  51. +5 −8 app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php
  52. +1 −2  app/code/core/Mage/Adminhtml/Block/System/Config/Form.php
  53. +10 −10 app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php
  54. +21 −31 app/code/core/Mage/Adminhtml/Block/System/Currency.php
  55. +5 −8 app/code/core/Mage/Adminhtml/Block/System/Design.php
  56. +15 −24 app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php
  57. +5 −7 app/code/core/Mage/Adminhtml/Block/System/Email/Template.php
  58. +1 −3 app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php
  59. +15 −24 app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php
  60. +15 −24 app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php
  61. +25 −0 app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php
  62. +5 −8 app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php
  63. +19 −31 app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php
  64. +107 −15 app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit/Form.php
  65. +6 −11 app/code/core/Mage/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php
  66. +19 −31 app/code/core/Mage/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php
  67. +6 −11 app/code/core/Mage/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php
  68. +1 −1  app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php
  69. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget.php
  70. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Accordion.php
  71. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Accordion/Item.php
  72. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Breadcrumbs.php
  73. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Button.php
  74. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Container.php
  75. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Form.php
  76. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Form/Element.php
  77. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php
  78. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Gallery.php
  79. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Element.php
  80. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php
  81. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php
  82. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
  83. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php
  84. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php
  85. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Checkbox.php
  86. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Country.php
  87. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php
  88. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php
  89. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Interface.php
  90. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Massaction.php
  91. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php
  92. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Radio.php
  93. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Range.php
  94. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php
  95. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Store.php
  96. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php
  97. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Theme.php
  98. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php
  99. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php
  100. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Checkbox.php
  101. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Concat.php
  102. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php
  103. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php
  104. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php
  105. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php
  106. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php
  107. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Interface.php
  108. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php
  109. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Longtext.php
  110. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Massaction.php
  111. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php
  112. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php
  113. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php
  114. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Radio.php
  115. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php
  116. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php
  117. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php
  118. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Wrapline.php
  119. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php
  120. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php
  121. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item.php
  122. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Default.php
  123. +2 −2 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Interface.php
  124. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php
  125. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Tab/Interface.php
  126. +1 −1  app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php
  127. +10 −0 app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
  128. +63 −72 app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php
  129. +58 −0 app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php
  130. +58 −0 app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php
  131. +77 −0 app/code/core/Mage/Adminhtml/controllers/Tax/ClassController.php
  132. +89 −0 app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
  133. +1 −3 app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php
  134. +3 −0  app/code/core/Mage/Adminhtml/etc/config.xml
  135. +4 −2 app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
  136. +1 −1  app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/options.phtml
  137. +7 −9 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main.phtml
  138. +79 −2 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml
  139. +2 −2 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml
  140. +3 −3 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/select.phtml
  141. +4 −0 app/code/core/Mage/Adminhtml/view/adminhtml/main.xml
  142. +1 −1  app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher.phtml
  143. +32 −30 app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/wizard.phtml
  144. +45 −0 app/code/core/Mage/Adminhtml/view/adminhtml/tax.xml
  145. +240 −0 app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/editablemultiselect.js
  146. +238 −0 app/code/core/Mage/Adminhtml/view/adminhtml/tax/rule/edit.phtml
  147. +36 −0 app/code/core/Mage/Adminhtml/view/adminhtml/tax/rule/rate/form.phtml
  148. +2 −1  app/code/core/Mage/Backend/Block/Menu.php
  149. +2 −1  app/code/core/Mage/Backend/Block/Widget.php
  150. +5 −1 app/code/core/Mage/Backend/Block/Widget/Accordion.php
  151. +11 −9 app/code/core/Mage/Backend/Block/Widget/Accordion/Item.php
  152. +47 −21 app/code/core/Mage/Backend/Block/Widget/Button.php
  153. +44 −0 app/code/core/Mage/Backend/Block/Widget/Button/Split.php
  154. +27 −15 app/code/core/Mage/Backend/Block/Widget/Container.php
  155. +12 −3 app/code/core/Mage/Backend/Block/Widget/Form.php
  156. +1 −1  app/code/core/Mage/Backend/Block/Widget/Form/Container.php
  157. +10 −14 app/code/core/Mage/Backend/Block/Widget/Form/Element/Gallery.php
  158. +33 −33 app/code/core/Mage/Backend/Block/Widget/Grid.php
  159. +3 −3 app/code/core/Mage/Backend/Block/Widget/Grid/Column.php
  160. +2 −2 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Date.php
  161. +2 −2 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
  162. +2 −2 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Price.php
  163. +3 −3 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Range.php
  164. +3 −1 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Select.php
  165. +3 −1 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Store.php
  166. +3 −2 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Text.php
  167. +1 −1  app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Theme.php
  168. +4 −1 app/code/core/Mage/Backend/Block/Widget/Tabs.php
  169. +6 −0 app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml
  170. +7 −1 app/code/core/Mage/Backend/view/adminhtml/admin/login_buttons.phtml
  171. +36 −0 app/code/core/Mage/Backend/view/adminhtml/widget/button.phtml
  172. +69 −0 app/code/core/Mage/Backend/view/adminhtml/widget/button/split.phtml
  173. +2 −2 app/code/core/Mage/Backend/view/adminhtml/widget/form/container.phtml
  174. +1 −1  app/code/core/Mage/Backend/view/adminhtml/widget/form/element.phtml
  175. +1 −1  app/code/core/Mage/Backend/view/adminhtml/widget/form/element/gallery.phtml
  176. +5 −4 app/code/core/Mage/Backend/view/adminhtml/widget/form/renderer/fieldset/element.phtml
  177. +14 −11 app/code/core/Mage/Backend/view/adminhtml/widget/grid.phtml
  178. +5 −5 app/code/core/Mage/Backend/view/adminhtml/widget/grid/massaction.phtml
  179. +5 −5 app/code/core/Mage/Backend/view/adminhtml/widget/tabs.phtml
  180. +6 −9 app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php
  181. +21 −33 app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php
  182. +5 −8 app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php
  183. +6 −0 app/code/core/Mage/Bundle/etc/config.xml
  184. +2 −2 app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option.phtml
  185. +1 −1  app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/selection.phtml
  186. +40 −3 app/code/core/Mage/Catalog/Helper/Product.php
  187. +23 −2 app/code/core/Mage/Catalog/Model/Product.php
  188. +61 −1 app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Sku.php
  189. +99 −51 app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php
  190. +36 −0 app/code/core/Mage/Catalog/Model/Product/Option.php
  191. +35 −7 app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php
  192. +8 −8 app/code/core/Mage/Catalog/Model/Resource/Product.php
  193. +13 −13 app/code/core/Mage/Catalog/Model/Resource/Setup.php
  194. +0 −3  app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.16-1.6.0.0.17.php
  195. +23 −0 app/code/core/Mage/Catalog/etc/config.xml
  196. +46 −0 app/code/core/Mage/Catalog/etc/system.xml
  197. +0 −3  app/code/core/Mage/CatalogRule/data/catalogrule_setup/data-upgrade-1.6.0.3-1.6.0.4.php
  198. +0 −3  app/code/core/Mage/Cms/data/cms_setup/data-upgrade-1.6.0.0.2-1.6.0.0.3.php
  199. +1 −1  app/code/core/Mage/Connect/view/adminhtml/extension/custom/authors.phtml
  200. +18 −0 app/code/core/Mage/Core/Block/Abstract.php
  201. +2 −2 app/code/core/Mage/Core/Block/Messages.php
  202. +0 −1  app/code/core/Mage/Core/Model/App.php
  203. +42 −18 app/code/core/Mage/Core/Model/Layout.php
  204. +674 −0 app/code/core/Mage/Core/Model/Layout/Merge.php
  205. +7 −620 app/code/core/Mage/Core/Model/Layout/Update.php
  206. +5 −11 app/code/core/Mage/Core/Model/Resource/{Layout.php → Layout/Update.php}
  207. +21 −17 app/code/core/Mage/Core/Model/{Layout/Data.php → Resource/Layout/Update/Collection.php}
  208. +26 −14 app/code/core/Mage/Core/Model/Translate/Inline.php
  209. +0 −3  app/code/core/Mage/Core/data/core_setup/data-upgrade-1.6.0.3-1.6.0.4.php
  210. +33 −0 app/code/core/Mage/Core/view/adminhtml/prototype/magento.css
  211. +33 −0 app/code/core/Mage/Core/view/frontend/prototype/magento.css
  212. +1 −1  app/code/core/Mage/CurrencySymbol/controllers/Adminhtml/System/CurrencysymbolController.php
  213. +0 −3  app/code/core/Mage/Customer/data/customer_setup/data-upgrade-1.6.2.0.1-1.6.2.0.2.php
  214. +0 −2  app/code/core/Mage/Dataflow/Model/Convert/Parser/Interface.php
  215. +1 −1  app/code/core/Mage/DesignEditor/Block/Adminhtml/Launcher/Form.php
  216. +1 −1  app/code/core/Mage/DesignEditor/Block/Adminhtml/Launcher/Form/Container.php
  217. +1 −1  app/code/core/Mage/DesignEditor/Block/Toolbar/HandlesHierarchy.php
  218. +2 −2 app/code/core/Mage/DesignEditor/Model/Observer.php
  219. +61 −61 app/code/core/Mage/DesignEditor/view/frontend/js/settimeout_override.js
  220. +6 −9 app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php
  221. +6 −10 app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php
  222. +46 −0 app/code/core/Mage/Downloadable/Model/Observer.php
  223. +8 −0 app/code/core/Mage/Downloadable/etc/config.xml
  224. +9 −13 app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Options/Abstract.php
  225. +49 −33 app/code/core/Mage/Eav/Model/Attribute/Data/Abstract.php
  226. +23 −6 app/code/core/Mage/Eav/Model/Attribute/Data/Text.php
  227. +17 −20 app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php
  228. +0 −3  app/code/core/Mage/Eav/data/eav_setup/data-upgrade-1.6.0.0-1.6.0.1.php
  229. +3 −12 app/code/core/Mage/GoogleShopping/Block/Adminhtml/Items.php
  230. +11 −17 app/code/core/Mage/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php
  231. +1 −1  app/code/core/Mage/GoogleShopping/view/adminhtml/types/edit/attributes.phtml
  232. +0 −3  app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php
  233. +0 −3  app/code/core/Mage/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php
  234. +0 −11 app/code/core/Mage/Page/Block/Html/Head.php
  235. +3 −0  app/code/core/Mage/Page/etc/config.xml
  236. +36 −0 app/code/core/Mage/Page/view/frontend/layout_addons.xml
  237. +34 −3 app/code/core/Mage/Payment/Helper/Data.php
  238. +1 −1  app/code/core/Mage/Paypal/Block/Adminhtml/Settlement/Details.php
  239. +1 −0  app/code/core/Mage/Paypal/etc/system.xml
  240. +1 −19 app/code/core/Mage/Sales/Model/Order.php
  241. +2 −18 app/code/core/Mage/Sales/Model/Order/Creditmemo.php
  242. +2 −20 app/code/core/Mage/Sales/Model/Order/Invoice.php
  243. +3 −3 app/code/core/Mage/Sales/Model/Order/Invoice/Total/Shipping.php
  244. +4 −18 app/code/core/Mage/Sales/Model/Order/Shipment.php
  245. +0 −3  app/code/core/Mage/SalesRule/data/salesrule_setup/data-upgrade-1.6.0.3-1.6.0.4.php
  246. +1 −1  app/code/core/Mage/Tag/Block/Adminhtml/Pending.php
  247. +1 −1  app/code/core/Mage/Tag/view/frontend/cloud.phtml
  248. +3 −3 app/code/core/Mage/Tag/view/frontend/list.phtml
  249. +2 −2 app/code/core/Mage/Tag/view/frontend/popular.phtml
  250. +23 −31 app/code/core/Mage/Tax/Model/Config.php
  251. +0 −16 app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php
  252. +9 −0 app/code/core/Mage/Tax/etc/config.xml
  253. +1,510 −1,510 app/code/core/Mage/Usa/etc/wsdl/FedEx/TrackService_v5.wsdl
  254. +23 −35 app/code/core/Mage/User/Block/Buttons.php
  255. +5 −7 app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php
  256. +2 −2 app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php
  257. +3 −3 app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php
  258. +0 −3  app/code/core/Mage/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php
  259. +1 −1  app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml
  260. +3 −4 app/code/core/Mage/Wishlist/view/frontend/layout.xml
  261. +5 −9 app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Settings.php
  262. +288 −288 app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-catalog.css
  263. +188 −188 app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-home.css
  264. +215 −4 app/design/adminhtml/default/default/skin/default/boxes.css
  265. BIN  app/design/adminhtml/default/default/skin/default/images/icon-tooltip.png
  266. 0  dev/shell/cron.sh
  267. +5 −2 dev/tests/integration/framework/Magento/Test/Annotation/AppIsolation.php
  268. +23 −23 dev/tests/integration/framework/tests/unit/phpunit.xml.dist
  269. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/TabsTest.php
  270. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Customer/Edit/Tab/View/AccordionTest.php
  271. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Customer/OnlineTest.php
  272. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Catalog/Category/EditTest.php
  273. +1 −0  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Catalog/Edit/FormTest.php
  274. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Catalog/Product/EditTest.php
  275. +1 −0  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/FormTest.php
  276. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Cms/Page/EditTest.php
  277. +2 −0  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Edit/FormTest.php
  278. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/EditTest.php
  279. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/ContainerTest.php
  280. +4 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Customer/GroupControllerTest.php
  281. +2 −2 ...ntegration/testsuite/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php
  282. +2 −2 ...sts/integration/testsuite/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php
  283. +9 −1 dev/tests/integration/testsuite/Mage/Catalog/Model/Category/CategoryImageTest.php
  284. +86 −0 dev/tests/integration/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/SkuTest.php
  285. +8 −0 dev/tests/integration/testsuite/Mage/Catalog/Model/ProductTest.php
  286. +48 −0 dev/tests/integration/testsuite/Mage/Catalog/_files/product_simple_duplicated.php
  287. +1 −1  dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php
  288. +398 −0 dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php
  289. +17 −352 dev/tests/integration/testsuite/Mage/Core/Model/Layout/UpdateTest.php
  290. +1 −1  dev/tests/integration/testsuite/Mage/Core/Model/Layout/_files/db_layout_update.php
  291. +67 −59 dev/tests/integration/testsuite/Mage/Core/Model/LayoutTest.php
  292. +1 −1  dev/tests/integration/testsuite/Mage/Core/Model/Resource/LayoutTest.php
  293. +10 −1 dev/tests/integration/testsuite/Mage/Core/Model/Translate/InlineTest.php
  294. +18 −11 dev/tests/integration/testsuite/Mage/Core/Model/Translate/_files/_inline_page_expected.html
  295. +6 −3 dev/tests/integration/testsuite/Mage/Core/Utility/Layout.php
  296. +2 −2 dev/tests/integration/testsuite/Mage/Core/Utility/LayoutTest.php
  297. +3 −2 dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php
  298. +1 −2  dev/tests/integration/testsuite/Mage/Review/Model/Resource/Review/Product/CollectionTest.php
  299. +0 −2  dev/tests/integration/testsuite/Mage/Review/_files/different_reviews.php
  300. +53 −0 dev/tests/integration/testsuite/Mage/Sales/Model/Order/CreditmemoTest.php
Sorry, we could not display the entire diff because too many files (813) changed.
View
49 CHANGELOG.markdown
@@ -1,3 +1,52 @@
+Update as of 10/09/2012
+======================
+* Performance Testing Framework improvements:
+ * Added ability to specify fixtures per scenario
+ * Implemented Magento application cleanup between scenarios
+ * Implemented support of PHP scenarios. The framework distinguishes type of the scenario by its extension: `jmx` or `php`
+ * Added ability to skip warm-up for a certain scenario
+ * JMeter scenarios are run with `jmeter` command instead of `java -jar ApacheJmeter.jar`. It's impossible to specify path to JMeter tool now, it should be accessible from command line as `jmeter`
+* Implemented fixture for Performance Tests with 80k products distributed among 200 categories
+* Tax rule management UI simplified:
+ * Added `Jeditable` jQuery library
+ * Added multiselect fields for customer tax class, product tax class and tax rate
+ * Added ability to add/edit Tax Rate directly from Tax Rule page
+* Simplified product creation workflow:
+ * Added product types dropdown to "Add Product" button. Default attribute set is used for product creation
+ * "Add Product" button opens form for Simple product with Default attribute set
+ * Attribute set can be changed from product creation form
+* Implemented auto-generation of product SKU and meta fields. The templates can be configured in `System -> Configuration -> Catalog -> Catalog -> Product Fields Auto-Generation`
+* Added ability to unassign system attribute from an attribute set, if it's not "Minimal" one
+* Specified UI IDs for base Backend elements. UI ID is represented as HTML "id" attribute intended to identify certain HTML element
+* Refactored `Catalog_Model_Product_Indexer_Flat::matchEvent()` method - reduced cyclomatic complexity
+* Updated DB structure to make possible to store Themes' and Widgets' layout updates
+* Migration to jQuery:
+ * Replaced Ajax, Dialog and Template mechanisms with jQuery analogs
+ * Added jQuery loader for translation process
+ * Migrated Inline-Translator to jQuery
+* JavaScript improvements:
+ * Implemented `editTrigger` jQuery widget intended to display "Edit" button for elements it is attached to
+* Fixes:
+ * Incorrect title for "Currency Symbols" page on Backend
+ * References to website, store and store view aren't displayed on Backend, if Single Store mode is disabled
+ * "Store" column and dropdown are displayed on `System -> Import/Export -> DataFlow-Profiles` page, when Single Store mode is enabled
+ * Options are absent for `'tax_class_id'` product attribute
+ * No exception/error message is produced, when attempting to commit/rollback asymmetric DB transaction
+ * Links are not copied during downloadable product duplication
+ * PayPal tab is absent in `System -> Configuration -> Sales` section
+ * "Edit" link in wishlist opens Product View page instead of "Configure Product" page
+ * Default value for a product attribute is not saved
+ * Escaped HTML blocks with `Mage_Core_Helper_Data::jsonEncode`, where necessary
+ * Impossible to add new Dataflow profile
+ * Impossible to specify default option for new product attribute with "dropdown" type
+ * Unable to send the email when creating new invoice/shipment/credit memo
+ * "Segmentation Fault" in Integration tests
+* GitHub requests:
+ * [#36](https://github.com/magento/magento2/pull/36) -- added ability to force set of "Include Tax" option for catalog prices
+ * [#63](https://github.com/magento/magento2/pull/63) -- removed obsolete "args" node in event subscribers
+ * [#64](https://github.com/magento/magento2/pull/64) -- fixed EAV text attribute validation for "0" value
+ * [#72](https://github.com/magento/magento2/pull/72) -- fixed collecting shipping totals for case, when previous invoice value is 0
+
Update as of 9/27/2012
======================
* Refactoring Magento 2 to use jQuery instead of Prototype:
View
2  app/code/core/Mage/Adminhtml/Block/Abstract.php
@@ -29,7 +29,7 @@
* @package Mage_Adminhtml
* @author Magento Core Team <core@magentocommerce.com>
* @deprecated Moved to module Mage_Backend
- */
+ */
class Mage_Adminhtml_Block_Abstract extends Mage_Backend_Block_Abstract
{
View
50 app/code/core/Mage/Adminhtml/Block/Api/Buttons.php
@@ -35,40 +35,28 @@ public function __construct()
protected function _prepareLayout()
{
- $this->setChild('backButton',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Back'),
- 'onclick' => 'window.location.href=\''.$this->getUrl('*/*/').'\'',
- 'class' => 'back'
- ))
- );
+ $this->addChild('backButton', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Back'),
+ 'onclick' => 'window.location.href=\''.$this->getUrl('*/*/').'\'',
+ 'class' => 'back'
+ ));
- $this->setChild('resetButton',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Reset'),
- 'onclick' => 'window.location.reload()'
- ))
- );
+ $this->addChild('resetButton', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Reset'),
+ 'onclick' => 'window.location.reload()'
+ ));
- $this->setChild('saveButton',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save Role'),
- 'onclick' => 'roleForm.submit();return false;',
- 'class' => 'save'
- ))
- );
+ $this->addChild('saveButton', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save Role'),
+ 'onclick' => 'roleForm.submit();return false;',
+ 'class' => 'save'
+ ));
- $this->setChild('deleteButton',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete Role'),
- 'onclick' => 'deleteConfirm(\'' . Mage::helper('Mage_Adminhtml_Helper_Data')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array('rid' => $this->getRequest()->getParam('rid'))) . '\')',
- 'class' => 'delete'
- ))
- );
+ $this->addChild('deleteButton', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete Role'),
+ 'onclick' => 'deleteConfirm(\'' . Mage::helper('Mage_Adminhtml_Helper_Data')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array('rid' => $this->getRequest()->getParam('rid'))) . '\')',
+ 'class' => 'delete'
+ ));
return parent::_prepareLayout();
}
View
45 app/code/core/Mage/Adminhtml/Block/Backup.php
@@ -43,35 +43,24 @@ class Mage_Adminhtml_Block_Backup extends Mage_Adminhtml_Block_Template
protected function _prepareLayout()
{
parent::_prepareLayout();
- $this->setChild('createButton',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('Database Backup'),
- 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_DB . "')",
- 'class' => 'task'
- ))
- );
- $this->setChild('createSnapshotButton',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('System Backup'),
- 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_SYSTEM_SNAPSHOT . "')",
- 'class' => ''
- ))
- );
- $this->setChild('createMediaBackupButton',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('Database and Media Backup'),
- 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_MEDIA . "')",
- 'class' => ''
- ))
- );
- $this->setChild('backupsGrid',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Backup_Grid')
- );
+ $this->addChild('createButton', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('Database Backup'),
+ 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_DB . "')",
+ 'class' => 'task'
+ ));
+ $this->addChild('createSnapshotButton', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('System Backup'),
+ 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_SYSTEM_SNAPSHOT . "')",
+ 'class' => ''
+ ));
+ $this->addChild('createMediaBackupButton', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('Database and Media Backup'),
+ 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_MEDIA . "')",
+ 'class' => ''
+ ));
+ $this->addChild('backupsGrid', 'Mage_Adminhtml_Block_Backup_Grid');
- $this->setChild('dialogs', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Backup_Dialogs'));
+ $this->addChild('dialogs', 'Mage_Adminhtml_Block_Backup_Dialogs');
}
public function getCreateButtonHtml()
View
37 app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php
@@ -57,38 +57,29 @@ protected function _prepareLayout()
// Save button
if (!$category->isReadonly()) {
- $this->setChild('save_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Category'),
- 'onclick' => "categorySubmit('" . $this->getSaveUrl() . "', true)",
- 'class' => 'save'
- ))
- );
+ $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Category'),
+ 'onclick' => "categorySubmit('" . $this->getSaveUrl() . "', true)",
+ 'class' => 'save'
+ ));
}
// Delete button
if (!in_array($categoryId, $this->getRootIds()) && $category->isDeleteable()) {
- $this->setChild('delete_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Category'),
- 'onclick' => "categoryDelete('" . $this->getUrl('*/*/delete', array('_current' => true)) . "', true, {$categoryId})",
- 'class' => 'delete'
- ))
- );
+ $this->addChild('delete_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Category'),
+ 'onclick' => "categoryDelete('" . $this->getUrl('*/*/delete', array('_current' => true)) . "', true, {$categoryId})",
+ 'class' => 'delete'
+ ));
}
// Reset button
if (!$category->isReadonly()) {
$resetPath = $categoryId ? '*/*/edit' : '*/*/add';
- $this->setChild('reset_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
- 'onclick' => "categoryReset('".$this->getUrl($resetPath, array('_current'=>true))."',true)"
- ))
- );
+ $this->addChild('reset_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
+ 'onclick' => "categoryReset('".$this->getUrl($resetPath, array('_current'=>true))."',true)"
+ ));
}
return parent::_prepareLayout();
View
3  app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php
@@ -133,7 +133,8 @@ protected function _prepareLayout()
}
$active = $defaultGroupId == $group->getId();
- $block = $this->getLayout()->createBlock($this->getAttributeTabBlock(), '')
+ $block = $this->getLayout()->createBlock($this->getAttributeTabBlock(), $this->getNameInLayout() . '_tab_'
+ . $group->getAttributeGroupName())
->setGroup($group)
->setAttributes($attributes)
->setAddHiddenFields($active)
View
32 app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php
@@ -53,27 +53,21 @@ protected function _prepareLayout()
'_query' => false
));
- $this->setChild('add_sub_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Subcategory'),
- 'onclick' => "addNew('".$addUrl."', false)",
- 'class' => 'add',
- 'id' => 'add_subcategory_button',
- 'style' => $this->canAddSubCategory() ? '' : 'display: none;'
- ))
- );
+ $this->addChild('add_sub_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Subcategory'),
+ 'onclick' => "addNew('".$addUrl."', false)",
+ 'class' => 'add',
+ 'id' => 'add_subcategory_button',
+ 'style' => $this->canAddSubCategory() ? '' : 'display: none;'
+ ));
if ($this->canAddRootCategory()) {
- $this->setChild('add_root_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Root Category'),
- 'onclick' => "addNew('".$addUrl."', true)",
- 'class' => 'add',
- 'id' => 'add_root_category_button'
- ))
- );
+ $this->addChild('add_root_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Root Category'),
+ 'onclick' => "addNew('".$addUrl."', true)",
+ 'class' => 'add',
+ 'id' => 'add_root_category_button'
+ ));
}
$this->setChild('store_switcher',
View
15 app/code/core/Mage/Adminhtml/Block/Catalog/Form.php
@@ -36,13 +36,22 @@ class Mage_Adminhtml_Block_Catalog_Form extends Mage_Adminhtml_Block_Widget_Form
protected function _prepareLayout()
{
Varien_Data_Form::setElementRenderer(
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Element')
+ $this->getLayout()->createBlock(
+ 'Mage_Adminhtml_Block_Widget_Form_Renderer_Element',
+ $this->getNameInLayout() . '_element'
+ )
);
Varien_Data_Form::setFieldsetRenderer(
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset')
+ $this->getLayout()->createBlock(
+ 'Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset',
+ $this->getNameInLayout() . '_fieldset'
+ )
);
Varien_Data_Form::setFieldsetElementRenderer(
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element')
+ $this->getLayout()->createBlock(
+ 'Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element',
+ $this->getNameInLayout() . '_fieldset_element'
+ )
);
}
}
View
47 app/code/core/Mage/Adminhtml/Block/Catalog/Product.php
@@ -50,9 +50,11 @@ public function __construct()
protected function _prepareLayout()
{
$this->_addButton('add_new', array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Product'),
- 'onclick' => "setLocation('{$this->getUrl('*/*/new')}')",
- 'class' => 'add'
+ 'id' => 'add_new_product',
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Product'),
+ 'class' => 'btn-add',
+ 'class_name' => 'Mage_Backend_Block_Widget_Button_Split',
+ 'options' => $this->_getAddProductButtonOptions()
));
$this->setChild(
@@ -63,6 +65,40 @@ protected function _prepareLayout()
}
/**
+ * Retrieve options for 'Add Product' split button
+ *
+ * @return array
+ */
+ protected function _getAddProductButtonOptions()
+ {
+ $splitButtonOptions = array();
+
+ foreach (Mage::getModel('Mage_Catalog_Model_Product_Type')->getOptionArray() as $key => $label) {
+ $splitButtonOptions[$key] = array(
+ 'label' => $label,
+ 'onclick' => "setLocation('" . $this->_getProductCreateUrl($key) . "')",
+ 'default' => Mage_Catalog_Model_Product_Type::DEFAULT_TYPE == $key
+ );
+ }
+
+ return $splitButtonOptions;
+ }
+
+ /**
+ * Retrieve product create url by specified product type
+ *
+ * @param string $type
+ * @return string
+ */
+ protected function _getProductCreateUrl($type)
+ {
+ return $this->getUrl('*/*/new', array(
+ 'set' => Mage::getModel('Mage_Catalog_Model_Product')->getDefaultAttributeSetId(),
+ 'type' => $type
+ ));
+ }
+
+ /**
* Render grid
*
* @return string
@@ -79,9 +115,6 @@ public function getGridHtml()
*/
public function isSingleStoreMode()
{
- if (!Mage::app()->isSingleStoreMode()) {
- return false;
- }
- return true;
+ return Mage::app()->isSingleStoreMode();
}
}
View
18 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php
@@ -37,4 +37,22 @@
class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options
extends Mage_Eav_Block_Adminhtml_Attribute_Edit_Options_Abstract
{
+ /**
+ * Retrieve option values collection
+ * It is represented by an array in case of system attribute
+ *
+ * @param Mage_Eav_Model_Entity_Attribute_Abstract $attribute
+ * @return array|Mage_Eav_Model_Resource_Entity_Attribute_Option_Collection
+ */
+ protected function _getOptionValuesCollection(Mage_Eav_Model_Entity_Attribute_Abstract $attribute)
+ {
+ if ($this->canManageOptionDefaultOnly()) {
+ $options = Mage::getModel($attribute->getSourceModel())
+ ->setAttribute($attribute)
+ ->getAllOptions(true);
+ return array_reverse($options);
+ } else {
+ return parent::_getOptionValuesCollection($attribute);
+ }
+ }
}
View
12 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php
@@ -55,14 +55,10 @@ protected function _prepareLayout()
->setGroupAttributes($this->_getGroupAttributes())
);
- $this->setChild(
- 'close_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Close Window'),
- 'onclick' => 'addAttribute(true)'
- ))
- );
+ $this->addChild('close_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Close Window'),
+ 'onclick' => 'addAttribute(true)'
+ ));
}
/**
View
105 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php
@@ -51,60 +51,49 @@ protected function _prepareLayout()
{
$setId = $this->_getSetId();
- $this->setChild('group_tree',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Tree_Group')
- );
-
- $this->setChild('edit_set_form',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset')
- );
-
- $this->setChild('delete_group_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Selected Group'),
- 'onclick' => 'editSet.submit();',
- 'class' => 'delete'
- )));
-
- $this->setChild('add_group_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New'),
- 'onclick' => 'editSet.addGroup();',
- 'class' => 'add'
- )));
-
- $this->setChild('back_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'),
- 'onclick' => 'setLocation(\''.$this->getUrl('*/*/').'\')',
- 'class' => 'back'
- )));
-
- $this->setChild('reset_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
- 'onclick' => 'window.location.reload()'
- )));
-
- $this->setChild('save_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'),
- 'onclick' => 'editSet.save();',
- 'class' => 'save'
- )));
-
- $this->setChild('delete_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Attribute Set'),
- 'onclick' => 'deleteConfirm(\''. $this->jsQuoteEscape(Mage::helper('Mage_Catalog_Helper_Data')->__('All products of this set will be deleted! Are you sure you want to delete this attribute set?')) . '\', \'' . $this->getUrl('*/*/delete', array('id' => $setId)) . '\')',
- 'class' => 'delete'
- )));
-
- $this->setChild('rename_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('New Set Name'),
- 'onclick' => 'editSet.rename()'
- )));
+ $this->addChild('group_tree', 'Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Tree_Group');
+
+ $this->addChild('edit_set_form', 'Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset');
+
+ $this->addChild('delete_group_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Selected Group'),
+ 'onclick' => 'editSet.submit();',
+ 'class' => 'delete'
+ ));
+
+ $this->addChild('add_group_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New'),
+ 'onclick' => 'editSet.addGroup();',
+ 'class' => 'add'
+ ));
+
+ $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'),
+ 'onclick' => 'setLocation(\''.$this->getUrl('*/*/').'\')',
+ 'class' => 'back'
+ ));
+
+ $this->addChild('reset_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
+ 'onclick' => 'window.location.reload()'
+ ));
+
+ $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'),
+ 'onclick' => 'editSet.save();',
+ 'class' => 'save'
+ ));
+
+ $this->addChild('delete_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Attribute Set'),
+ 'onclick' => 'deleteConfirm(\''. $this->jsQuoteEscape(Mage::helper('Mage_Catalog_Helper_Data')->__('All products of this set will be deleted! Are you sure you want to delete this attribute set?')) . '\', \'' . $this->getUrl('*/*/delete', array('id' => $setId)) . '\')',
+ 'class' => 'delete'
+ ));
+
+ $this->addChild('rename_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('New Set Name'),
+ 'onclick' => 'editSet.rename()'
+ ));
return parent::_prepareLayout();
}
@@ -179,6 +168,8 @@ public function getGroupTreeJson()
$configurable = Mage::getResourceModel('Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute')
->getUsedAttributes($setId);
+ $unassignableAttributes = Mage::helper('Mage_Catalog_Helper_Product')->getUnassignableAttributes();
+
/* @var $node Mage_Eav_Model_Entity_Attribute_Group */
foreach ($groups as $node) {
$item = array();
@@ -197,15 +188,19 @@ public function getGroupTreeJson()
$item['children'] = array();
foreach ($nodeChildren->getItems() as $child) {
/* @var $child Mage_Eav_Model_Entity_Attribute */
+
+ $isUnassignable = !in_array($child->getAttributeCode(), $unassignableAttributes);
+
$attr = array(
'text' => $child->getAttributeCode(),
'id' => $child->getAttributeId(),
- 'cls' => (!$child->getIsUserDefined()) ? 'system-leaf' : 'leaf',
+ 'cls' => $isUnassignable ? 'leaf' : 'system-leaf',
'allowDrop' => false,
'allowDrag' => true,
'leaf' => true,
'is_user_defined' => $child->getIsUserDefined(),
'is_configurable' => (int)in_array($child->getAttributeId(), $configurable),
+ 'is_unassignable' => $isUnassignable,
'entity_id' => $child->getEntityAttributeId()
);
View
28 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php
@@ -40,24 +40,18 @@ protected function _construct()
protected function _prepareLayout()
{
- $this->setChild('save_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'),
- 'onclick' => 'if (addSet.submit()) disableElements(\'save\');',
- 'class' => 'save'
- )));
- $this->setChild('back_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'),
- 'onclick' => 'setLocation(\''.$this->getUrl('*/*/').'\')',
- 'class' => 'back'
- )));
+ $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'),
+ 'onclick' => 'if (addSet.submit()) disableElements(\'save\');',
+ 'class' => 'save'
+ ));
+ $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'),
+ 'onclick' => 'setLocation(\''.$this->getUrl('*/*/').'\')',
+ 'class' => 'back'
+ ));
- $this->setChild('setForm',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset')
- );
+ $this->addChild('setForm', 'Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset');
return parent::_prepareLayout();
}
View
13 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php
@@ -42,14 +42,11 @@ public function __construct()
protected function _prepareLayout()
{
- $this->setChild('addButton',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New Set'),
- 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/add') . '\')',
- 'class' => 'add',
- ))
- );
+ $this->addChild('addButton', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New Set'),
+ 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/add') . '\')',
+ 'class' => 'add',
+ ));
return parent::_prepareLayout();
}
View
12 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php
@@ -45,14 +45,10 @@ public function __construct()
protected function _prepareLayout()
{
- $this->setChild(
- 'close_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Close Window'),
- 'onclick' => 'addProduct(true)'
- ))
- );
+ $this->addChild('close_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Close Window'),
+ 'onclick' => 'addProduct(true)'
+ ));
}
View
118 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php
@@ -50,27 +50,26 @@ public function getProduct()
return Mage::registry('current_product');
}
+ /**
+ * Add elements in layout
+ *
+ * @return Mage_Adminhtml_Block_Catalog_Product_Edit
+ */
protected function _prepareLayout()
{
if (!$this->getRequest()->getParam('popup')) {
- $this->setChild('back_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'),
- 'onclick' => 'setLocation(\''
- . $this->getUrl('*/*/', array('store'=>$this->getRequest()->getParam('store', 0))).'\')',
- 'class' => 'back'
- ))
- );
+ $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'),
+ 'onclick' => 'setLocation(\''
+ . $this->getUrl('*/*/', array('store'=>$this->getRequest()->getParam('store', 0))).'\')',
+ 'class' => 'back'
+ ));
} else {
- $this->setChild('back_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Close Window'),
- 'onclick' => 'window.close()',
- 'class' => 'cancel'
- ))
- );
+ $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Close Window'),
+ 'onclick' => 'window.close()',
+ 'class' => 'cancel'
+ ));
}
if (!$this->getProduct()->isReadonly()) {
@@ -84,56 +83,41 @@ protected function _prepareLayout()
))
);
- $this->setChild('reset_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
- 'onclick' => 'setLocation(\''.$this->getUrl('*/*/*', array('_current'=>true)).'\')'
- ))
- );
+ $this->addChild('reset_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
+ 'onclick' => 'setLocation(\''.$this->getUrl('*/*/*', array('_current'=>true)).'\')'
+ ));
- $this->setChild('save_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save'),
- 'onclick' => 'productForm.submit()',
- 'class' => 'save'
- ))
- );
+ $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save'),
+ 'onclick' => 'productForm.submit()',
+ 'class' => 'save'
+ ));
}
if (!$this->getRequest()->getParam('popup')) {
if (!$this->getProduct()->isReadonly()) {
- $this->setChild('save_and_edit_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save and Continue Edit'),
- 'onclick' => 'saveAndContinueEdit(\''.$this->getSaveAndContinueUrl().'\')',
- 'class' => 'save'
- ))
- );
+ $this->addChild('save_and_edit_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save and Continue Edit'),
+ 'onclick' => 'saveAndContinueEdit(\''.$this->getSaveAndContinueUrl().'\')',
+ 'class' => 'save'
+ ));
}
if ($this->getProduct()->isDeleteable()) {
- $this->setChild('delete_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete'),
- 'onclick' => 'confirmSetLocation(\''
- . Mage::helper('Mage_Catalog_Helper_Data')->__('Are you sure?').'\', \''.$this->getDeleteUrl().'\')',
- 'class' => 'delete'
- ))
- );
+ $this->addChild('delete_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete'),
+ 'onclick' => 'confirmSetLocation(\''
+ . Mage::helper('Mage_Catalog_Helper_Data')->__('Are you sure?').'\', \''.$this->getDeleteUrl().'\')',
+ 'class' => 'delete'
+ ));
}
if ($this->getProduct()->isDuplicable()) {
- $this->setChild('duplicate_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Duplicate'),
- 'onclick' => 'setLocation(\'' . $this->getDuplicateUrl() . '\')',
- 'class' => 'add'
- ))
- );
+ $this->addChild('duplicate_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Duplicate'),
+ 'onclick' => 'setLocation(\'' . $this->getDuplicateUrl() . '\')',
+ 'class' => 'add'
+ ));
}
}
@@ -271,4 +255,24 @@ public function getSelectedTabId()
{
return addslashes(htmlspecialchars($this->getRequest()->getParam('tab')));
}
+
+ /**
+ * Get fields masks from config
+ *
+ * @return array
+ */
+ public function getFieldsAutogenerationMasks()
+ {
+ return $this->helper('Mage_Catalog_Helper_Product')->getFieldsAutogenerationMasks();
+ }
+
+ /**
+ * Retrieve available placeholders
+ *
+ * @return array
+ */
+ public function getAttributesAllowedForAutogeneration()
+ {
+ return $this->helper('Mage_Catalog_Helper_Product')->getAttributesAllowedForAutogeneration();
+ }
}
View
37 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php
@@ -37,31 +37,22 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute extends Mage_Ad
protected function _prepareLayout()
{
- $this->setChild('back_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'),
- 'onclick' => 'setLocation(\''.$this->getUrl('*/catalog_product/', array('store'=>$this->getRequest()->getParam('store', 0))).'\')',
- 'class' => 'back'
- ))
- );
+ $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'),
+ 'onclick' => 'setLocation(\''.$this->getUrl('*/catalog_product/', array('store'=>$this->getRequest()->getParam('store', 0))).'\')',
+ 'class' => 'back'
+ ));
- $this->setChild('reset_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
- 'onclick' => 'setLocation(\''.$this->getUrl('*/*/*', array('_current'=>true)).'\')'
- ))
- );
+ $this->addChild('reset_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
+ 'onclick' => 'setLocation(\''.$this->getUrl('*/*/*', array('_current'=>true)).'\')'
+ ));
- $this->setChild('save_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save'),
- 'onclick' => 'attributesForm.submit()',
- 'class' => 'save'
- ))
- );
+ $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save'),
+ 'onclick' => 'attributesForm.submit()',
+ 'class' => 'save'
+ ));
}
/**
View
30 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php
@@ -43,27 +43,19 @@ public function __construct()
protected function _prepareLayout()
{
- $this->setChild('add_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New Option'),
- 'class' => 'add',
- 'id' => 'add_new_defined_option'
- ))
- );
+ $this->addChild('add_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New Option'),
+ 'class' => 'add',
+ 'id' => 'add_new_defined_option'
+ ));
- $this->setChild('options_box',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option')
- );
+ $this->addChild('options_box', 'Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option');
- $this->setChild('import_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Import Options'),
- 'class' => 'add',
- 'id' => 'import_new_defined_option'
- ))
- );
+ $this->addChild('import_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Import Options'),
+ 'class' => 'add',
+ 'id' => 'import_new_defined_option'
+ ));
return parent::_prepareLayout();
}
View
18 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php
@@ -120,21 +120,17 @@ public function isReadonly()
protected function _prepareLayout()
{
- $this->setChild('delete_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Option'),
- 'class' => 'delete delete-product-option '
- ))
- );
+ $this->addChild('delete_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Option'),
+ 'class' => 'delete delete-product-option '
+ ));
$path = 'global/catalog/product/options/custom/groups';
foreach (Mage::getConfig()->getNode($path)->children() as $group) {
- $this->setChild($group->getName() . '_option_type',
- $this->getLayout()->createBlock(
- (string) Mage::getConfig()->getNode($path . '/' . $group->getName() . '/render')
- )
+ $this->addChild(
+ $group->getName() . '_option_type',
+ (string) Mage::getConfig()->getNode($path . '/' . $group->getName() . '/render')
);
}
View
26 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php
@@ -48,23 +48,17 @@ public function __construct()
protected function _prepareLayout()
{
- $this->setChild('add_select_row_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New Row'),
- 'class' => 'add add-select-row',
- 'id' => 'add_select_row_button_{{option_id}}'
- ))
- );
+ $this->addChild('add_select_row_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add New Row'),
+ 'class' => 'add add-select-row',
+ 'id' => 'add_select_row_button_{{option_id}}'
+ ));
- $this->setChild('delete_select_row_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Row'),
- 'class' => 'delete delete-select-row icon-btn',
- 'id' => 'delete_select_row_button'
- ))
- );
+ $this->addChild('delete_select_row_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete Row'),
+ 'class' => 'delete delete-select-row icon-btn',
+ 'id' => 'delete_select_row_button'
+ ));
return parent::_prepareLayout();
}
View
2  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php
@@ -190,7 +190,7 @@ public function getWebsiteCount()
*/
public function isMultiWebsites()
{
- return !Mage::app()->hasSingleStore();
+ return !Mage::app()->isSingleStoreMode();
}
/**
View
90 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php
@@ -1,90 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Create product settings tab
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Settings extends Mage_Adminhtml_Block_Widget_Form
-{
- protected function _prepareLayout()
- {
- $this->setChild('continue_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Continue'),
- 'onclick' => "setSettings('".$this->getContinueUrl()."','attribute_set_id','product_type')",
- 'class' => 'save'
- ))
- );
- return parent::_prepareLayout();
- }
-
- protected function _prepareForm()
- {
- $form = new Varien_Data_Form();
- $fieldset = $form->addFieldset('settings', array('legend'=>Mage::helper('Mage_Catalog_Helper_Data')->__('Create Product Settings')));
-
- $entityType = Mage::registry('product')->getResource()->getEntityType();
-
- $fieldset->addField('attribute_set_id', 'select', array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Attribute Set'),
- 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Attribute Set'),
- 'name' => 'set',
- 'value' => $entityType->getDefaultAttributeSetId(),
- 'values'=> Mage::getResourceModel('Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection')
- ->setEntityTypeFilter($entityType->getId())
- ->load()
- ->toOptionArray()
- ));
-
- $fieldset->addField('product_type', 'select', array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Product Type'),
- 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Product Type'),
- 'name' => 'type',
- 'value' => '',
- 'values'=> Mage::getModel('Mage_Catalog_Model_Product_Type')->getOptionArray()
- ));
-
- $fieldset->addField('continue_button', 'note', array(
- 'text' => $this->getChildHtml('continue_button'),
- ));
-
- $this->setForm($form);
- }
-
- public function getContinueUrl()
- {
- return $this->getUrl('*/*/new', array(
- '_current' => true,
- 'set' => '{{attribute_set}}',
- 'type' => '{{type}}'
- ));
- }
-}
View
26 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php
@@ -102,14 +102,11 @@ protected function _prepareLayout()
'admin.product.edit.tab.super.config.grid')
);
- $this->setChild('create_empty',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Create Empty'),
- 'class' => 'add',
- 'onclick' => 'superProduct.createEmptyProduct()'
- ))
- );
+ $this->addChild('create_empty', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Create Empty'),
+ 'class' => 'add',
+ 'onclick' => 'superProduct.createEmptyProduct()'
+ ));
if ($this->_getProduct()->getId()) {
$this->setChild('simple',
@@ -117,14 +114,11 @@ protected function _prepareLayout()
'catalog.product.edit.tab.super.config.simple')
);
- $this->setChild('create_from_configurable',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Copy From Configurable'),
- 'class' => 'add',
- 'onclick' => 'superProduct.createNewProduct()'
- ))
- );
+ $this->addChild('create_from_configurable', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Copy From Configurable'),
+ 'class' => 'add',
+ 'onclick' => 'superProduct.createNewProduct()'
+ ));
}
return parent::_prepareLayout();
View
40 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php
@@ -40,15 +40,12 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Settings extends Mage_
*/
protected function _prepareLayout()
{
- $onclick = "setSuperSettings('".$this->getContinueUrl()."','attribute-checkbox', 'attributes')";
- $this->setChild('continue_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Continue'),
- 'onclick' => $onclick,
- 'class' => 'save'
- ))
- );
+ $onclick = "setSuperSettings('" . $this->getContinueUrl() . "','attribute-checkbox', 'attributes')";
+ $this->addChild('continue_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Continue'),
+ 'onclick' => $onclick,
+ 'class' => 'save'
+ ));
$backButton = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
->setData(array(
@@ -58,6 +55,17 @@ protected function _prepareLayout()
));
$this->setChild('back_button', $backButton);
+
+ $this->setChild('change_attribute_set_button',
+ $this->getLayout()->createBlock(
+ 'Mage_Adminhtml_Block_Widget_Button',
+ $this->getNameInLayout() . '-change-attribute-set'
+ )->setData(array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Change Attribute Set'),
+ 'onclick' => "jQuery('#attribute-set-info').dialog('open');"
+ ))
+ );
+
parent::_prepareLayout();
}
@@ -93,6 +101,10 @@ protected function _prepareForm()
. '</li></ul></li></ul>'
));
+ $fieldset->addField('change_attribute_set_button', 'note', array(
+ 'text' => $this->getChildHtml('change_attribute_set_button'),
+ ));
+
$hasAttributes = false;
foreach ($attributes as $attribute) {
@@ -110,10 +122,10 @@ protected function _prepareForm()
if ($hasAttributes) {
$fieldset->addField('attributes', 'hidden', array(
- 'name' => 'attribute_validate',
- 'value' => '',
- 'class' => 'validate-super-product-attributes'
- ));
+ 'name' => 'attribute_validate',
+ 'value' => '',
+ 'class' => 'validate-super-product-attributes'
+ ));
$fieldset->addField('continue_button', 'note', array(
'text' => $this->getChildHtml('continue_button'),
@@ -154,6 +166,6 @@ public function getContinueUrl()
*/
public function getBackUrl()
{
- return $this->getUrl('*/*/new', array('set'=>null, 'type'=>null));
+ return $this->getUrl('*/*/', array('set' => null, 'type' => null));
}
}
View
10 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
@@ -58,7 +58,7 @@ protected function _prepareLayout()
->load();
$tabAttributesBlock = $this->getLayout()->createBlock(
- $this->getAttributeTabBlock(), 'adminhtml.catalog.product.edit.tab.attributes'
+ $this->getAttributeTabBlock(), $this->getNameInLayout() . '_attributes_tab'
);
foreach ($groupCollection as $group) {
$attributes = $product->getAttributes($group->getId(), true);
@@ -170,14 +170,6 @@ protected function _prepareLayout()
}
}
- else {
- $this->addTab('set', array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Settings'),
- 'content' => $this->_translateHtml($this->getLayout()
- ->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Settings')->toHtml()),
- 'active' => true
- ));
- }
return parent::_prepareLayout();
}
View
4 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php
@@ -43,9 +43,7 @@ public function __construct()
protected function _prepareLayout()
{
- $this->setChild('uploader',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Media_Uploader')
- );
+ $this->addChild('uploader', 'Mage_Adminhtml_Block_Media_Uploader');
$this->getUploader()->getConfig()
->setUrl(Mage::getModel('Mage_Adminhtml_Model_Url')->addSessionParam()->getUrl('*/catalog_product_gallery/upload'))
View
2  app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php
@@ -86,7 +86,7 @@ protected function _prepareForm()
'required' => true,
));
- if (!Mage::app()->hasSingleStore()) {
+ if (!Mage::app()->isSingleStoreMode()) {
$field = $fieldset->addField('store_id', 'select', array(
'name' => 'store_id',
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Store'),
View
2  app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php
@@ -98,7 +98,7 @@ protected function _prepareForm()
),
));
- if (!Mage::app()->hasSingleStore()) {
+ if (!Mage::app()->isSingleStoreMode()) {
$field = $fieldset->addField('store_id', 'multiselect', array(
'name' => 'stores[]',
'label' => Mage::helper('Mage_Checkout_Helper_Data')->__('Store View'),
View
59 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php
@@ -46,40 +46,31 @@ public function getRegionsUrl()
protected function _prepareLayout()
{
- $this->setChild('delete_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Delete Address'),
- 'name' => 'delete_address',
- 'element_name' => 'delete_address',
- 'disabled' => $this->isReadonly(),
- 'class' => 'delete' . ($this->isReadonly() ? ' disabled' : '')
- ))
- );
- $this->setChild('add_address_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Add New Address'),
- 'id' => 'add_address_button',
- 'name' => 'add_address_button',
- 'element_name' => 'add_address_button',
- 'disabled' => $this->isReadonly(),
- 'class' => 'add' . ($this->isReadonly() ? ' disabled' : ''),
- 'onclick'=> 'customerAddresses.addNewAddress()'
- ))
- );
- $this->setChild('cancel_button',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
- ->setData(array(
- 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Cancel'),
- 'id' => 'cancel_add_address'.$this->getTemplatePrefix(),
- 'name' => 'cancel_address',
- 'element_name' => 'cancel_address',
- 'class' => 'cancel delete-address' . ($this->isReadonly() ? ' disabled' : ''),
- 'disabled' => $this->isReadonly(),
- 'onclick'=> 'customerAddresses.cancelAdd(this)',
- ))
- );
+ $this->addChild('delete_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Delete Address'),
+ 'name' => 'delete_address',
+ 'element_name' => 'delete_address',
+ 'disabled' => $this->isReadonly(),
+ 'class' => 'delete' . ($this->isReadonly() ? ' disabled' : '')
+ ));
+ $this->addChild('add_address_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Add New Address'),
+ 'id' => 'add_address_button',
+ 'name' => 'add_address_button',
+ 'element_name' => 'add_address_button',
+ 'disabled' => $this->isReadonly(),
+ 'class' => 'add' . ($this->isReadonly() ? ' disabled' : ''),
+ 'onclick'=> 'customerAddresses.addNewAddress()'
+ ));
+ $this->addChild('cancel_button', 'Mage_Adminhtml_Block_Widget_Button', array(
+ 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Cancel'),
+ 'id' => 'cancel_add_address'.$this->getTemplatePrefix(),
+ 'name' => 'cancel_address',
+ 'element_name' => 'cancel_address',
+ 'class' => 'cancel delete-address' . ($this->isReadonly() ? ' disabled' : ''),
+ 'disabled' => $this->isReadonly(),
+ 'onclick'=> 'customerAddresses.cancelAdd(this)',
+ ));
return parent::_prepareLayout();
}