Skip to content

Commit

Permalink
2.0.0.0-dev34
Browse files Browse the repository at this point in the history
* Test Framework:
  * Created `CodingStandard_ToolInterface` - new interface for coding standard static tests. Refactored `CodeSniffer` class as an implementation of the interface
  * Fixed DB isolation in integration tests after themes refactoring
  * Minor test fixes
* Changes in product creation process
  * Added ability to change product type "on the fly" depending on selected options
  * Added ability of new category creation on "General" tab
  * Moved "Associated Products" tab contents to collapsible block on "General" tab for configurable products
  * Visual enhancement made for base image and Virtual/Downloadable checkbox
  * Refactored implementation of associated products in backend (admin) to make them configurable through grid layout, rather than hard-coded.
  * Enhanced product variation matrix for configurable products
  * Changed "Apply To" feature in product attributes management due to changes in product creation process
* Fixed XSS vulnerabilities in `Mage_Wishlist_IndexController`, `Mage_Adminhtml_Block_Review_Edit_Form`, `Mage_Catalog_Product_CompareController`
* Bug fixes
  * Fixed error on `Catalog -> Google Content -> Manage Items page`
  * Fixed bug with "Update Attributes" mass action for products on backend caused by setting incorrect inheritance of `Mage_Adminhtml_Helper_Catalog_Product_Edit_Action_Attribute`
  * Added additional validation of "quantity" field to fix issues with inventory during product saving
  * Added additional validation into `EAV` models to forbid creation of two products with the same unique multi-select attribute
  • Loading branch information
magento-team committed Dec 7, 2012
1 parent 71f6961 commit 975952e
Show file tree
Hide file tree
Showing 155 changed files with 4,999 additions and 1,421 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.markdown
@@ -1,3 +1,24 @@
2.0.0.0-dev34
=============
* Test Framework:
* Created `CodingStandard_ToolInterface` - new interface for coding standard static tests. Refactored `CodeSniffer` class as an implementation of the interface
* Fixed DB isolation in integration tests after themes refactoring
* Minor test fixes
* Changes in product creation process
* Added ability to change product type "on the fly" depending on selected options
* Added ability of new category creation on "General" tab
* Moved "Associated Products" tab contents to collapsible block on "General" tab for configurable products
* Visual enhancement made for base image and Virtual/Downloadable checkbox
* Refactored implementation of associated products in backend (admin) to make them configurable through grid layout, rather than hard-coded.
* Enhanced product variation matrix for configurable products
* Changed "Apply To" feature in product attributes management due to changes in product creation process
* Fixed XSS vulnerabilities in `Mage_Wishlist_IndexController`, `Mage_Adminhtml_Block_Review_Edit_Form`, `Mage_Catalog_Product_CompareController`
* Bug fixes
* Fixed error on `Catalog -> Google Content -> Manage Items page`
* Fixed bug with "Update Attributes" mass action for products on backend caused by setting incorrect inheritance of `Mage_Adminhtml_Helper_Catalog_Product_Edit_Action_Attribute`
* Added additional validation of "quantity" field to fix issues with inventory during product saving
* Added additional validation into `EAV` models to forbid creation of two products with the same unique multi-select attribute

2.0.0.0-dev33
=============
* Improved Themes functionality to meet the following requirements:
Expand Down
7 changes: 4 additions & 3 deletions app/Mage.php
Expand Up @@ -153,7 +153,7 @@ public static function getVersion()
{
$i = self::getVersionInfo();
return trim("{$i['major']}.{$i['minor']}.{$i['revision']}" . ($i['patch'] != '' ? ".{$i['patch']}" : "")
. "-{$i['stability']}{$i['number']}", '.-');
. "-{$i['stability']}{$i['number']}", '.-');
}

