Minishop2: german umlauts (ä, ö, ü)
When saving a new contact/customer german umlauts (ä, ü, ö) are filtered out.
Can I change this?
Is it in the class
Can I change this?
Is it in the class
msorderhandler
, function validate($key, $value)
?case 'receiver':
// Transforms string from "nikolaj - coster--Waldau jr." to "Nikolaj Coster-Waldau Jr."
$tmp = preg_replace(
array('/[^-a-zа-яёЁ\s\.]/iu', '/\s+/', '/\-+/', '/\.+/'),
array('', ' ', '-', '.'),
$value
);
$tmp = preg_split('/\s/', $tmp, -1, PREG_SPLIT_NO_EMPTY);
$tmp = array_map(array($this, 'ucfirst'), $tmp);
$value = preg_replace('/\s+/', ' ', implode(' ', $tmp));
if (empty($value)) {
$value = false;
}
break;
Thank you for your help. Комментарии: 2
Yes, you can extend this class and change any method — see russian example.
Also you can improve this validator and send PR to miniShop2 repository =)
Also you can improve this validator and send PR to miniShop2 repository =)
Fast and precise as always!
Thank you very much.
Thank you very much.
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.