Mage_Catalog_Model_Resource_Eav_Mysql4_Setup Class Reference

Inheritance diagram for Mage_Catalog_Model_Resource_Eav_Mysql4_Setup:

Mage_Eav_Model_Entity_Setup Mage_Core_Model_Resource_Setup

List of all members.

Public Member Functions

 getDefaultEntities ()
 convertOldTreeToNew ()
 rebuildCategoryLevels ()

Protected Member Functions

 _getCategoryEntityRow ($id)
 _getCategoryPath ($category, $path=array())


Detailed Description

Definition at line 35 of file Setup.php.


Member Function Documentation

_getCategoryEntityRow ( id  )  [protected]

Enter description here...

Parameters:
int $id
Returns:
array

Definition at line 1358 of file Setup.php.

01359     {
01360         $select = $this->getConnection()->select();
01361 
01362         $select->from($this->getTable('catalog/category'));
01363         $select->where('entity_id = ?', $id);
01364 
01365         return $this->getConnection()->fetchRow($select);
01366     }

_getCategoryPath ( category,
path = array() 
) [protected]

Enter description here...

Parameters:
array $category
array $path
Returns:
string

Definition at line 1375 of file Setup.php.

01376     {
01377         $path[] = $category['entity_id'];
01378 
01379         if ($category['parent_id'] != 0) {
01380             $parentCategory = $this->_getCategoryEntityRow($category['parent_id']);
01381 
01382             if ($parentCategory)
01383                 $path = $this->_getCategoryPath($parentCategory, $path);
01384         }
01385 
01386         return $path;
01387     }

convertOldTreeToNew (  ) 

Enter description here...

Returns:
Mage_Catalog_Model_Resource_Eav_Mysql4_Setup

Definition at line 1319 of file Setup.php.

01320     {
01321         if (!Mage::getModel('catalog/category')->load(1)->getId()) {
01322             Mage::getModel('catalog/category')->setId(1)->setPath(1)->save();
01323         }
01324 
01325         $categories = array();
01326 
01327         $select = $this->getConnection()->select();
01328         $select->from($this->getTable('catalog/category'));
01329         $categories = $this->getConnection()->fetchAll($select);
01330 
01331         if (is_array($categories)) {
01332             foreach ($categories as $category) {
01333                 $path = $this->_getCategoryPath($category);
01334                 $path = array_reverse($path);
01335                 $path = implode('/', $path);
01336                 if ($category['entity_id'] != 1 && substr($path, 0, 2) != '1/') {
01337                     $path = "1/{$path}";
01338                 }
01339 
01340                 $this
01341                     ->getConnection()
01342                     ->update(
01343                         $this->getTable('catalog/category'),
01344                         array('path' => $path),
01345                         "entity_id = {$category['entity_id']}"
01346                     );
01347             }
01348         }
01349         return $this;
01350     }

getDefaultEntities (  ) 

Enter description here...

Returns:
array

Definition at line 43 of file Setup.php.

