Permalink
Browse files

2.0.0.0-dev32

* Improved product edit workflow:
  * Introduced Category Assignment control on "General" tab
  * Eliminated attribute preselection screen
  * Base image assignment control moved to "General" tab
  * Base inventory attributes controls displayed on "General" tab. Values of the attributes are synchronized between "General" and "Inventory" tabs
* Improved static code analysis tests to verify existence of paths specified in white/black lists
* Reduced memory usage by integration tests by automatic cleaning properties of test classes
* Added migration tool `dev/tools/migration/themes_view.php` for replacing old `{{skin}}` with new `{{view}}` placeholders
* Changed handling of exceptions, produced by non-existing view files, to not break whole page
* Removed empty locale files
* Bug fixes:
  * Page with tracking information absent, if shipping labels integration is used
  * Category is not displayed on frontend with "Use Flat Catalog Category" option enabled
  * Exception on "Coupons Usage Report" page after upgrade from Magento 1.x
  * Exception on "Most Viewed Products" page after upgrade from Magento 1.x
  * Quick search produces error, if searching for a product with an attribute that has "Use In Search Results Layered Navigation" option set to "Yes"
  * Exception on "Add/Edit Customer" page when Magento profiler with html output is enabled
  * Can't duplicate downloadable product with sample file attached
  * Product Type dropdown on "Add Product" page doesn't work in IE9
  * Various issues related to adding/editing product
  • Loading branch information...
