Permalink
Browse files

Update as of 8/9/2012

* Improvements:
  * Implemented "multi-file" scheduled import/export of customers, deleted legacy implementation
  * Ability to import amendments to complex product data, such as custom options
  * Ability to cleanup database before installation using CLI script (`dev/shell/install.php`)
  * Customer export feature performance optimizations
  * Ability to control `robots.txt` via backend (System -> Config -> Design -> Search Engine Robots)
  * Ability to create custom URL rewrites for CMS-pages
* Product editing and attribute set changes:
  * Ability to copy custom options from one product to another
  * Ability to create/change attribute set during product creation/editing
  * Ability to define default values for all system attributes
  * New "Minimal" attribute set which has only required system attributes
* "Google Sitemap" feature changes:
  * The feature is renamed to "XML Sitemap"
  * Reference to a XML sitemap file will be automatically added to `robots.txt` upon update. Controlled by "System -> Config -> Design -> Search Engine Robots", enabled by default
  * Automatic switch to multiple "sitemaps" when size exceeds Google limits
  * Support of images in sitemap
* Removed "HTML Sitemap" feature as such (not the one known as "Google Sitemap")
* Fixes:
  * Map of listed products in XML sitemap will list product last modification date, rather than current date
  * Incorrect timestamp of export file
  * Addressed WSI-compliance issues in SOAP API (V2)
  * Fixed incompatibility of Downloader tool with PHP 5.3
  * Fixed inconsistent behavior of importing duplicated rows in CSV files
  * Fixed message about successful registration not appearing if customer has previously logged out on the shopping cart page
  * Fixed minor configuration issues for "Cache on Delivery Payment" method
  * Fixed wrong order status in some cases when it is placed using PayPal with "Authorization" action
  * Applied Zend framework security hotfix against XML external entity injection via XMLRPC API
  * Fixed inappropriate displaying of credit card credentials to admin user after "reorder" action with Authorize.net and PayPal payment methods involved
  • Loading branch information...
