Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service for name formatting #22

Open
vkublytskyi opened this issue Jun 6, 2018 · 3 comments
Open

Service for name formatting #22

vkublytskyi opened this issue Jun 6, 2018 · 3 comments
Assignees
Labels
core Should be implemented as contribution to Magento 2 core postponed Tasks involve Magento core modification and should be done after MVP implementation Progress: dev in progress

Comments

@vkublytskyi
Copy link

vkublytskyi commented Jun 6, 2018

Magento 2 now have several places where customer full name is formatted. This lead to code duplication and completes customizations that is required to apply formats specific to locales. In the scope of this issue new API service should be introduced that will return customer full name based on customer data (last name, firstname etc.)

Service should be declared as an interface and has default implementation equal to current behavior.

@vkublytskyi vkublytskyi added the core Should be implemented as contribution to Magento 2 core label Jun 6, 2018
@HirokazuNishi
Copy link
Collaborator

These classes are calling and formatting customer's first name and last name.
(Just for name format)

  • Magento\Backend\Model\Search\Order
  • Magento\Checkout\Helper\Data
  • Magento\Customer\CustomerData\Customer
  • Magento\Customer\Helper\View
  • Magento\Customer\Model\Address\AbstractAddress
  • Magento\Customer\Model\Customer
  • Magento\Customer\Model\ResourceModel\Customer\Collection
  • Magento\Customer\view\frontend\templates\widget\name.phtml
  • Magento\NewRelicReporting\Model\Observer\ReportCurrentUsers
  • Magento\NewRelicReporting\Model\Observer\ReportCurrentUsersToNewRelic
  • Magento\Newsletter\Model\Subscriber
  • Magento\Review\Block\Adminhtml\Edit\Form
  • Magento\Reports\Model\ResourceModel\Order\Collection
  • Magento\Sales\Model\Order\Address
  • Magento\Sales\Model\Order
  • Magento\Shipping\Model\Shipping\Labels
  • Magento\Signifyd\Model\SignifydGateway\Request\CardBuilder

@bravebright bravebright self-assigned this Jun 8, 2018
@bravebright
Copy link

These are using getFirstName/getLastName and have to use name formatter.
(Added a little from Nishi's list.)

magento-backend

  • Magento\Backend\Model\Search\Order

magento-checkout

  • Magento\Checkout\Helper\Data

magento-customer

  • Magento\Customer\CustomerData\Customer
  • Magento\Customer\Helper\View
  • Magento\Customer\Model\Address\AbstractAddress
  • Magento\Customer\Model\Customer
  • Magento\Customer\Model\ResourceModel\Customer\Collection
  • Magento\Customer\view\frontend\templates\widget\name.phtml

magento-newrelicreporting

  • Magento\NewRelicReporting\Model\Observer\ReportConcurrentAdmins
  • Magento\NewRelicReporting\Model\Observer\ReportConcurrentAdminsToNewRelic
  • Magento\NewRelicReporting\Model\Observer\ReportConcurrentUsers
  • Magento\NewRelicReporting\Model\Observer\ReportConcurrentUsersToNewRelic

magento-newsletter

  • Magento\Newsletter\Model\Subscriber

magento-reports

  • Magento\Reports\Model\ResourceModel\Order\Collection

magento-review

  • Magento\Review\Block\Adminhtml\Edit\Form

magento-sales

  • Magento\Sales\Model\Order
  • Magento\Sales\Model\Order\Address

magento-shipping

  • Magento\Shipping\Model\Shipping\Labels

magento-signifyd

  • Magento\Signifyd\Model\SignifydGateway\Request\CardBuilder

magento-user

  • Magento\User\Model\User

@vkublytskyi
Copy link
Author

Additional places:

  • Magento\Directory\Model\Country
  • app/code/Magento/Customer/etc/config.xml

@vkublytskyi vkublytskyi added the postponed Tasks involve Magento core modification and should be done after MVP implementation label Nov 15, 2018
@vkublytskyi vkublytskyi added this to the Magento Core Improvements milestone Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Should be implemented as contribution to Magento 2 core postponed Tasks involve Magento core modification and should be done after MVP implementation Progress: dev in progress
Projects
None yet
Development

No branches or pull requests

3 participants