1 parent b516bc3 commit 3916eac0679f6133359261fc1ebf907e4bf01326 @magento-team magento-team committed Nov 22, 2012
Showing with 5,026 additions and 875 deletions.
  1. +23 −0 CHANGELOG.markdown
  2. +1 −1 app/Mage.php
  3. +55 −2 app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php
  4. +4 −7 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php
  5. +2 −1 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php
  6. +0 −286 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php
  7. +13 −0 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php
  8. +12 −29 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php
  9. +0 −6 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
  10. +179 −0 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImage.php
  11. +116 −0 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Category.php
  12. +5 −15 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
  13. +10 −0 app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
  14. +14 −27 app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
  15. +17 −11 app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
  16. BIN app/code/core/Mage/Adminhtml/view/adminhtml/catalog/images/select2.png
  17. BIN app/code/core/Mage/Adminhtml/view/adminhtml/catalog/images/select2x2.png
  18. BIN app/code/core/Mage/Adminhtml/view/adminhtml/catalog/images/spinner.gif
  19. +28 −0 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/jquery.base-image-uploader.css
  20. +57 −0 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/jquery.base-image-uploader.js
  21. +585 −0 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/jquery.category-selector.css
  22. +142 −0 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/jquery.category-selector.js
  23. +10 −12 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml
  24. +0 −148 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/categories.phtml
  25. +6 −0 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml
  26. BIN app/code/core/Mage/Adminhtml/view/adminhtml/images/image-placeholder.png
  27. +1 −1 app/code/core/Mage/Backend/Block/Widget/Form.php
  28. +19 −18 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Date.php
  29. +25 −24 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
  30. +1 −1 app/code/core/Mage/Backend/view/adminhtml/widget/button/split.phtml
  31. +2 −25 app/code/core/Mage/Catalog/Model/Product.php
  32. +47 −0 app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Category.php
  33. +84 −0 app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Stock.php
  34. +1 −2 app/code/core/Mage/Catalog/Model/Resource/Product.php
  35. +55 −0 app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.17-1.6.0.0.18.php
  36. +54 −0 app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.18-1.6.0.0.19.php
  37. +4 −1 app/code/core/Mage/Catalog/etc/config.xml
  38. +48 −0 app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.17-1.6.0.0.18.php
  39. +213 −0 app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
  40. +19 −0 app/code/core/Mage/CatalogInventory/Model/Stock/Status.php
  41. +3 −3 app/code/core/Mage/CatalogSearch/Block/Layer/Filter/Attribute.php
  42. +11 −9 app/code/core/Mage/Cms/Helper/Page.php
  43. +23 −8 app/code/core/Mage/Core/Block/Abstract.php
  44. +45 −49 app/code/core/Mage/Core/Controller/Varien/Action.php
  45. +0 −2 app/code/core/Mage/Core/Model/Layout.php
  46. +6 −4 app/code/core/Mage/Core/Model/Resource/Session.php
  47. +11 −1 app/code/core/Mage/Core/controllers/IndexController.php
  48. +52 −16 app/code/core/Mage/Downloadable/Model/Observer.php
  49. +1 −1 app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php
  50. +81 −0 app/code/core/Mage/Index/Model/Lock/Storage.php
  51. +47 −45 app/code/core/Mage/Index/Model/Process.php
  52. +101 −0 app/code/core/Mage/Index/Model/Process/File.php
  53. +58 −0 app/code/core/Mage/Index/Model/Process/FileFactory.php
  54. +54 −9 app/code/core/Mage/Page/Block/Html/Head.php
  55. +3 −3 app/code/core/Mage/Reports/Model/Resource/Report/Product/Viewed.php
  56. +2 −2 app/code/core/Mage/Reports/etc/config.xml
  57. +46 −0 app/code/core/Mage/Reports/sql/reports_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php
  58. +38 −8 app/code/core/Mage/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php
  59. +10 −0 app/code/core/Mage/Sales/Model/Order/Shipment/Track.php
  60. +1 −1 app/code/core/Mage/SalesRule/Model/Resource/Report/Rule.php
  61. +0 −9 app/code/core/Mage/Theme/etc/config.xml
  62. 0 app/code/core/Mage/Theme/locale/de_DE/Mage_Theme.csv
  63. 0 app/code/core/Mage/Theme/locale/en_US/Mage_Theme.csv
  64. 0 app/code/core/Mage/Theme/locale/es_ES/Mage_Theme.csv
  65. 0 app/code/core/Mage/Theme/locale/fr_FR/Mage_Theme.csv
  66. 0 app/code/core/Mage/Theme/locale/nl_NL/Mage_Theme.csv
  67. 0 app/code/core/Mage/Theme/locale/pt_BR/Mage_Theme.csv
  68. 0 app/code/core/Mage/Theme/locale/zh_CN/Mage_Theme.csv
  69. +2 −0 dev/build/publication/extruder/ce.txt
  70. +55 −0 dev/tests/integration/framework/Magento/Test/ClearProperties.php
  71. +1 −1 dev/tests/integration/framework/Magento/Test/Event/PhpUnit.php
  72. +1 −0 dev/tests/integration/framework/bootstrap.php
  73. +118 −0 dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ClearPropertiesTest.php
  74. +89 −0 dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/_files/DummyTestCase.php
  75. +39 −0 dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/_files/Stub.php
  76. +18 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/ConfigTest.php
  77. +72 −0 dev/tests/integration/testsuite/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/SettingsTest.php
  78. +1 −0 dev/tests/integration/testsuite/Mage/Bundle/Model/ProductTest.php
  79. +133 −2 dev/tests/integration/testsuite/Mage/Catalog/Model/CategoryTest.php
  80. +0 −14 dev/tests/integration/testsuite/Mage/Catalog/Model/ProductExternalTest.php
  81. +1 −0 dev/tests/integration/testsuite/Mage/Catalog/Model/ProductTest.php
  82. +23 −2 dev/tests/integration/testsuite/Mage/Catalog/_files/product_special_price.php
  83. +2 −4 dev/tests/integration/testsuite/Mage/Cms/_files/pages.php
  84. +33 −2 dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php
  85. +0 −1 dev/tests/integration/testsuite/Mage/Core/Model/LayoutTest.php
  86. +19 −3 dev/tests/integration/testsuite/Mage/Core/Model/Resource/SessionTest.php
  87. +2 −2 dev/tests/integration/testsuite/Mage/Core/_files/design_change.php
  88. +36 −0 dev/tests/integration/testsuite/Mage/Core/controllers/IndexControllerTest.php
  89. +51 −0 dev/tests/integration/testsuite/Mage/Downloadable/Model/ObserverTest.php
  90. +82 −0 dev/tests/integration/testsuite/Mage/Downloadable/_files/product_with_files.php
  91. +236 −0 dev/tests/integration/testsuite/Mage/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
  92. +2 −0 .../integration/testsuite/Mage/ImportExport/Model/Import/Entity/_files/customer_composite_delete.csv
  93. +7 −0 .../integration/testsuite/Mage/ImportExport/Model/Import/Entity/_files/customer_composite_update.csv
  94. +193 −0 dev/tests/integration/testsuite/Mage/Index/Model/Process/FileTest.php
  95. +18 −0 dev/tests/integration/testsuite/Mage/Page/Block/Html/HeadTest.php
  96. +69 −0 dev/tests/integration/testsuite/Mage/Sales/Block/Adminhtml/Report/Filter/Form/CouponTest.php
  97. +7 −0 dev/tests/static/testsuite/Php/_files/whitelist/common.txt
  98. +166 −0 dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/BaseImageTest.php
  99. +4 −0 dev/tests/unit/testsuite/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/_files/BaseImageHtml.txt
  100. +0 −1 dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/EditTest.php
  101. +53 −0 dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/CategoryTest.php
  102. +84 −0 dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Attribute/Backend/StockTest.php
  103. +78 −0 dev/tests/unit/testsuite/Mage/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php
  104. +234 −0 dev/tests/unit/testsuite/Mage/Downloadable/Model/ObserverTest.php
  105. +4 −4 dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php
  106. +115 −0 dev/tests/unit/testsuite/Mage/Index/Model/Lock/StorageTest.php
  107. +61 −0 dev/tests/unit/testsuite/Mage/Index/Model/Process/FileFactoryTest.php
  108. +163 −0 dev/tests/unit/testsuite/Mage/Index/Model/ProcessTest.php
  109. +18 −1 dev/tests/unit/testsuite/Mage/Sales/Model/Order/Shipment/TrackTest.php
  110. +103 −0 dev/tests/unit/testsuite/Mage/SalesRule/Model/Resource/Report/RuleTest.php
  111. +33 −51 dev/tests/unit/testsuite/Varien/Io/FileTest.php
  112. +33 −0 dev/tools/migration/aliases_map/cms_content_tables_ce.php
  113. +122 −0 dev/tools/migration/themes_view.php
