이 문제를 해결하는 방법은 두 가지가 있습니다.
- 접두사의 빌드를 제거하고 사용자 정의 접두사가있는 새 것을 추가하십시오.
- 은
Mage_Customer_Helper_Data
클래스를 오버라이드하고 getNamePrefixOptions
메서드입니다.
나는
NR 1 NR2
사용 : 당신이 tempaltes를 업데이트하기 위해 더 많은 일을해야한다. 그러나 새로운 번역을 광고해야하는 경우 고객을 관리하는 것이 더 쉽습니다.
NR2 : 구성에 접두사 값을 더 추가 할 수 있습니다. 그런 다음 수업에서 어떤 가게/언어로 사용할 스위치를 만듭니다. 새로운 언어를 추가하면 클래스에 코드를 추가해야 할 것입니다. 나는 내가 접두사 드롭 다운 옵션 설정 채워 무엇 getNamePrefixOptions
public function getNamePrefixOptions($store = null)
{
$pre_val = $this->_prepareNamePrefixSuffixOptions(
Mage::helper('customer/address')->getConfig('prefix_options', $store)
);
// Show all prefixes in the admin
if (Mage::app()->getStore()->isAdmin()) {
return $pre_val;
}
// Transform array keys to integers
$pre_val = array_values($pre_val);
$lang_code = Mage::app()->getLocale()->getDefaultLocale();
$new_prefixes_values = array();
// Add language codes here, and add their prefix key's, count starts at 0
switch ($lang_code) {
case "nl_NL":
// Set key the same as the value, that's how Magetnto gives it at first
$new_prefixes_values = array($pre_val[0] => $pre_val[0], $pre_val[1] => $pre_val[1]);
break;
case "de_DE":
$new_prefixes_values = array($pre_val[2] => $pre_val[2], $pre_val[3] => $pre_val[3]);
break;
default: // other languages
$new_prefixes_values = array($pre_val[0] => $pre_val[0], $pre_val[1] => $pre_val[1]);
break;
}
return $new_prefixes_values;
}
을 번복하는 데 사용 무엇
는 : Dhr.;Mevr.;Herr;Frau
그것은 조금 하드 코딩하지만, 작품을 그리고 당신이 값을 변경할 수 있습니다