Name Switcher

Manufacturer: OANDER

A Magento alapértelmezetten úgy jeleníti meg a vezetékneveket és a keresztneveket, hogy angolszász rendszer szerint előre teszi a keresztnevet (First Name) és mögé a vezetéknevet (Last name). A modul segítségével website scope-onként beállítható, hogy a vezetéknév vagy a keresztév jelenjen-e meg elöl.

Magyar nyelvű technikai leírás:

A modul üzleti célja

A Magento alapértelmezetten úgy jeleníti meg a vezetékneveket és a keresztneveket, hogy angolszász rendszer szerint előre teszi a keresztnevet (First Name) és mögé a vezetéknevet (Last name). Viszont számos országban, így Magyarországon is, ez felcserélve jelenik meg. Ennek a modulnak a segítségével a nevet alkotó egyes mezők sorrendje website scope-onként változtatható. Vagyis, ha van egy M2 webshop, amin belül van egy angol és egy magyar website scope, akkor be lehet állítani például, hogy az angol oldalon a keresztnév szerepeljen elől, a magyaron viszont a vezetéknév.

Admin funkció

A modul egy admin konfigurációs felülettel rendelkezik, amin beállíthatjuk, hogy az adott website scope-ban melyik beállítás érvényesüljön. A megfelelő beállítással a modul átsorrendezi minden szükséges helyen ezeket a mezőket. A beállítás a legtöbb helyen cache ürítés nélkül azonnal kifrissíti a mező változtatását.

Hol eredményez a modul változást?

A Magento 2-ben a következő helyeken van használva a vezetéknév / keresztnév mező, egyúttal a helyek, ahol a névcsere probléma fennáll, és ahol a modul megváltoztatja ezek sorrendjét:

  • Címlap/Hírlevél feliratkozás
  • Regisztráció
  • Hírlevél feliratkozás
  • Bejelentkezett felhasználó: Fiók/Fiókinformáció
  • Bejelentkezett felhasználó: Fiók/Címjegyzék
  • Bejelentkezett felhasználó: Pénztár/ Szállítási és számlázási cím
  • Vendég vásárló: Pénztár/Szállítási és számlázási cím

A modul tehát ezeken a layout-okon és szekciókban, az adminban kiválasztott beállítás alapján sorrendezi a keresztnév és vezetéknév megjelenését.

English description:

In English-speaking cultures surname comes second in a person’s full name, therefore surname is commonly referred to as a last name. Magento’s base logic in sorting the names follows this majority logic. In several pages (like registration, profile, checkout, email templates, third party extensions) the order of input fields for the given name and surname is based the English-speaking world.

However, in several countries around the world (mainly Asia, Africa and some European countries) the family name is placed before a person's given name.

Switching the appearance order of the last name / first name in these countries so far was usually achieved in Magento by reordering them in the template (aither the html or with JS manipulation) which is a kind of “hacking” procedure. It had to be done manually by frontend developers and could result some errors.

Our extension solves this issue as a backend solution. After installation the “Name Switcher” extension it allows the administrator to specify the first name / last name ordering in every store views. So in admin panel we can choose if we wish to switch the original appearance order to make family name appear first and given name as second. It is actually a very simple switching button and can be set up differently for store views. When name switching is activated in a given store view it changes the order of first / last name all across the board, like:

  • Registration form
  • Profile section
  • Cart
  • E-mail templates
  • And all frontend sections where the user’s full name is generated

The extension has been tested and currently used in more than a dozen Hungarian Magento 2 webshops.

Benefit: Solves an old problem that developers are facing in all countries where first name and second name appearance order is switched. Supports multistore functionality and reduces the need to “hack” in the template layer.