View
@@ -1,3 +1,26 @@
+2.0.0.0-dev32
+=============
+* Improved product edit workflow:
+ * Introduced Category Assignment control on "General" tab
+ * Eliminated attribute preselection screen
+ * Base image assignment control moved to "General" tab
+ * Base inventory attributes controls displayed on "General" tab. Values of the attributes are synchronized between "General" and "Inventory" tabs
+* Improved static code analysis tests to verify existence of paths specified in white/black lists
+* Reduced memory usage by integration tests by automatic cleaning properties of test classes
+* Added migration tool `dev/tools/migration/themes_view.php` for replacing old `{{skin}}` with new `{{view}}` placeholders
+* Changed handling of exceptions, produced by non-existing view files, to not break whole page
+* Removed empty locale files
+* Bug fixes:
+ * Page with tracking information absent, if shipping labels integration is used
+ * Category is not displayed on frontend with "Use Flat Catalog Category" option enabled
+ * Exception on "Coupons Usage Report" page after upgrade from Magento 1.x
+ * Exception on "Most Viewed Products" page after upgrade from Magento 1.x
+ * Quick search produces error, if searching for a product with an attribute that has "Use In Search Results Layered Navigation" option set to "Yes"
+ * Exception on "Add/Edit Customer" page when Magento profiler with html output is enabled
+ * Can't duplicate downloadable product with sample file attached
+ * Product Type dropdown on "Add Product" page doesn't work in IE9
+ * Various issues related to adding/editing product
+
2.0.0.0-dev31
=============
* Themes:
View
@@ -170,7 +170,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
- 'number' => '31',
+ 'number' => '32',
);
}
@@ -30,7 +30,7 @@
*
* @category Mage
* @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
+ * @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Adminhtml_Block_Catalog_Category_Tree extends Mage_Adminhtml_Block_Catalog_Category_Abstract
{
@@ -104,6 +104,57 @@ public function getCategoryCollection()
return $collection;
}
+ /**
+ * Retrieve list of categories with name containing $namePart and their parents
+ *
+ * @param string $namePart
+ * @return string
+ */
+ public function getSuggestedCategoriesJson($namePart)
+ {
+ $storeId = $this->getRequest()->getParam('store', $this->_getDefaultStoreId());
+
+ /* @var $collection Mage_Catalog_Model_Resource_Category_Collection */
+ $collection = Mage::getModel('Mage_Catalog_Model_Category')->getCollection();
+
+ $matchingNamesCollection = clone $collection;
+ $matchingNamesCollection->addAttributeToFilter('name', array('like' => "%{$namePart}%"))
+ ->addAttributeToSelect('path')
+ ->setStoreId($storeId);
+
+ $shownCategoriesIds = array();
+ foreach ($matchingNamesCollection as $category) {
+ foreach (explode('/', $category->getPath()) as $parentId) {
+ $shownCategoriesIds[$parentId] = 1;
+ }
+ }
+
+ $collection->addAttributeToFilter('entity_id', array('in' => array_keys($shownCategoriesIds)))
+ ->addAttributeToSelect(array('name', 'is_active', 'parent_id'))
+ ->setStoreId($storeId);
+
+ $categoryById = array(
+ Mage_Catalog_Model_Category::TREE_ROOT_ID => array(
+ 'id' => Mage_Catalog_Model_Category::TREE_ROOT_ID,
+ 'children' => array()
+ )
+ );
+ foreach ($collection as $category) {
+ foreach (array($category->getId(), $category->getParentId()) as $categoryId) {
+ if (!isset($categoryById[$categoryId])) {
+ $categoryById[$categoryId] = array('id' => $categoryId, 'children' => array());
+ }
+ }
+ $categoryById[$category->getId()]['is_active'] = $category->getIsActive();
+ $categoryById[$category->getId()]['name'] = $category->getName();
+ $categoryById[$category->getParentId()]['children'][] = &$categoryById[$category->getId()];
+ }
+
+ return Mage::helper('Mage_Core_Helper_Data')->jsonEncode(
+ $categoryById[Mage_Catalog_Model_Category::TREE_ROOT_ID]['children']
+ );
+ }
+
public function getAddRootButtonHtml()
{
return $this->getChildHtml('add_root_button');
@@ -173,7 +224,9 @@ public function getTree($parenNodeCategory=null)
public function getTreeJson($parenNodeCategory=null)
{
$rootArray = $this->_getNodeJson($this->getRoot($parenNodeCategory));
- $json = Mage::helper('Mage_Core_Helper_Data')->jsonEncode(isset($rootArray['children']) ? $rootArray['children'] : array());
+ $json = Mage::helper('Mage_Core_Helper_Data')->jsonEncode(
+ isset($rootArray['children']) ? $rootArray['children'] : array()
+ );
return $json;
}
@@ -74,15 +74,12 @@ protected function _prepareLayout()
}
if (!$this->getProduct()->isReadonly()) {
- $this->setChild('change_attribute_set_button',
- $this->getLayout()->createBlock(
- 'Mage_Adminhtml_Block_Widget_Button',
- $this->getNameInLayout() . '-change-attribute-set'
- )->setData(array(
+ if (!$this->getProduct()->isConfigurable() || !$this->getIsConfigured()) {
+ $this->addChild('change_attribute_set_button', 'Mage_Adminhtml_Block_Widget_Button', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Change Attribute Set'),
'onclick' => "jQuery('#attribute-set-info').dialog('open');"
- ))
- );
+ ));
+ }
$this->addChild('reset_button', 'Mage_Adminhtml_Block_Widget_Button', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Reset'),
@@ -45,7 +45,8 @@ protected function _construct()
protected function _prepareForm()
{
$this->setFormExcludedFieldList(array(
- 'tier_price','gallery', 'media_gallery', 'recurring_profile', 'group_price'
+ 'tier_price', 'gallery', 'media_gallery', 'recurring_profile', 'group_price',
+ 'quantity_and_stock_status'
));
Mage::dispatchEvent('adminhtml_catalog_product_form_prepare_excluded_field_list', array('object'=>$this));
Oops, something went wrong. Retry.

0 comments on commit 3916eac

Please sign in to comment.