2013-08-09 2 views
1

Magento에서 고객에 대한 사용자 정의 속성을 만들었습니다.사용자 정의 고객 속성을 magento로 삭제

실수로 내 속성에 잘못된 유형이 설정되었습니다.

이제이 속성을 수정하거나이 속성을 삭제 한 다음 새 속성을 만들고 싶습니다.

Magno에서 사용자 지정 특성을 삭제하거나 수정할 수 있는지 여부를 알려줄 수 있습니까?

미리 감사드립니다.

당신이 콘텐츠와 모듈 중 하나에서 업그레이드 스크립트를 만들 수 있습니다

답변

8

:

$this->updateAttribute('customer', 'attribute_code_here', 'type', 'varchar'); //or any other type 

는 기본적으로이 같은 & 제품 고객 범주에서 모든 속성을 변경할 수 있습니다;

$entityType = 'customer';//or catalog_category or catalog_product 
$attributeCode = 'attribute_code_here'; 
$changeWhat = 'field_name_here'; 
$changeInto = 'new value here'; 
$this->updateAttribute($entityType, $attributeCode, $changeWhat, $changeInto); 

는 속성이 실행 제거하려면 다음

$this->removeAttribute('customer', 'attribute_code_here'); 

는 위와 같은 규칙을 따른다.

+0

속성을 삭제하는 방법도 있습니다. 사실 나는 하나의 속성도 에 대한 레이블을 변경해야합니다. –

+0

죄송합니다. 죄송합니다. 나는 대답을 업데이트했습니다 – Marius

+0

@ 마리우스가이 질문에 대답 해주십시오. http://stackoverflow.com/questions/20634111/magento-error-when-disable-module –

관련 문제