00044     {
00045         return array(
00046             'catalog_category' => array(
00047                 'entity_model'      => 'catalog/category',
00048                 'attribute_model'   => 'catalog/resource_eav_attribute',
00049                 'table'             => 'catalog/category',
00050                 'attributes'        => array(
00051                     'name' => array(
00052                         'type'              => 'varchar',
00053                         'backend'           => '',
00054                         'frontend'          => '',
00055                         'label'             => 'Name',
00056                         'input'             => 'text',
00057                         'class'             => '',
00058                         'source'            => '',
00059                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00060                         'visible'           => true,
00061                         'required'          => true,
00062                         'user_defined'      => false,
00063                         'default'           => '',
00064                         'searchable'        => false,
00065                         'filterable'        => false,
00066                         'comparable'        => false,
00067                         'visible_on_front'  => false,
00068                         'unique'            => false,
00069                     ),
00070                     'is_active' => array(
00071                         'type'              => 'int',
00072                         'backend'           => '',
00073                         'frontend'          => '',
00074                         'label'             => 'Is Active',
00075                         'input'             => 'select',
00076                         'class'             => '',
00077                         'source'            => 'eav/entity_attribute_source_boolean',
00078                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00079                         'visible'           => true,
00080                         'required'          => false,
00081                         'user_defined'      => false,
00082                         'default'           => '',
00083                         'searchable'        => false,
00084                         'filterable'        => false,
00085                         'comparable'        => false,
00086                         'visible_on_front'  => false,
00087                         'unique'            => false,
00088                     ),
00089                     'url_key' => array(
00090                         'label'             => 'URL key',
00091                         'backend'           => 'catalog/category_attribute_backend_urlkey',
00092                         'required'          => false,
00093                     ),
00094                     'description' => array(
00095                         'type'              => 'text',
00096                         'backend'           => '',
00097                         'frontend'          => '',
00098                         'label'             => 'Description',
00099                         'input'             => 'textarea',
00100                         'class'             => '',
00101                         'source'            => '',
00102                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00103                         'visible'           => true,
00104                         'required'          => false,
00105                         'user_defined'      => false,
00106                         'default'           => '',
00107                         'searchable'        => false,
00108                         'filterable'        => false,
00109                         'comparable'        => false,
00110                         'visible_on_front'  => false,
00111                         'unique'            => false,
00112                     ),
00113                     'image' => array(
00114                         'type'              => 'varchar',
00115                         //'backend'          => 'catalog/category_attribute_backend_image',
00116                         //'frontend'         => 'catalog/category_attribute_frontend_image',
00117                         'backend'           => 'catalog/category_attribute_backend_image',
00118                         'frontend'          => '',
00119                         'label'             => 'Image',
00120                         'input'             => 'image',
00121                         'class'             => '',
00122                         'source'            => '',
00123                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00124                         'visible'           => true,
00125                         'required'          => false,
00126                         'user_defined'      => false,
00127                         'default'           => '',
00128                         'searchable'        => false,
00129                         'filterable'        => false,
00130                         'comparable'        => false,
00131                         'visible_on_front'  => false,
00132                         'unique'            => false,
00133                     ),
00134                     'meta_title' => array(
00135                         'type'              => 'varchar',
00136                         'backend'           => '',
00137                         'frontend'          => '',
00138                         'label'             => 'Page Title',
00139                         'input'             => 'text',
00140                         'class'             => '',
00141                         'source'            => '',
00142                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00143                         'visible'           => true,
00144                         'required'          => false,
00145                         'user_defined'      => false,
00146                         'default'           => '',
00147                         'searchable'        => false,
00148                         'filterable'        => false,
00149                         'comparable'        => false,
00150                         'visible_on_front'  => false,
00151                         'unique'            => false,
00152                     ),
00153                     'meta_keywords' => array(
00154                         'type'              => 'text',
00155                         'backend'           => '',
00156                         'frontend'          => '',
00157                         'label'             => 'Meta Keywords',
00158                         'input'             => 'textarea',
00159                         'class'             => '',
00160                         'source'            => '',
00161                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00162                         'visible'           => true,
00163                         'required'          => false,
00164                         'user_defined'      => false,
00165                         'default'           => '',
00166                         'searchable'        => false,
00167                         'filterable'        => false,
00168                         'comparable'        => false,
00169                         'visible_on_front'  => false,
00170                         'unique'            => false,
00171                     ),
00172                     'meta_description' => array(
00173                         'type'              => 'text',
00174                         'backend'           => '',
00175                         'frontend'          => '',
00176                         'label'             => 'Meta Description',
00177                         'input'             => 'textarea',
00178                         'class'             => '',
00179                         'source'            => '',
00180                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00181                         'visible'           => true,
00182                         'required'          => false,
00183                         'user_defined'      => false,
00184                         'default'           => '',
00185                         'searchable'        => false,
00186                         'filterable'        => false,
00187                         'comparable'        => false,
00188                         'visible_on_front'  => false,
00189                         'unique'            => false,
00190                     ),
00191                     'display_mode' => array(
00192                         'type'              => 'varchar',
00193                         'backend'           => '',
00194                         'frontend'          => '',
00195                         'label'             => 'Display Mode',
00196                         'input'             => 'select',
00197                         'class'             => '',
00198                         'source'            => 'catalog/category_attribute_source_mode',
00199                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00200                         'visible'           => true,
00201                         'required'          => false,
00202                         'user_defined'      => false,
00203                         'default'           => '',
00204                         'searchable'        => false,
00205                         'filterable'        => false,
00206                         'comparable'        => false,
00207                         'visible_on_front'  => false,
00208                         'unique'            => false,
00209                     ),
00210                     'landing_page' => array(
00211                         'type'              => 'int',
00212                         'backend'           => '',
00213                         'frontend'          => '',
00214                         'label'             => 'CMS Block',
00215                         'input'             => 'select',
00216                         'class'             => '',
00217                         'source'            => 'catalog/category_attribute_source_page',
00218                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00219                         'visible'           => true,
00220                         'required'          => false,
00221                         'user_defined'      => false,
00222                         'default'           => '',
00223                         'searchable'        => false,
00224                         'filterable'        => false,
00225                         'comparable'        => false,
00226                         'visible_on_front'  => false,
00227                         'unique'            => false,
00228                     ),
00229                     'is_anchor' => array(
00230                         'type'              => 'int',
00231                         'backend'           => '',
00232                         'frontend'          => '',
00233                         'label'             => 'Is Anchor',
00234                         'input'             => 'select',
00235                         'class'             => '',
00236                         'source'            => 'eav/entity_attribute_source_boolean',
00237                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00238                         'visible'           => true,
00239                         'required'          => false,
00240                         'user_defined'      => false,
00241                         'default'           => '',
00242                         'searchable'        => false,
00243                         'filterable'        => false,
00244                         'comparable'        => false,
00245                         'visible_on_front'  => false,
00246                         'unique'            => false,
00247                     ),
00248 
00249                     'path' => array(
00250                         'type'              => 'static',
00251                         'backend'           => '',
00252                         'frontend'          => '',
00253                         'label'             => 'Path',
00254                         'input'             => '',
00255                         'class'             => '',
00256                         'source'            => '',
00257                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00258                         'visible'           => false,
00259                         'required'          => false,
00260                         'user_defined'      => false,
00261                         'default'           => '',
00262                         'searchable'        => false,
00263                         'filterable'        => false,
00264                         'comparable'        => false,
00265                         'visible_on_front'  => false,
00266                         'unique'            => false,
00267                     ),
00268                     'position' => array(
00269                         'type'              => 'static',
00270                         'backend'           => '',
00271                         'frontend'          => '',
00272                         'label'             => 'Position',
00273                         'input'             => '',
00274                         'class'             => '',
00275                         'source'            => '',
00276                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00277                         'visible'           => false,
00278                         'required'          => false,
00279                         'user_defined'      => false,
00280                         'default'           => '',
00281                         'searchable'        => false,
00282                         'filterable'        => false,
00283                         'comparable'        => false,
00284                         'visible_on_front'  => false,
00285                         'unique'            => false,
00286                     ),
00287                     'all_children' => array(
00288                         'type'              => 'text',
00289                         //'backend'          => 'catalog/entity_category_attribute_backend_tree_children',
00290                         'backend'           => '',
00291                         'frontend'          => '',
00292                         'label'             => '',
00293                         'input'             => '',
00294                         'class'             => '',
00295                         'source'            => '',
00296                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00297                         'visible'           => false,
00298                         'required'          => false,
00299                         'user_defined'      => false,
00300                         'default'           => '',
00301                         'searchable'        => false,
00302                         'filterable'        => false,
00303                         'comparable'        => false,
00304                         'visible_on_front'  => false,
00305                         'unique'            => false,
00306                     ),
00307                     'path_in_store' => array(
00308                         'type'              => 'text',
00309                         //'backend'           => 'catalog/entity_category_attribute_backend_tree_path',
00310                         'backend'           => '',
00311                         'frontend'          => '',
00312                         'table'             => '',
00313                         'label'             => '',
00314                         'input'             => '',
00315                         'class'             => '',
00316                         'source'            => '',
00317                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00318                         'visible'           => false,
00319                         'required'          => false,
00320                         'user_defined'      => false,
00321                         'default'           => '',
00322                         'searchable'        => false,
00323                         'filterable'        => false,
00324                         'comparable'        => false,
00325                         'visible_on_front'  => false,
00326                         'unique'            => false,
00327                     ),
00328                     'children' => array(
00329                         'type'              => 'text',
00330                         //'backend'           => 'catalog/entity_category_attribute_backend_tree_children',
00331                         'frontend'          => '',
00332                         'table'             => '',
00333                         'label'             => '',
00334                         'input'             => '',
00335                         'class'             => '',
00336                         'source'            => '',
00337                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00338                         'visible'           => false,
00339                         'required'          => false,
00340                         'user_defined'      => false,
00341                         'default'           => '',
00342                         'searchable'        => false,
00343                         'filterable'        => false,
00344                         'comparable'        => false,
00345                         'visible_on_front'  => false,
00346                         'unique'            => false,
00347                     ),
00348                     'url_path' => array(
00349                         'type'              => 'varchar',
00350                         'frontend'          => '',
00351                         'table'             => '',
00352                         'label'             => '',
00353                         'input'             => '',
00354                         'class'             => '',
00355                         'source'            => '',
00356                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00357                         'visible'           => false,
00358                         'required'          => false,
00359                         'user_defined'      => false,
00360                         'default'           => '',
00361                         'searchable'        => false,
00362                         'filterable'        => false,
00363                         'comparable'        => false,
00364                         'visible_on_front'  => false,
00365                         'unique'            => true,
00366                     ),
00367                     'custom_design'         => array(
00368                         'type'              => 'varchar',
00369                         'label'             => 'Custom Design',
00370                         'frontend'          => '',
00371                         'table'             => '',
00372                         'input'             => 'select',
00373                         'class'             => '',
00374                         'source'            => 'core/design_source_design',
00375                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00376                         'visible'           => true,
00377                         'required'          => false,
00378                         'user_defined'      => false,
00379                         'default'           => '',
00380                         'searchable'        => false,
00381                         'filterable'        => false,
00382                         'comparable'        => false,
00383                         'visible_on_front'  => false,
00384                         'unique'            => false,
00385                     ),
00386                     'custom_design_apply' => array(
00387                         'type'              => 'int',
00388                         'label'             => 'Apply To',
00389                         'frontend'          => '',
00390                         'table'             => '',
00391                         'input'             => 'select',
00392                         'class'             => '',
00393                         'source'            => 'core/design_source_apply',
00394                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00395                         'visible'           => true,
00396                         'required'          => false,
00397                         'user_defined'      => false,
00398                         'default'           => '',
00399                         'searchable'        => false,
00400                         'filterable'        => false,
00401                         'comparable'        => false,
00402                         'visible_on_front'  => false,
00403                         'unique'            => false,
00404                     ),
00405                     'custom_design_from' => array(
00406                         'type'              => 'datetime',
00407                         'label'             => 'Active From',
00408                         'frontend'          => '',
00409                         'table'             => '',
00410                         'input'             => 'date',
00411                         'class'             => '',
00412                         'source'            => '',
00413                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00414                         'visible'           => true,
00415                         'required'          => false,
00416                         'user_defined'      => false,
00417                         'default'           => '',
00418                         'searchable'        => false,
00419                         'filterable'        => false,
00420                         'comparable'        => false,
00421                         'visible_on_front'  => false,
00422                         'unique'            => false,
00423                         'backend'           => 'eav/entity_attribute_backend_datetime',
00424                     ),
00425                     'custom_design_to' => array(
00426                         'type'              => 'datetime',
00427                         'label'             => 'Active To',
00428                         'frontend'          => '',
00429                         'table'             => '',
00430                         'input'             => 'date',
00431                         'class'             => '',
00432                         'source'            => '',
00433                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00434                         'visible'           => true,
00435                         'required'          => false,
00436                         'user_defined'      => false,
00437                         'default'           => '',
00438                         'searchable'        => false,
00439                         'filterable'        => false,
00440                         'comparable'        => false,
00441                         'visible_on_front'  => false,
00442                         'unique'            => false,
00443                         'backend'           => 'eav/entity_attribute_backend_datetime',
00444                     ),
00445                     'page_layout' => array(
00446                         'type'              => 'varchar',
00447                         'backend'           => '',
00448                         'frontend'          => '',
00449                         'label'             => 'Page Layout',
00450                         'input'             => 'select',
00451                         'class'             => '',
00452                         'source'            => 'catalog/category_attribute_source_layout',
00453                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00454                         'visible'           => true,
00455                         'required'          => false,
00456                         'user_defined'      => false,
00457                         'default'           => '',
00458                         'searchable'        => false,
00459                         'filterable'        => false,
00460                         'comparable'        => false,
00461                         'visible_on_front'  => false,
00462                         'unique'            => false,
00463                     ),
00464                     'custom_layout_update' => array(
00465                         'type'              => 'text',
00466                         'label'             => 'Custom Layout Update',
00467                         'frontend'          => '',
00468                         'table'             => '',
00469                         'input'             => 'textarea',
00470                         'class'             => '',
00471                         'source'            => '',
00472                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00473                         'visible'           => true,
00474                         'required'          => false,
00475                         'user_defined'      => false,
00476                         'default'           => '',
00477                         'searchable'        => false,
00478                         'filterable'        => false,
00479                         'comparable'        => false,
00480                         'visible_on_front'  => false,
00481                         'unique'            => false,
00482                     ),
00483                     'level' => array(
00484                         'type'              => 'static',
00485                         'backend'           => '',
00486                         'frontend'          => '',
00487                         'label'             => 'Level',
00488                         'input'             => '',
00489                         'class'             => '',
00490                         'source'            => '',
00491                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00492                         'visible'           => false,
00493                         'required'          => false,
00494                         'user_defined'      => false,
00495                         'default'           => '',
00496                         'searchable'        => false,
00497                         'filterable'        => false,
00498                         'comparable'        => false,
00499                         'visible_on_front'  => false,
00500                         'unique'            => false,
00501                     ),
00502                     'children_count' => array(
00503                         'type'              => 'static',
00504                         'backend'           => '',
00505                         'frontend'          => '',
00506                         'label'             => 'Children Count',
00507                         'input'             => '',
00508                         'class'             => '',
00509                         'source'            => '',
00510                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00511                         'visible'           => false,
00512                         'required'          => false,
00513                         'user_defined'      => false,
00514                         'default'           => '',
00515                         'searchable'        => false,
00516                         'filterable'        => false,
00517                         'comparable'        => false,
00518                         'visible_on_front'  => false,
00519                         'unique'            => false,
00520                     )
00521                 ),
00522             ),
00523             'catalog_product' => array(
00524                 'entity_model'      => 'catalog/product',
00525                 'attribute_model'   => 'catalog/resource_eav_attribute',
00526                 'table'             => 'catalog/product',
00527                 'attributes'        => array(
00528                     'name' => array(
00529                         'type'              => 'varchar',
00530                         'backend'           => '',
00531                         'frontend'          => '',
00532                         'label'             => 'Name',
00533                         'input'             => 'text',
00534                         'class'             => '',
00535                         'source'            => '',
00536                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00537                         'visible'           => true,
00538                         'required'          => true,
00539                         'user_defined'      => false,
00540                         'default'           => '',
00541                         'searchable'        => true,
00542                         'filterable'        => false,
00543                         'comparable'        => false,
00544                         'visible_on_front'  => false,
00545                         'visible_in_advanced_search' => true,
00546                         'unique'            => false,
00547                     ),
00548                     'description' => array(
00549                         'type'              => 'text',
00550                         'backend'           => '',
00551                         'frontend'          => '',
00552                         'label'             => 'Description',
00553                         'input'             => 'textarea',
00554                         'class'             => '',
00555                         'source'            => '',
00556                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00557                         'visible'           => true,
00558                         'required'          => true,
00559                         'user_defined'      => false,
00560                         'default'           => '',
00561                         'searchable'        => true,
00562                         'filterable'        => false,
00563                         'comparable'        => true,
00564                         'visible_on_front'  => false,
00565                         'visible_in_advanced_search' => true,
00566                         'unique'            => false,
00567                     ),
00568                     'short_description' => array(
00569                         'type'              => 'text',
00570                         'backend'           => '',
00571                         'frontend'          => '',
00572                         'label'             => 'Short Description',
00573                         'input'             => 'textarea',
00574                         'class'             => '',
00575                         'source'            => '',
00576                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00577                         'visible'           => true,
00578                         'required'          => true,
00579                         'user_defined'      => false,
00580                         'default'           => '',
00581                         'searchable'        => true,
00582                         'filterable'        => false,
00583                         'comparable'        => true,
00584                         'visible_on_front'  => false,
00585                         'visible_in_advanced_search' => true,
00586                         'unique'            => false,
00587                     ),
00588                     'sku' => array(
00589                         'type'              => 'static',
00590                         'backend'           => '',
00591                         'frontend'          => '',
00592                         'label'             => 'SKU',
00593                         'input'             => 'text',
00594                         'class'             => '',
00595                         'source'            => '',
00596                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00597                         'visible'           => true,
00598                         'required'          => true,
00599                         'user_defined'      => false,
00600                         'default'           => '',
00601                         'searchable'        => true,
00602                         'filterable'        => false,
00603                         'comparable'        => true,
00604                         'visible_on_front'  => false,
00605                         'visible_in_advanced_search' => true,
00606                         'unique'            => true,
00607                     ),
00608                     'price' => array(
00609                         'group'             => 'Prices',
00610                         'type'              => 'decimal',
00611                         'backend'           => 'catalog/product_attribute_backend_price',
00612                         'frontend'          => '',
00613                         'label'             => 'Price',
00614                         'input'             => 'price',
00615                         'class'             => 'validate-number',
00616                         'source'            => '',
00617                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
00618                         'visible'           => true,
00619                         'required'          => true,
00620                         'user_defined'      => false,
00621                         'default'           => '',
00622                         'searchable'        => true,
00623                         'filterable'        => true,
00624                         'comparable'        => false,
00625                         'visible_on_front'  => false,
00626                         'visible_in_advanced_search' => true,
00627                         'unique'            => false,
00628                         'apply_to'          => 'simple,configurable,virtual',
00629                     ),
00630                     'special_price' => array(
00631                         'group'             => 'Prices',
00632                         'type'              => 'decimal',
00633                         'backend'           => 'catalog/product_attribute_backend_price',
00634                         'frontend'          => '',
00635                         'label'             => 'Special Price',
00636                         'input'             => 'price',
00637                         'class'             => 'validate-number',
00638                         'source'            => '',
00639                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
00640                         'visible'           => true,
00641                         'required'          => false,
00642                         'user_defined'      => false,
00643                         'default'           => '',
00644                         'searchable'        => false,
00645                         'filterable'        => false,
00646                         'comparable'        => false,
00647                         'visible_on_front'  => false,
00648                         'unique'            => false,
00649                         'apply_to'          => 'simple,configurable,virtual',
00650                     ),
00651                     'special_from_date' => array(
00652                         'group'             => 'Prices',
00653                         'type'              => 'datetime',
00654                         'backend'           => 'catalog/product_attribute_backend_startdate',
00655                         'frontend'          => '',
00656                         'label'             => 'Special Price From Date',
00657                         'input'             => 'date',
00658                         'class'             => 'validate-date',
00659                         'source'            => '',
00660                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
00661                         'visible'           => true,
00662                         'required'          => false,
00663                         'user_defined'      => false,
00664                         'default'           => '',
00665                         'searchable'        => false,
00666                         'filterable'        => false,
00667                         'comparable'        => false,
00668                         'visible_on_front'  => false,
00669                         'unique'            => false,
00670                         'apply_to'          => 'simple,configurable,virtual',
00671                     ),
00672                     'special_to_date' => array(
00673                         'group'             => 'Prices',
00674                         'type'              => 'datetime',
00675                         'backend'           => 'eav/entity_attribute_backend_datetime',
00676                         'frontend'          => '',
00677                         'label'             => 'Special Price To Date',
00678                         'input'             => 'date',
00679                         'class'             => 'validate-date',
00680                         'source'            => '',
00681                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
00682                         'visible'           => true,
00683                         'required'          => false,
00684                         'user_defined'      => false,
00685                         'default'           => '',
00686                         'searchable'        => false,
00687                         'filterable'        => false,
00688                         'comparable'        => false,
00689                         'visible_on_front'  => false,
00690                         'unique'            => false,
00691                         'apply_to'          => 'simple,configurable,virtual',
00692                     ),
00693                     'cost' => array(
00694                         'group'             => 'Prices',
00695                         'type'              => 'decimal',
00696                         'backend'           => 'catalog/product_attribute_backend_price',
00697                         'frontend'          => '',
00698                         'label'             => 'Cost',
00699                         'input'             => 'price',
00700                         'class'             => 'validate-number',
00701                         'source'            => '',
00702                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
00703                         'visible'           => true,
00704                         'required'          => false,
00705                         'user_defined'      => true,
00706                         'default'           => '',
00707                         'searchable'        => false,
00708                         'filterable'        => false,
00709                         'comparable'        => false,
00710                         'visible_on_front'  => false,
00711                         'unique'            => false,
00712                         'apply_to'          => 'simple,configurable,virtual',
00713                     ),
00714                     'weight' => array(
00715                         'type'              => 'decimal',
00716                         'backend'           => '',
00717                         'frontend'          => '',
00718                         'label'             => 'Weight',
00719                         'input'             => 'text',
00720                         'class'             => 'validate-number',
00721                         'source'            => '',
00722                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00723                         'visible'           => true,
00724                         'required'          => true,
00725                         'user_defined'      => false,
00726                         'default'           => '',
00727                         'searchable'        => false,
00728                         'filterable'        => false,
00729                         'comparable'        => false,
00730                         'visible_on_front'  => false,
00731                         'unique'            => false,
00732                         'apply_to'          => 'simple',
00733                     ),
00734                     'manufacturer' => array(
00735                         'type'              => 'int',
00736                         'backend'           => '',
00737                         'frontend'          => '',
00738                         'label'             => 'Manufacturer',
00739                         'input'             => 'select',
00740                         'class'             => '',
00741                         'source'            => '',
00742                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00743                         'visible'           => true,
00744                         'required'          => false,
00745                         'user_defined'      => true,
00746                         'default'           => '',
00747                         'searchable'        => true,
00748                         'filterable'        => true,
00749                         'comparable'        => true,
00750                         'visible_on_front'  => false,
00751                         'visible_in_advanced_search' => true,
00752                         'unique'            => false,
00753                         'apply_to'          => 'simple',
00754                     ),
00755                     'meta_title' => array(
00756                         'group'             => 'Meta Information',
00757                         'type'              => 'varchar',
00758                         'backend'           => '',
00759                         'frontend'          => '',
00760                         'label'             => 'Meta Title',
00761                         'input'             => 'text',
00762                         'class'             => '',
00763                         'source'            => '',
00764                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00765                         'visible'           => true,
00766                         'required'          => false,
00767                         'user_defined'      => false,
00768                         'default'           => '',
00769                         'searchable'        => false,
00770                         'filterable'        => false,
00771                         'comparable'        => false,
00772                         'visible_on_front'  => false,
00773                         'unique'            => false,
00774                     ),
00775                     'meta_keyword' => array(
00776                         'group'             => 'Meta Information',
00777                         'type'              => 'text',
00778                         'backend'           => '',
00779                         'frontend'          => '',
00780                         'label'             => 'Meta Keywords',
00781                         'input'             => 'textarea',
00782                         'class'             => '',
00783                         'source'            => '',
00784                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00785                         'visible'           => true,
00786                         'required'          => false,
00787                         'user_defined'      => false,
00788                         'default'           => '',
00789                         'searchable'        => false,
00790                         'filterable'        => false,
00791                         'comparable'        => false,
00792                         'visible_on_front'  => false,
00793                         'unique'            => false,
00794                     ),
00795                     'meta_description' => array(
00796                         'group'             => 'Meta Information',
00797                         'type'              => 'varchar',
00798                         'backend'           => '',
00799                         'frontend'          => '',
00800                         'label'             => 'Meta Description',
00801                         'input'             => 'textarea',
00802                         'class'             => '',
00803                         'source'            => '',
00804                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00805                         'visible'           => true,
00806                         'required'          => false,
00807                         'user_defined'      => false,
00808                         'default'           => '',
00809                         'searchable'        => false,
00810                         'filterable'        => false,
00811                         'comparable'        => false,
00812                         'visible_on_front'  => false,
00813                         'unique'            => false,
00814                         'note'              => 'Maximum 255 chars',
00815                     ),
00816                     'image' => array(
00817                         'group'             => 'Images',
00818                         'type'              => 'varchar',
00819                         //'backend'           => 'catalog/entity_product_attribute_backend_image',
00820                         'frontend'          => 'catalog/product_attribute_frontend_image',
00821                         'label'             => 'Base Image',
00822                         'input'             => 'media_image',
00823                         'class'             => '',
00824                         'source'            => '',
00825                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00826                         'visible'           => true,
00827                         'required'          => false,
00828                         'user_defined'      => false,
00829                         'default'           => '',
00830                         'searchable'        => false,
00831                         'filterable'        => false,
00832                         'comparable'        => false,
00833                         'visible_on_front'  => false,
00834                         'unique'            => false,
00835                     ),
00836                     'small_image' => array(
00837                         'group'             => 'Images',
00838                         'type'              => 'varchar',
00839                         //'backend'           => 'catalog/entity_product_attribute_backend_image',
00840                         'frontend'          => 'catalog/product_attribute_frontend_image',
00841                         'label'             => 'Small Image',
00842                         'input'             => 'media_image',
00843                         'class'             => '',
00844                         'source'            => '',
00845                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00846                         'visible'           => true,
00847                         'required'          => false,
00848                         'user_defined'      => false,
00849                         'default'           => '',
00850                         'searchable'        => false,
00851                         'filterable'        => false,
00852                         'comparable'        => false,
00853                         'visible_on_front'  => false,
00854                         'unique'            => false,
00855                     ),
00856                     'thumbnail' => array(
00857                         'group'             => 'Images',
00858                         'type'              => 'varchar',
00859                         //'backend'           => 'catalog/entity_product_attribute_backend_image',
00860                         'frontend'          => 'catalog/product_attribute_frontend_image',
00861                         'label'             => 'Thumbnail',
00862                         'input'             => 'media_image',
00863                         'class'             => '',
00864                         'source'            => '',
00865                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
00866                         'visible'           => true,
00867                         'required'          => false,
00868                         'user_defined'      => false,
00869                         'default'           => '',
00870                         'searchable'        => false,
00871                         'filterable'        => false,
00872                         'comparable'        => false,
00873                         'visible_on_front'  => false,
00874                         'unique'            => false,
00875                     ),
00876                     'media_gallery' =>  array(
00877                         'group'             => 'Images',
00878                         'label'             => 'Media Gallery',
00879                         'input'             => 'gallery',
00880                         'backend'           => 'catalog/product_attribute_backend_media',
00881                         'class'             => '',
00882                         'source'            => '',
00883                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00884                         'visible'           => true,
00885                         'required'          => true,
00886                         'user_defined'      => false,
00887                         'default'           => '',
00888                         'searchable'        => false,
00889                         'filterable'        => false,
00890                         'comparable'        => false,
00891                         'visible_on_front'  => false,
00892                         'unique'            => false,
00893                     ),
00894                     'old_id' => array(
00895                         'type'              => 'int',
00896                         'backend'           => '',
00897                         'frontend'          => '',
00898                         'label'             => '',
00899                         'input'             => '',
00900                         'class'             => '',
00901                         'source'            => '',
00902                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00903                         'visible'           => false,
00904                         'required'          => false,
00905                         'user_defined'      => false,
00906                         'default'           => '',
00907                         'searchable'        => false,
00908                         'filterable'        => false,
00909                         'comparable'        => false,
00910                         'visible_on_front'  => false,
00911                         'unique'            => false,
00912                     ),
00913                     'tier_price' => array(
00914                         'group'             => 'Prices',
00915                         'type'              => 'decimal',
00916                         'backend'           => 'catalog/product_attribute_backend_tierprice',
00917                         'label'             => 'Tier Price',
00918                         'input'             => 'text',
00919                         'class'             => '',
00920                         'source'            => '',
00921                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
00922                         'visible'           => true,
00923                         'required'          => false,
00924                         'user_defined'      => false,
00925                         'default'           => '',
00926                         'searchable'        => false,
00927                         'filterable'        => false,
00928                         'comparable'        => false,
00929                         'visible_on_front'  => false,
00930                         'unique'            => false,
00931                         'apply_to'          => 'simple,configurable,virtual',
00932                     ),
00933                     'color' => array(
00934                         'type'              => 'int',
00935                         'backend'           => '',
00936                         'frontend'          => '',
00937                         'label'             => 'Color',
00938                         'input'             => 'select',
00939                         'class'             => '',
00940                         'source'            => '',
00941                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
00942                         'visible'           => true,
00943                         'required'          => false,
00944                         'user_defined'      => true,
00945                         'default'           => '',
00946                         'searchable'        => true,
00947                         'filterable'        => true,
00948                         'comparable'        => true,
00949                         'visible_on_front'  => false,
00950                         'visible_in_advanced_search' => true,
00951                         'unique'            => false,
00952                         'apply_to'          => 'simple',
00953                     ),
00954                     'news_from_date' => array(
00955                         'type'              => 'datetime',
00956                         'group'             => 'General',
00957                         'backend'           => 'eav/entity_attribute_backend_datetime',
00958                         'frontend'          => '',
00959                         'label'             => 'Set Product as New from Date',
00960                         'input'             => 'date',
00961                         'class'             => 'validate-date',
00962                         'source'            => '',
00963                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
00964                         'visible'           => true,
00965                         'required'          => false,
00966                         'user_defined'      => false,
00967                         'default'           => '',
00968                         'searchable'        => false,
00969                         'filterable'        => false,
00970                         'comparable'        => false,
00971                         'visible_on_front'  => false,
00972                         'unique'            => false,
00973                     ),
00974                      'news_to_date' => array(
00975                         'type'              => 'datetime',
00976                         'group'             => 'General',
00977                         'backend'           => 'eav/entity_attribute_backend_datetime',
00978                         'frontend'          => '',
00979                         'label'             => 'Set Product as New to Date',
00980                         'input'             => 'date',
00981                         'class'             => 'validate-date',
00982                         'source'            => '',
00983                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
00984                         'visible'           => true,
00985                         'required'          => false,
00986                         'user_defined'      => false,
00987                         'default'           => '',
00988                         'searchable'        => false,
00989                         'filterable'        => false,
00990                         'comparable'        => false,
00991                         'visible_on_front'  => false,
00992                         'unique'            => false,
00993                     ),
00994                     'gallery' => array(
00995                         'group'             => 'Images',
00996                         'type'              => 'varchar',
00997                         //'backend'           => 'catalog/entity_product_attribute_backend_gallery',
00998                         //'table'             => 'catalog_product_entity_gallery',
00999                         'frontend'          => '',
01000                         'label'             => 'Image Gallery',
01001                         'input'             => 'gallery',
01002                         'class'             => '',
01003                         'source'            => '',
01004                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
01005                         'visible'           => true,
01006                         'required'          => false,
01007                         'user_defined'      => false,
01008                         'default'           => '',
01009                         'searchable'        => false,
01010                         'filterable'        => false,
01011                         'comparable'        => false,
01012                         'visible_on_front'  => false,
01013                         'unique'            => false,
01014                     ),
01015                     'status' => array(
01016                         'type'              => 'int',
01017                         'backend'           => '',
01018                         'frontend'          => '',
01019                         'label'             => 'Status',
01020                         'input'             => 'select',
01021                         'class'             => '',
01022                         'source'            => 'catalog/product_status',
01023                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
01024                         'visible'           => true,
01025                         'required'          => true,
01026                         'user_defined'      => false,
01027                         'default'           => '',
01028                         'searchable'        => true,
01029                         'filterable'        => false,
01030                         'comparable'        => false,
01031                         'visible_on_front'  => false,
01032                         'visible_in_advanced_search' => false,
01033                         'unique'            => false,
01034                     ),
01035                     'tax_class_id' => array(
01036                         'group'             => 'Prices',
01037                         'type'              => 'int',
01038                         'backend'           => '',
01039                         'frontend'          => '',
01040                         'label'             => 'Tax Class',
01041                         'input'             => 'select',
01042                         'class'             => '',
01043                         'source'            => 'tax/class_source_product',
01044                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
01045                         'visible'           => true,
01046                         'required'          => true,
01047                         'user_defined'      => false,
01048                         'default'           => '',
01049                         'searchable'        => true,
01050                         'filterable'        => false,
01051                         'comparable'        => false,
01052                         'visible_on_front'  => false,
01053                         'visible_in_advanced_search' => true,
01054                         'unique'            => false,
01055                         'apply_to'          => 'simple,configurable,virtual',
01056                     ),
01057 //                    'price_includes_tax' => array(
01058 //                        'group'             => 'Prices',
01059 //                        'type'              => 'int',
01060 //                        'backend'           => '',
01061 //                        'frontend'          => '',
01062 //                        'label'             => 'Price Includes Tax',
01063 //                        'input'             => 'select',
01064 //                        'class'             => '',
01065 //                        'source'            => 'tax/price_source_includes',
01066 //                        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
01067 //                        'visible'           => true,
01068 //                        'required'          => false,
01069 //                        'user_defined'      => false,
01070 //                        'default'           => '',
01071 //                        'searchable'        => true,
01072 //                        'filterable'        => false,
01073 //                        'comparable'        => false,
01074 //                        'visible_on_front'  => false,
01075 //                        'visible_in_advanced_search' => true,
01076 //                        'unique'            => false,
01077 //                    ),
01078                     'price' => array(
01079                         'group'             => 'Prices',
01080                         'type'              => 'decimal',
01081                         'backend'           => 'catalog/product_attribute_backend_price',
01082                         'frontend'          => '',
01083                         'label'             => 'Price',
01084                         'input'             => 'price',
01085                         'class'             => 'validate-number',
01086                         'source'            => '',
01087                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
01088                         'visible'           => true,
01089                         'required'          => true,
01090                         'user_defined'      => false,
01091                         'default'           => '',
01092                         'searchable'        => true,
01093                         'filterable'        => true,
01094                         'comparable'        => false,
01095                         'visible_on_front'  => false,
01096                         'visible_in_advanced_search' => true,
01097                         'unique'            => false,
01098                         'apply_to'          => 'simple,configurable',
01099                     ),
01100                     'url_key' => array(
01101                         'label'             => 'URL key',
01102                         'backend'           => 'catalog/product_attribute_backend_urlkey',
01103                         'required'          => false,
01104                     ),
01105                     'url_path' => array(
01106                         'type'              => 'varchar',
01107                         'frontend'          => '',
01108                         'table'             => '',
01109                         'label'             => '',
01110                         'input'             => '',
01111                         'class'             => '',
01112                         'source'            => '',
01113                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
01114                         'visible'           => false,
01115                         'required'          => false,
01116                         'user_defined'      => false,
01117                         'default'           => '',
01118                         'searchable'        => false,
01119                         'filterable'        => false,
01120                         'comparable'        => false,
01121                         'visible_on_front'  => false,
01122                         'unique'            => true,
01123                     ),
01124                     'minimal_price' => array(
01125                         'group'             => 'Prices',
01126                         'type'              => 'decimal',
01127                         'backend'           => '',
01128                         'frontend'          => '',
01129                         'label'             => 'Minimal Price',
01130                         'input'             => 'price',
01131                         'class'             => 'validate-number',
01132                         'source'            => '',
01133                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
01134                         'visible'           => false,
01135                         'required'          => true,
01136                         'user_defined'      => false,
01137                         'default'           => '',
01138                         'searchable'        => false,
01139                         'filterable'        => false,
01140                         'comparable'        => false,
01141                         'visible_on_front'  => false,
01142                         'unique'            => false,
01143                         'apply_to'          => 'simple,configurable',
01144                     ),
01145                     'visibility' => array(
01146                         'group'             => 'General',
01147                         'type'              => 'int',
01148                         'backend'           => '',
01149                         'frontend'          => '',
01150                         'label'             => 'Visibility',
01151                         'input'             => 'select',
01152                         'class'             => '',
01153                         'source'            => 'catalog/product_visibility',
01154                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
01155                         'visible'           => true,
01156                         'required'          => true,
01157                         'user_defined'      => false,
01158                         'default'           => '4',
01159                         'searchable'        => false,
01160                         'filterable'        => false,
01161                         'comparable'        => false,
01162                         'visible_on_front'  => false,
01163                         'visible_in_advanced_search' => false,
01164                         'unique'            => false,
01165                     ),
01166                     'custom_design' => array(
01167                         'type'              => 'varchar',
01168                         'label'             => 'Custom Design',
01169                         'frontend'          => '',
01170                         'table'             => '',
01171                         'input'             => 'select',
01172                         'class'             => '',
01173                         'source'            => 'core/design_source_design',
01174                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
01175                         'visible'           => true,
01176                         'required'          => false,
01177                         'user_defined'      => false,
01178                         'default'           => '',
01179                         'searchable'        => false,
01180                         'filterable'        => false,
01181                         'comparable'        => false,
01182                         'visible_on_front'  => false,
01183                         'unique'            => false,
01184                         'group'             => 'Design',
01185                     ),
01186                     'custom_design_from' => array(
01187                         'type'              => 'datetime',
01188                         'label'             => 'Active From',
01189                         'frontend'          => '',
01190                         'table'             => '',
01191                         'input'             => 'date',
01192                         'class'             => '',
01193                         'source'            => '',
01194                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
01195                         'visible'           => true,
01196                         'required'          => false,
01197                         'user_defined'      => false,
01198                         'default'           => '',
01199                         'searchable'        => false,
01200                         'filterable'        => false,
01201                         'comparable'        => false,
01202                         'visible_on_front'  => false,
01203                         'unique'            => false,
01204                         'backend'           => 'eav/entity_attribute_backend_datetime',
01205                         'group'             => 'Design',
01206                     ),
01207                     'custom_design_to' => array(
01208                         'type'              => 'datetime',
01209                         'label'             => 'Active To',
01210                         'frontend'          => '',
01211                         'table'             => '',
01212                         'input'             => 'date',
01213                         'class'             => '',
01214                         'source'            => '',
01215                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
01216                         'visible'           => true,
01217                         'required'          => false,
01218                         'user_defined'      => false,
01219                         'default'           => '',
01220                         'searchable'        => false,
01221                         'filterable'        => false,
01222                         'comparable'        => false,
01223                         'visible_on_front'  => false,
01224                         'unique'            => false,
01225                         'backend'           => 'eav/entity_attribute_backend_datetime',
01226                         'group'             => 'Design',
01227                     ),
01228                     'custom_layout_update' => array(
01229                         'type'              => 'text',
01230                         'label'             => 'Custom Layout Update',
01231                         'frontend'          => '',
01232                         'table'             => '',
01233                         'input'             => 'textarea',
01234                         'class'             => '',
01235                         'source'            => '',
01236                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
01237                         'visible'           => true,
01238                         'required'          => false,
01239                         'user_defined'      => false,
01240                         'default'           => '',
01241                         'searchable'        => false,
01242                         'filterable'        => false,
01243                         'comparable'        => false,
01244                         'visible_on_front'  => false,
01245                         'unique'            => false,
01246                         'group'             => 'Design',
01247                     ),
01248                     'page_layout' => array(
01249                         'type'              => 'varchar',
01250                         'backend'           => '',
01251                         'frontend'          => '',
01252                         'label'             => 'Page Layout',
01253                         'input'             => 'select',
01254                         'class'             => '',
01255                         'source'            => 'catalog/product_attribute_source_layout',
01256                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
01257                         'visible'           => true,
01258                         'required'          => false,
01259                         'user_defined'      => false,
01260                         'default'           => '',
01261                         'searchable'        => false,
01262                         'filterable'        => false,
01263                         'comparable'        => false,
01264                         'visible_on_front'  => false,
01265                         'unique'            => false,
01266                         'group'             => 'Design'
01267                     ),
01268                     'category_ids' => array(
01269                         'type'              => 'static',
01270                         'backend'           => '',
01271                         'label'             => '',
01272                         'frontend'          => '',
01273                         'table'             => '',
01274                         'input'             => '',
01275                         'class'             => '',
01276                         'source'            => '',
01277                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
01278                         'visible'           => false,
01279                         'required'          => false,
01280                         'user_defined'      => false,
01281                         'default'           => '',
01282                         'searchable'        => false,
01283                         'filterable'        => false,
01284                         'comparable'        => false,
01285                         'visible_on_front'  => false,
01286                         'unique'            => false,
01287                     ),
01288                     'options_container' => array(
01289                         'group'             => 'Design',
01290                         'type'              => 'varchar',
01291                         'backend'           => '',
01292                         'frontend'          => '',
01293                         'label'             => 'Display product options in',
01294                         'input'             => 'select',
01295                         'class'             => '',
01296                         'source'            => 'catalog/entity_product_attribute_design_options_container',
01297                         'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
01298                         'visible'           => true,
01299                         'required'          => false,
01300                         'user_defined'      => false,
01301                         'default'           => 'container2',
01302                         'searchable'        => false,
01303                         'filterable'        => false,
01304                         'comparable'        => false,
01305                         'visible_on_front'  => false,
01306                         'visible_in_advanced_search' => false,
01307                         'unique'            => false,
01308                     )
01309                 ),
01310             ),
01311         );
01312     }

rebuildCategoryLevels (  ) 

Creates level values for categories and saves them

Returns:
Mage_Catalog_Model_Resource_Eav_Mysql4_Setup

Definition at line 1394 of file Setup.php.

01395     {
01396         $select = $this->getConnection()->select()
01397             ->from($this->getTable('catalog/category'));
01398 
01399         $categories = $this->getConnection()->fetchAll($select);
01400 
01401         foreach ($categories as $category) {
01402             $level = count(explode('/', $category['path']))-1;
01403             $this
01404                 ->getConnection()
01405                 ->update(
01406                     $this->getTable('catalog/category'),
01407                     array('level' => $level),
01408                     "entity_id = {$category['entity_id']}"
01409                 );
01410         }
01411         return $this;
01412     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:45 2009 for Magento by  doxygen 1.5.8