Ejemplo n.º 1
0
 protected function _beforeApplyEditedAttributeValue($type, $config, $params, $entity, &$value)
 {
     if (Mage::app()->isSingleStoreMode()) {
         $entity->setWebsiteIds(array(Mage::app()->getStore(true)->getWebsite()->getId()));
     }
     if (isset($params['global']['url_key_create_redirect'])) {
         $entity->setData('save_rewrites_history', (bool) $params['global']['url_key_create_redirect']);
     }
     if ($config['config']['attribute']->getBackendModel() == 'catalog/product_attribute_backend_boolean') {
         $test = 1;
     }
     // As we edit only one value once, force using default value when needed
     $this->_prepareDefaultValues($config, $entity);
     return parent::_beforeApplyEditedAttributeValue($type, $config, $params, $entity, $value);
 }