magento-team committed Aug 9, 2012
1 parent b370593 commit e0f1c29d706784384523b84aebae462c73c9b875
Showing 348 changed files with 22,423 additions and 8,225 deletions.
View
@@ -1,3 +1,35 @@
+Update as of 8/9/2012
+=====================
+* Improvements:
+ * Implemented "multi-file" scheduled import/export of customers, deleted legacy implementation
+ * Ability to import amendments to complex product data, such as custom options
+ * Ability to cleanup database before installation using CLI script (`dev/shell/install.php`)
+ * Customer export feature performance optimizations
+ * Ability to control `robots.txt` via backend (System -> Config -> Design -> Search Engine Robots)
+ * Ability to create custom URL rewrites for CMS-pages
+* Product editing and attribute set changes:
+ * Ability to copy custom options from one product to another
+ * Ability to create/change attribute set during product creation/editing
+ * Ability to define default values for all system attributes
+ * New "Minimal" attribute set which has only required system attributes
+* "Google Sitemap" feature changes:
+ * The feature is renamed to "XML Sitemap"
+ * Reference to a XML sitemap file will be automatically added to `robots.txt` upon update. Controlled by "System -> Config -> Design -> Search Engine Robots", enabled by default
+ * Automatic switch to multiple "sitemaps" when size exceeds Google limits
+ * Support of images in sitemap
+* Removed "HTML Sitemap" feature as such (not the one known as "Google Sitemap")
+* Fixes:
+ * Map of listed products in XML sitemap will list product last modification date, rather than current date
+ * Incorrect timestamp of export file
+ * Addressed WSI-compliance issues in SOAP API (V2)
+ * Fixed incompatibility of Downloader tool with PHP 5.3
+ * Fixed inconsistent behavior of importing duplicated rows in CSV files
+ * Fixed message about successful registration not appearing if customer has previously logged out on the shopping cart page
+ * Fixed minor configuration issues for "Cache on Delivery Payment" method
+ * Fixed wrong order status in some cases when it is placed using PayPal with "Authorization" action
+ * Applied Zend framework security hotfix against XML external entity injection via XMLRPC API
+ * Fixed inappropriate displaying of credit card credentials to admin user after "reorder" action with Authorize.net and PayPal payment methods involved
+
Update as of 8/2/2012
=====================
* Refactored ACL for the backend
@@ -29,12 +29,14 @@
*
* @category Mage
* @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
+ * @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
{
-
+ /**
+ * Update block controls
+ */
public function __construct()
{
$this->_objectId = 'attribute_id';
@@ -53,6 +55,16 @@ public function __construct()
'level' => -1
)
);
+ $this->_addButton(
+ 'save_in_new_set',
+ array(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save in New Attribute Set'),
+ 'class' => 'save',
+ 'onclick' => 'saveAttributeInNewSet(\''
+ . Mage::helper('Mage_Catalog_Helper_Data')->__('Enter Name for New Attribute Set')
+ . '\')',
+ )
+ );
} else {
$this->_addButton(
'save_and_edit_button',
@@ -75,6 +87,11 @@ public function __construct()
}
}
+ /**
+ * Retrieve header text
+ *
+ * @return string
+ */
public function getHeaderText()
{
if (Mage::registry('entity_attribute')->getId()) {
@@ -84,16 +101,24 @@ public function getHeaderText()
}
return Mage::helper('Mage_Catalog_Helper_Data')->__('Edit Product Attribute "%s"', $this->escapeHtml($frontendLabel));
}
- else {
- return Mage::helper('Mage_Catalog_Helper_Data')->__('New Product Attribute');
- }
+ return Mage::helper('Mage_Catalog_Helper_Data')->__('New Product Attribute');
}
+ /**
+ * Retrieve URL for validation
+ *
+ * @return string
+ */
public function getValidationUrl()
{
return $this->getUrl('*/*/validate', array('_current'=>true));
}
+ /**
+ * Retrieve URL for save
+ *
+ * @return string
+ */
public function getSaveUrl()
{
return $this->getUrl('*/'.$this->_controller.'/save', array('_current'=>true, 'back'=>null));
@@ -27,10 +27,14 @@
/**
* Product attribute add/edit form options tab
*
+ * @method Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options setReadOnly(bool $value)
+ * @method null|bool getReadOnly
+ *
* @category Mage
* @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
+ * @author Magento Core Team <core@magentocommerce.com>
*/
-class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options extends Mage_Eav_Block_Adminhtml_Attribute_Edit_Options_Abstract
+class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options
+ extends Mage_Eav_Block_Adminhtml_Attribute_Edit_Options_Abstract
{
}
@@ -29,7 +29,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_Product_Attribute_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
{
@@ -52,23 +52,12 @@ protected function _beforeToHtml()
'active' => true
));
- $model = Mage::registry('entity_attribute');
-
$this->addTab('labels', array(
'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Manage Label / Options'),
'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Manage Label / Options'),
'content' => $this->getLayout()
->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options')->toHtml(),
));
-
- /*if ('select' == $model->getFrontendInput()) {
- $this->addTab('options_section', array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Options Control'),
- 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Options Control'),
- 'content' => $this->getLayout()
- ->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options')->toHtml(),
- ));
- }*/
return parent::_beforeToHtml();
}
@@ -29,19 +29,26 @@
*
* @category Mage
* @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
+ * @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Adminhtml_Block_Catalog_Product_Attribute_New_Product_Created extends Mage_Adminhtml_Block_Widget
{
+ /**
+ * Set block template
+ */
public function __construct()
{
parent::__construct();
$this->setTemplate('catalog/product/attribute/new/created.phtml');
}
+ /**
+ * Add additional blocks to layout
+ *
+ * @return void
+ */
protected function _prepareLayout()
{
-
$this->setChild(
'attributes',
$this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_New_Product_Attributes')
@@ -56,34 +63,52 @@ protected function _prepareLayout()
'onclick' => 'addAttribute(true)'
))
);
-
}
+ /**
+ * Retrieve list of product attributes
+ *
+ * @return array
+ */
protected function _getGroupAttributes()
{
$attributes = array();
+ /** @var $product Mage_Catalog_Model_Product */
$product = Mage::registry('product');
- /* @var $product Mage_Catalog_Model_Product */
foreach($product->getAttributes($this->getRequest()->getParam('group')) as $attribute) {
- /* @var $attribute Mage_Eav_Model_Entity_Attribute */
+ /** @var $attribute Mage_Eav_Model_Entity_Attribute */
if ($attribute->getId() == $this->getRequest()->getParam('attribute')) {
$attributes[] = $attribute;
}
}
return $attributes;
}
+ /**
+ * Retrieve HTML for 'Close' button
+ *
+ * @return string
+ */
public function getCloseButtonHtml()
{
return $this->getChildHtml('close_button');
}
+ /**
+ * Retrieve attributes data as JSON
+ *
+ * @return string
+ */
public function getAttributesBlockJson()
{
$result = array(
$this->getRequest()->getParam('tab') => $this->getChildHtml('attributes')
);
+ $newAttributeSetId = $this->getRequest()->getParam('new_attribute_set_id');
+ if ($newAttributeSetId) {
+ $result['newAttributeSetId'] = $newAttributeSetId;
+ }
return Mage::helper('Mage_Core_Helper_Data')->jsonEncode($result);
}
-} // Class Mage_Adminhtml_Block_Catalog_Product_Attribute_New_Product_Created End
+}
@@ -74,6 +74,16 @@ 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(
+ 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Change Attribute Set'),
+ 'onclick' => "jQuery('#attribute-set-info').dialog('open');"
+ ))
+ );
+
$this->setChild('reset_button',
$this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')
->setData(array(
@@ -145,6 +155,16 @@ public function getSaveButtonHtml()
return $this->getChildHtml('save_button');
}
+ /**
+ * Get Change AttributeSet Button html
+ *
+ * @return string
+ */
+ public function getChangeAttributeSetButtonHtml()
+ {
+ return $this->getChildHtml('change_attribute_set_button');
+ }
+
public function getSaveAndEditButtonHtml()
{
return $this->getChildHtml('save_and_edit_button');
@@ -0,0 +1,59 @@
+<?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 attribute set selector
+ *
+ * @category Mage
+ * @package Mage_Adminhtml
+ * @author Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet extends Mage_Adminhtml_Block_Widget_Form
+{
+ protected function _prepareForm()
+ {
+ $form = new Varien_Data_Form();
+
+ $fieldset = $form->addFieldset('settings', array(
+ 'legend' => Mage::helper('Mage_Catalog_Helper_Data')->__('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' => Mage::registry('product')->getAttributeSetId(),
+ 'values'=> Mage::getResourceModel('Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection')
+ ->setEntityTypeFilter($entityType->getId())
+ ->load()
+ ->toOptionArray()
+ ));
+
+ $this->setForm($form);
+ }
+}
@@ -56,9 +56,9 @@ protected function _prepareForm()
$group = $this->getGroup();
if ($group) {
$form = new Varien_Data_Form();
-
+ $product = Mage::registry('product');
// Initialize product object as form property to use it during elements generation
- $form->setDataObject(Mage::registry('product'));
+ $form->setDataObject($product);
$fieldset = $form->addFieldset('group_fields' . $group->getId(), array(
'legend' => Mage::helper('Mage_Catalog_Helper_Data')->__($group->getAttributeGroupName()),
@@ -118,19 +118,19 @@ protected function _prepareForm()
$form->getElement('meta_description')->setOnkeyup('checkMaxLength(this, 255);');
}
- $values = Mage::registry('product')->getData();
+ $values = $product->getData();
- // Set default attribute values for new product
- if (!Mage::registry('product')->getId()) {
+ // Set default attribute values for new product or on attribute set change
+ if (!$product->getId() || $product->dataHasChangedFor('attribute_set_id')) {
foreach ($attributes as $attribute) {
if (!isset($values[$attribute->getAttributeCode()])) {
$values[$attribute->getAttributeCode()] = $attribute->getDefaultValue();
}
}
}
- if (Mage::registry('product')->hasLockedAttributes()) {
- foreach (Mage::registry('product')->getLockedAttributes() as $attribute) {
+ if ($product->hasLockedAttributes()) {
+ foreach ($product->getLockedAttributes() as $attribute) {
$element = $form->getElement($attribute);
if ($element) {
$element->setReadonly(true, true);
@@ -56,6 +56,15 @@ protected function _prepareLayout()
$this->getLayout()->createBlock('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'
+ ))
+ );
+
return parent::_prepareLayout();
}
Oops, something went wrong.

0 comments on commit e0f1c29

Please sign in to comment.