diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php index c390a873e9..639107e973 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php @@ -262,6 +262,10 @@ public function saveAction() */ $data['source_model'] = $helper->getAttributeSourceModelByInputType($data['frontend_input']); $data['backend_model'] = $helper->getAttributeBackendModelByInputType($data['frontend_input']); + + if ($model->getIsUserDefined() === null) { + $data['backend_type'] = $model->getBackendTypeByInput($data['frontend_input']); + } } if (!isset($data['is_configurable'])) { @@ -272,11 +276,7 @@ public function saveAction() } if (!isset($data['is_filterable_in_search'])) { $data['is_filterable_in_search'] = 0; - } - - if (is_null($model->getIsUserDefined()) || $model->getIsUserDefined() != 0) { - $data['backend_type'] = $model->getBackendTypeByInput($data['frontend_input']); - } + } $defaultValueField = $model->getDefaultValueByInput($data['frontend_input']); if ($defaultValueField) {