Skip to content

Commit

Permalink
Import Magento Release 1.6.0.0-beta1
Browse files Browse the repository at this point in the history
Also fixing the .gitignore file to stop leaving out files
  • Loading branch information
LeeSaferite committed Jul 3, 2011
1 parent a562c7f commit 1efcc40
Show file tree
Hide file tree
Showing 493 changed files with 34,346 additions and 6,286 deletions.
13 changes: 1 addition & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

# Dynamic data that doesn't need to be in the repo
/var/*
/media/*
/app/etc/use_cache.ser
local.xml
/app/etc/local.xml
353 changes: 353 additions & 0 deletions RELEASE_NOTES.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static function getVersionInfo()
'minor' => '6',
'revision' => '0',
'patch' => '0',
'stability' => 'alpha',
'stability' => 'beta',
'number' => '1',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/Model/Codes.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
30 changes: 28 additions & 2 deletions app/code/community/Find/Feed/Model/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand All @@ -45,6 +45,13 @@ class Find_Feed_Model_Import extends Mage_Core_Model_Abstract

const XML_NODE_FIND_FEED_ATTRIBUTES = 'find_feed_attributes';

/**
* Attribute sources
*
* @var array
*/
protected $_attributeSources = array();

/**
* Cron action
*/
Expand Down Expand Up @@ -108,7 +115,11 @@ protected function _createFile()
foreach ($productCollection as $product) {
$attributesRow = array();
foreach ($attributes as $key => $value) {
$attributesRow[$key] = $product->getData($value);
if ($this->_checkAttributeSource($product, $value)) {
$attributesRow[$key] = $product->getAttributeText($value);
} else {
$attributesRow[$key] = $product->getData($value);
}
}
$file->streamWriteCsv($attributesRow, self::SEPARATOR, self::ENCLOSURE);
}
Expand All @@ -124,6 +135,21 @@ protected function _createFile()
return false;
}

/**
* Check attribute source
*
* @param Mage_Catalog_Model_Product $product
* @param string $value
* @return bool
*/
protected function _checkAttributeSource($product, $value)
{
if (!array_key_exists($value, $this->_attributeSources)) {
$this->_attributeSources[$value] = $product->getResource()->getAttribute($value)->usesSource();
}
return $this->_attributeSources[$value];
}

/**
* List import codes (attribute map) model
*
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/Model/Mysql4/Codes.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/Model/Mysql4/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/Model/Resource/Codes.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/Model/Resource/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/etc/adminhtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Find/Feed/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category
* @package _home
* @package _storage
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ protected function _prepareForm()
}
}
}
$form->addValues($values);
$form->setFieldNameSuffix('product');

Mage::dispatchEvent('adminhtml_catalog_product_edit_prepare_form', array('form'=>$form));

$form->addValues($values);
$form->setFieldNameSuffix('product');
$this->setForm($form);
}
}
Expand Down
Loading

0 comments on commit 1efcc40

Please sign in to comment.