/**
Expand All @@ -170,7 +170,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
'number' => '33',
'number' => '34',
);
}

Expand Down Expand Up @@ -280,7 +280,7 @@ public static function setRoot($appRoot = '')
}

if ('' === $appRoot) {
// automagically find application root by dirname of Mage.php
// automatically find application root by dirname of Mage.php
$appRoot = dirname(__FILE__);
}

Expand Down Expand Up @@ -896,6 +896,7 @@ public static function getIsDeveloperMode()
* Display exception
*
* @param Exception $e
* @param string $extra
*/
public static function printException(Exception $e, $extra = '')
{
Expand Down
3 changes: 3 additions & 0 deletions app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php
Expand Up @@ -34,6 +34,7 @@
*/
class Mage_Adminhtml_Block_Catalog_Category_Tree extends Mage_Adminhtml_Block_Catalog_Category_Abstract
{
const XML_PATH_SUGGESTED_CATEGORIES_LIMIT = 'global/catalog/suggested_categories/limit';

protected $_withProductCount;

Expand Down Expand Up @@ -119,7 +120,9 @@ public function getSuggestedCategoriesJson($namePart)

$matchingNamesCollection = clone $collection;
$matchingNamesCollection->addAttributeToFilter('name', array('like' => "%{$namePart}%"))
->addAttributeToFilter('entity_id', array('neq' => Mage_Catalog_Model_Category::TREE_ROOT_ID))
->addAttributeToSelect('path')
->setPageSize((string)Mage::getConfig()->getNode(self::XML_PATH_SUGGESTED_CATEGORIES_LIMIT))
->setStoreId($storeId);

$shownCategoriesIds = array();
Expand Down
Expand Up @@ -114,7 +114,8 @@ protected function _prepareForm()
'all' => Mage::helper('Mage_Catalog_Helper_Data')->__('All Product Types'),
'custom' => Mage::helper('Mage_Catalog_Helper_Data')->__('Selected Product Types')
),
'required' => true
'required' => true,
'disabled' => !$attributeObject->getIsUserDefined() && $attributeObject->getId(),
), 'frontend_class');

$fieldset->addField('is_configurable', 'select', array(
Expand Down
37 changes: 34 additions & 3 deletions app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php
Expand Up @@ -217,11 +217,9 @@ public function getDuplicateUrl()

public function getHeader()
{
$header = '';
if ($this->getProduct()->getId()) {
$header = $this->escapeHtml($this->getProduct()->getName());
}
else {
} else {
$header = Mage::helper('Mage_Catalog_Helper_Data')->__('New Product');
}
if ($setName = $this->getAttributeSetName()) {
Expand Down Expand Up @@ -277,4 +275,37 @@ public function getAttributesAllowedForAutogeneration()
{
return $this->helper('Mage_Catalog_Helper_Product')->getAttributesAllowedForAutogeneration();
}

/**
* Get data for JS (product type transition)
*
* @return string
*/
public function getTypeSwitcherData()
{
return Mage::helper('Mage_Core_Helper_Data')->jsonEncode(array(
'tab_id' => 'product_info_tabs_downloadable_items',
'is_virtual_id' => Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight_Renderer::VIRTUAL_FIELD_HTML_ID,
'weight_id' => 'weight',
'current_type' => $this->getProduct()->getTypeId(),
'attributes' => $this->_getAttributes(),
));
}

/**
* Get formed array with attribute codes and Apply To property
*
* @return array
*/
protected function _getAttributes()
{
/** @var $product Mage_Catalog_Model_Product */
$product = $this->getProduct();
$attributes = array();

foreach ($product->getAttributes() as $key => $attribute) {
$attributes[$key] = $attribute->getApplyTo();
}
return $attributes;
}
}
Expand Up @@ -31,7 +31,7 @@
* @package Mage_Adminhtml
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet extends Mage_Adminhtml_Block_Widget_Form
class Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet extends Mage_Backend_Block_Widget_Form
{
protected function _prepareForm()
{
Expand All @@ -54,6 +54,14 @@ protected function _prepareForm()
->toOptionArray()
));

$fieldset->addField(
'type_id',
'hidden',
array(
'name' => 'type_id',
'value' => Mage::registry('product')->getTypeId(),
)
);
$this->setForm($form);
}
}
@@ -0,0 +1,85 @@
<?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 X.commerce, Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/**
* New category creation form
*
* @category Mage
* @package Mage_Adminhtml
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Adminhtml_Block_Catalog_Product_Edit_NewCategory extends Mage_Backend_Block_Widget_Form
{
/**
* Form preparation
*/
protected function _prepareForm()
{
$form = new Varien_Data_Form();

$form->addField('new_category_messages', 'note', array());

$fieldset = $form->addFieldset('new_category_form', array());

$fieldset->addField('new_category_name', 'text', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Category Name'),
'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Category Name'),
'required' => true,
));

$fieldset->addField('new_category_parent', 'text', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Parent Category'),
'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Parent Category'),
'autocomplete' => 'off',
'required' => true,
'class' => 'validate-parent-category',
));

$fieldset->addField('new_category_parent_id', 'hidden', array());

$this->setForm($form);
}

/**
* Category save action URL
*
* @return string
*/
public function getSaveCategoryUrl()
{
return $this->getUrl('*/catalog_category/save');
}

/**
* Category suggestion action URL
*
* @return string
*/
public function getSuggestCategoryUrl()
{
return $this->getUrl('*/catalog_category/suggestCategories');
}
}

0 comments on commit 975952e

Please sign in to comment.