{"id":18648,"date":"2019-01-31T14:47:14","date_gmt":"2019-01-31T12:47:14","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=18648"},"modified":"2023-11-01T13:57:20","modified_gmt":"2023-11-01T11:57:20","slug":"customer-management-in-magento-2-customize-my-account-order-history-and-functionality","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html","title":{"rendered":"Magento 2 Customer Management: Customize My Account, Order History &amp; Functionality"},"content":{"rendered":"\n<p>Customer management is a rather sensitive topic for every store admin, for every mistake in even small-scale configuration can lead to complaints and loss of clients. This article is dedicated to customer management in Magento 2 ecommerce platform; here I will touch upon the following aspects:<\/p>\n<p><!--more--><\/p>\n<p><a href=\"#step_1\">How do you add a menu item to the &ldquo;My Account&rdquo; section?<br>\n<\/a><a href=\"#step_2\">How would you customize the &ldquo;Order History&rdquo; page?<br>\n<\/a><a href=\"#step_3\">How to add or modify customer attributes?<br>\n<\/a><a href=\"#step_4\">How would you extend the customer entity using the extension attributes mechanism?<br>\n<\/a><a href=\"#step_5\">How would you add another field into the customer address?<br>\n<\/a><a href=\"#step_6\">What is the role of customer groups and what functionality do they affect?<br>\n<\/a><a href=\"#step_7\">How do you customize VAT functionality?<\/a><\/p>\n<p>Magento_Customer module performs &ldquo;My Account&rdquo; management in Magento 2, so if you want to in any way modify this section (add new elements or delete existing ones or change blocks position), you will need to change the Magento_Customer module components. For this we can implement modules or our own theme. To make my examples more vivid, I will customize our own theme. In it, I will change the side menu in &ldquo;My Account&rdquo;.<\/p>\n<h2 id=\"step_1\">How do you add a menu item to the &ldquo;My Account&rdquo; section in Magento 2?<\/h2>\n<p>In order to change side menu you need to modify the <em>customer_account_navigation<\/em> block from the <em>customer_account.xml <\/em>layout-file. First, let&rsquo;s create customer_account.xml file and place in our theme at the following path <em>Magento_Customer\/layout\/<\/em>. As you write instructions for this file, you can add new menu options, change their positions and delete them. In order to add a new menu section, add into <em>customer_account.xml<\/em> file the following instruction:<\/p>\n<pre class=\"lang:default decode:true \">&lt;referenceBlock name=\"customer_account_navigation\"&gt;\r\n   &lt;block class=\"Magento\\Customer\\Block\\Account\\SortLinkInterface\" name=\"customer-account-navigation-address-link\"&gt;\r\n       &lt;arguments&gt;\r\n           &lt;argument name=\"label\" xsi:type=\"string\" translate=\"true\"&gt;My awesome menu item&lt;\/argument&gt;\r\n           &lt;argument name=\"path\" xsi:type=\"string\"&gt;path\/i\/need&lt;\/argument&gt;\r\n           &lt;argument name=\"sortOrder\" xsi:type=\"number\"&gt;100&lt;\/argument&gt;\r\n       &lt;\/arguments&gt;\r\n   &lt;\/block&gt;\r\n&lt;\/referenceBlock&gt;\r\n<\/pre>\n<p>Here we add a new block of <em>Magento\\Customer\\Block\\Account\\SortLinkInterface<\/em> type and give it as arguments menu option name, page link and <em>sortOrder<\/em> parameter if we wish that our new menu appears in a certain place. As a result, a new menu option has appeared in user account.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/my-account-magento-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-18649\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/my-account-magento-2.png\" alt=\"my account magento 2\" width=\"311\" height=\"489\" title=\"Magento 2 Customer Management: Customize My Account, Order History &amp;amp; Functionality\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>In order to delete an existing menu option, use the following instruction:<\/p>\n<pre class=\"lang:default decode:true\">&lt;referenceBlock name=\"name-of-the-link-to-remove\" remove=\"true\"\/&gt;\r\n<\/pre>\n<p>Specify the name of block you wish to delete as a parameter. This is how I delete the newsletter subscriptions link:<\/p>\n<pre class=\"lang:default decode:true \">&lt;referenceBlock name=\"customer-account-navigation-newsletter-subscriptions-link\" remove=\"true\"\/&gt;<\/pre>\n<p>Finally, if you need to change blocks order, modify the <em>sortOrder<\/em> argument value. For example, let&rsquo;s move the Wishlist link to the first position in the menu:<\/p>\n<pre class=\"lang:default decode:true \">&lt;referenceBlock name=\"customer-account-navigation-wish-list-link\"&gt;\r\n   &lt;arguments&gt;\r\n       &lt;argument name=\"sortOrder\" xsi:type=\"number\"&gt;500&lt;\/argument&gt;\r\n   &lt;\/arguments&gt;\r\n&lt;\/referenceBlock&gt;\r\n<\/pre>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-support\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2017\/07\/Magento_support.png\" width=\"120\" height=\"120\" alt=\"Magento support\" class=\"module_image\" title=\"Magento 2 Customer Management: Customize My Account, Order History &amp;amp; Functionality\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Support &amp; Maintenance<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Support &amp; Maintenance<\/p><a href=\"https:\/\/belvg.com\/magento-support\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<h2 id=\"step_2\">How would you customize the &ldquo;Order History&rdquo; page in Magento 2?<\/h2>\n<p>In order to customize the My Orders page we need to modify <em>sales_order_history.xml<\/em> layout file of <em>Magento_Sales<\/em> module. Create <em>sales_order_history.xml<\/em> file and place it in our theme in the following path: <em>Magento_Sales\/layout\/<\/em>. You can further use any instructions that provide for layout customization in Magento 2. Let&rsquo;s add a new text block before order list as an example:<\/p>\n<pre class=\"lang:default decode:true \">&lt;referenceContainer name=\"sales.order.history.info\"&gt;\r\n   &lt;block class=\"Magento\\Framework\\View\\Element\\Text\" name=\"my_text\"&gt;\r\n       &lt;arguments&gt;\r\n           &lt;argument name=\"text\" xsi:type=\"string\"&gt;Hey! I have been added to demonstrate the ability to adding the new blocks!&lt;\/argument&gt;\r\n       &lt;\/arguments&gt;\r\n   &lt;\/block&gt;\r\n&lt;\/referenceContainer&gt;\r\n<\/pre>\n<p>As a result, the following text appears at the My Orders page:<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/my-orders-magento-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-18650\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/my-orders-magento-2.png\" alt=\"my orders magento 2\" width=\"799\" height=\"243\" title=\"Magento 2 Customer Management: Customize My Account, Order History &amp;amp; Functionality\"><\/a><\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-development\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Development Services<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento development<\/p><a href=\"https:\/\/belvg.com\/magento-development\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<h2 id=\"step_3\">How to add or modify customer attributes in Magento 2?<\/h2>\n<p>For adding a new customer attribute we can use setup scripts.<\/p>\n<p>Example of adding a customer attribute:<\/p>\n<pre class=\"lang:default decode:true \">...\r\nclass InstallData implements \\Magento\\Framework\\Setup\\InstallDataInterface\r\n{\r\n    private $customerSetupFactory;\r\n    private $attributeSetFactory;\r\n    public function __construct(\r\n\\Magento\\Customer\\Setup\\CustomerSetupFactory $customerSetupFactory, \r\n\\Magento\\Eav\\Model\\Entity\\Attribute\\SetFactory $attributeSetFactory\r\n)    {\r\n        $this-&gt;customerSetupFactory = $customerSetupFactory;\r\n        $this-&gt;attributeSetFactory = $attributeSetFactory;\r\n    }\r\n\r\n    public function install(\r\n\\Magento\\Framework\\Setup\\ModuleDataSetupInterface $setup, \\Magento\\Framework\\Setup\\ModuleContextInterface $context\r\n)    {\r\n        $installer = $setup;\r\n        $installer-&gt;startSetup();\r\n        $customerSetup = $this-&gt;customerSetupFactory-&gt;create(['setup' =&gt; $setup]);\r\n  $customerSetup-&gt;addAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, 'new_attribute', [\r\n            'type' =&gt; 'varchar',\r\n            'label' =&gt; 'new attribute',\r\n            'input' =&gt; 'text',\r\n            'required' =&gt; false,\r\n            'visible' =&gt; true,\r\n            'user_defined' =&gt; true,\r\n            'system' =&gt; false,\r\n                'used_in_forms' =&gt; [\r\n                    'adminhtml_customer',\r\n                    'adminhtml_checkout',\r\n                    'checkout_register',\r\n                    'customer_account_create',\r\n                    'customer_account_edit',\r\n                ]\r\n            ]);\r\n     }\r\n...\r\n<\/pre>\n<p>Customer attributes can be represented in different forms, specified in the <em>used_in_forms<\/em> parameter. You can find the list of all forms in the <em>customer_form_attribute<\/em> table.<\/p>\n<p>To modify the attribute you should use<em> \\Magento\\Customer\\Setup\\CustomerSetupFactory<\/em>. You can also implement the <em>updateAttribute<\/em> method or upload the attribute with getAttribute method and modify it through <em>setData<\/em>.<\/p>\n<pre class=\"lang:default decode:true \">$customerSetup = $this-&gt;customerSetupFactory-&gt;create(['setup' =&gt; $setup]);\r\n\r\n$customerSetup-&gt;updateAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, 'new_attribute', 'visible', false);\r\n\r\n$customerSetup = $this-&gt;customerSetupFactory-&gt;create(['setup' =&gt; $setup]);\r\n\r\n$attribute = $customerSetup-&gt;getEavConfig()-&gt;getAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, 'new_attribute') -&gt;setData('used_in_forms', ['adminhtml_customer']);\r\n$attribute-&gt;save();<\/pre>\n<h2 id=\"step_4\">How would you extend the customer entity using the extension attributes mechanism?<\/h2>\n<p>Module developers can&rsquo;t modify API Data interfaces catalogues in core Magento 2, but the majority of modules, in their turn, have the extension attributes mechanism. Extension attributes are specified and stored separately from the data object of the initial class, therefore a developer should perform all the data storage and retrieval actions himself.<\/p>\n<p>To create an extension attribute, you need to declare it in the <em>etc\/extension_attribute.xml<\/em> file of the module:<\/p>\n<pre class=\"lang:default decode:true \">&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" \r\nxsi:noNamespaceSchemaLocation=\"urn:magento:framework:Api\/etc\/extension_attributes.xsd\"&gt; \r\n&lt;extension_attributes for=\"Magento\\Customer\\Api\\Data\\CustomerInterface\"&gt; &lt;attribute \r\ncode=\"new_attribute\" type=\"string\" \/&gt; &lt;\/extension_attributes&gt; &lt;\/config&gt;\r\n<\/pre>\n<p>To get or modify extension attributes use the plugin system for Product Repository to save, get, getList methods.<\/p>\n<p>Example of <em>extension_attributes<\/em> for Customer.<\/p>\n<p>File&nbsp;<em>etc\/extension_attributes.xml<\/em>:<\/p>\n<pre class=\"lang:default decode:true \">&lt;?xml version=\"1.0\" encoding=\"utf-8\" ?&gt;\r\n&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Api\/etc\/extension_attributes.xsd\"&gt;\r\n    &lt;extension_attributes for=\"Magento\\Customer\\Api\\Data\\CustomerInterface\"&gt;\r\n        &lt;attribute code=\"ext_customer_attribute\" type=\"string\" \/&gt;\r\n    &lt;\/extension_attributes&gt;\r\n    &lt;\/config&gt;           \r\n\r\netc\/di.xml\r\n&lt;?xml version=\"1.0\"?&gt;\r\n&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n    xsi:noNamespaceSchemaLocation=\"urn:magento:framework:ObjectManager\/etc\/config.xsd\"&gt;\r\n    &lt;type name=\"Magento\\Customer\\Api\\CustomerRepositoryInterface\"&gt;\r\n        &lt;plugin name=\"extensionAttributeExtCustomerAttribute\" type=\"Belvg\\CustomExtAttribute\\Model\\Plugin\\CustomerRepository\" \/&gt;\r\n    &lt;\/type&gt;\r\n&lt;\/config&gt;\r\n\r\nModel\/Plugin\/CustomerRepository.php\r\n\r\n&lt;?php\r\nnamespace Belvg\\CustomExtAttribute\\Model\\Plugin\\CustomerRepository;\r\n...\r\nclass CustomerRepository\r\n{\r\n&hellip;\r\n    public function afterGet(CustomerRepositoryInterface $subject, CustomerInterface $result)\r\n    {\r\n        $extensionAttributes = $this-&gt;getExtensionAttributes($result);\r\n\/\/custom logic\r\n        $extCustomerAttribute = $this-&gt;customGetExtCustomerAttribute();\r\n        $extensionAttributes-&gt;setExtCustomerAttribute($extCustomerAttribute)\r\n        return $result;\r\n    }\r\n\r\n    public function aroundSave(\r\n        CustomerRepositoryInterface $subject,\r\n        callable $proceed,\r\n        CustomerInterface $customer,\r\n        $passwordHash = null\r\n    ) {\r\n            $extCustomerAttribute = $customer-&gt;getExtensionAttributes()-&gt;getExtCustomerAttribute(); \r\n            $result = $proceed($customer, $passwordHash);\r\n\t$this-&gt;customSetExtCustomerAttribute($extCustomerAttribute);\r\n\treturn $result;\r\n}\r\n<\/pre>\n<h2 id=\"step_5\">How would you add another field into the customer address in Magento 2?<\/h2>\n<p>Magento 2 has a default attribute set for the address that is stored in the customer_address_entity table. The rest of the attributes must be added as EAV attributes. They will function through the Custom Attributes mechanism.<\/p>\n<div class=\"content_sales_info\" style=\"background-image: url(https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/03\/Sales_background.png\"><img width=\"65\" height=\"65\" src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/03\/Igor-Dragun1.png\" alt=\"Igor Dragun\" title=\"Magento 2 Customer Management: Customize My Account, Order History &amp;amp; Functionality\"><div class=\"content_part\"><h3 class=\"title\">Partner With Us <\/h3><span class=\"sales_content_text\">Let's discuss how to grow your business. Get a Free Quote.<\/span><\/div> <a class=\"call-to-action\" href=\"https:\/\/belvg.com\/contact?utm_source=blog&amp;utm_campaign=sales_block&amp;utm_content=middle\" target=\"_blank\" rel=\"noopener\">Talk to Igor<\/a><\/div>\n<p>In order to add new fields into customer address, create an EAV attribute using <em>\\Magento\\Customer\\Setup\\CustomerSetupFactory<\/em>.<\/p>\n<pre class=\"lang:default decode:true \">$customerSetup-&gt;addAttribute(\\Magento\\Customer\\Api\\AddressMetadataInterface::ENTITY_TYPE_ADDRESS, 'custom_address_attribute', [\r\n            'type' =&gt; 'varchar',\r\n            'label' =&gt; 'Custom address attribute',\r\n            'input' =&gt; 'text',\r\n            'required' =&gt; false,\r\n            'visible' =&gt; true,\r\n            'user_defined' =&gt; true,\r\n            'sort_order' =&gt; 100,\r\n            'position' =&gt; 100,\r\n            'system' =&gt; 0,\r\n        ]);\r\n\r\n        $customerEntity = $customerSetup-&gt;getEavConfig()-&gt;getEntityType(\\Magento\\Customer\\Api\\AddressMetadataInterface::ENTITY_TYPE_ADDRESS);\r\n        $attributeSetId = $customerEntity-&gt;getDefaultAttributeSetId();\r\n\r\n        $attributeSet = $this-&gt;attributeSetFactory-&gt;create();\r\n        $attributeGroupId = $attributeSet-&gt;getDefaultGroupId($attributeSetId);\r\n\r\n        $attribute = $customerSetup-&gt;getEavConfig()-&gt;getAttribute(\\Magento\\Customer\\Api\\AddressMetadataInterface::ENTITY_TYPE_ADDRESS,\r\n            'district');\r\n        $attribute-&gt;addData([\r\n                'attribute_set_id' =&gt; $attributeSetId,\r\n                'attribute_group_id' =&gt; $attributeGroupId,\r\n                'used_in_forms' =&gt;\r\n                    [\r\n                        'adminhtml_customer_address',\r\n                        'customer_address_edit',\r\n                        'customer_register_address',\r\n                    ]\r\n            ]\r\n        );\r\n\r\n        $attribute-&gt;save();\r\n<\/pre>\n<h2 id=\"step_6\">What is the role of customer groups in Magento 2 and what functionality do they affect?<\/h2>\n<p>Customer groups allow to manage taxes and discounts as well as create separate price rules and entitle with different rights. Each customer group has different cash for blocks.<\/p>\n<p>This is the default customer groups list:<\/p>\n<ol>\n<li>NOT LOGGED IN<\/li>\n<li>General<\/li>\n<li>Wholesale<\/li>\n<li>Retailer<\/li>\n<\/ol>\n<p>NOT LOGGED IN &ndash; the only customer group you can&rsquo;t delete; it is assigned to each user without a session and gives them the guest shopping cart. You also can&rsquo;t delete a default customer group for the logged in customers, but such groups are not static and you can modify it.<br>\nGeneral &ndash; default groups for the registered users. Wholesale and Retailer groups don&rsquo;t have individual properties like the groups created by user.<\/p>\n<h2 id=\"step_7\">How do you customize VAT functionality in Magento 2?<\/h2>\n<p>Magento 2 provides a default functionality for working with VAT. VAT depends on the country of the customer and their delivery address. If downloadable products are purchased, VAT depends only on the country.<\/p>\n<p>To configure VAT, go to: <em>Stores &gt; Configuration &gt; General &gt; General &gt; Store Information.<\/em><\/p>\n<p><em>VAT Number<\/em> &ndash; here you customize VAT number for a seller.<\/p>\n<p><em>Customers &gt; All Customers &gt; Edit Customer -&gt;Account Information &gt; Tax\/VAT Number<\/em> &ndash; if specified, then VAT will be calculated based on this field.<\/p>\n<p><em>Addresses &gt; VAT Number<\/em> &ndash; if selected, then VAT will take delivery address into account while calculation.<\/p>\n<p><em>Configure &gt; Customers &gt; Customer Configuration -&gt; Show VAT Number on Storefront<\/em> &ndash; allows user to specify VAT Number as he creates or modifies the account.<\/p>\n<p><em>Default Value for Disable Automatic Group Changes Based on VAT ID<\/em> &ndash; if selected, it automatically changes user group after VAT Number validation.<\/p>\n<p>The parameters you can see in the screenshot down below are responsible for selecting the group after validation, if the Default Value for Disable Automatic Group Changes Based on VAT ID parameter is active.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/default-group-magento-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-18651\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/default-group-magento-2.png\" alt=\"default group magento 2\" width=\"840\" height=\"284\" title=\"Magento 2 Customer Management: Customize My Account, Order History &amp;amp; Functionality\"><\/a><\/p>\n<p>For correct operation of VAT in Magento 2 you need to configure user groups and create TAX rules and rates.<\/p>\n<p>TAX can be applied separately to products and users with Product Tax Classes and Customer Tax Classes (<em>Stores &gt; Tax Rules<\/em>). You can also create unique tax rules for certain geographic regions, using Tax Zones and Rates (<em>Stores &gt; Tax Zones and Rates<\/em>). TAX can be influenced by <em>sales_quote_collect_totals_before<\/em> event that calculates the final price of the order.<\/p>\n<p>This is all to the topic; I hope this article was useful to you. If you have any questions or comments, you are welcome to leave them down below.<\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/ecommerce-development\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2015\/04\/ecommerce-development.png\" width=\"120\" height=\"120\" alt=\"ecommerce development\" class=\"module_image\" title=\"Magento 2 Customer Management: Customize My Account, Order History &amp;amp; Functionality\"><div class=\"module_content_part\"><h3 class=\"title\">Ecommerce Development <\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Extensions<\/p><a href=\"https:\/\/belvg.com\/ecommerce-development\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"Customer management is a rather sensitive topic for every store admin, for every mistake in &#8230;","protected":false},"author":82,"featured_media":18654,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,491,389,469,524,526],"tags":[],"class_list":["post-18648","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-magento","category-magento-2","category-magento2-development","category-magento2-tutorial","category-magento-speed-optimization","category-magento-theme","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Discover our Magento 2 Customer Management Guide and learn more about Customize My Account, Order History &amp; Functionality\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Andrey Litvin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#article\",\"name\":\"Magento 2 Customer Management Guide | BelVG Blog\",\"headline\":\"Magento 2 Customer Management: Customize My Account, Order History &amp; Functionality\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/Artboard-1-12.png\",\"width\":1108,\"height\":590,\"caption\":\"Customer Management in Magento 2: Customize My Account, Order History and Functionality\"},\"datePublished\":\"2019-01-31T14:47:14+02:00\",\"dateModified\":\"2023-11-01T13:57:20+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#webpage\"},\"articleSection\":\"Magento, Magento 2, Magento 2 Development, Magento 2 Tutorial, Magento Speed Optimization, Magento Theme, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"position\":2,\"name\":\"Magento\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#listItem\",\"name\":\"Magento 2 Customer Management: Customize My Account, Order History &amp; Functionality\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#listItem\",\"position\":3,\"name\":\"Magento 2 Customer Management: Customize My Account, Order History &amp; Functionality\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin\",\"name\":\"Andrey Litvin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Andrey Litvin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html\",\"name\":\"Magento 2 Customer Management Guide | BelVG Blog\",\"description\":\"Discover our Magento 2 Customer Management Guide and learn more about Customize My Account, Order History & Functionality\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/Artboard-1-12.png\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html\\\/#mainImage\",\"width\":1108,\"height\":590,\"caption\":\"Customer Management in Magento 2: Customize My Account, Order History and Functionality\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#mainImage\"},\"datePublished\":\"2019-01-31T14:47:14+02:00\",\"dateModified\":\"2023-11-01T13:57:20+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Magento 2 Customer Management Guide | BelVG Blog","description":"Discover our Magento 2 Customer Management Guide and learn more about Customize My Account, Order History & Functionality","canonical_url":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#article","name":"Magento 2 Customer Management Guide | BelVG Blog","headline":"Magento 2 Customer Management: Customize My Account, Order History &amp; Functionality","author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/Artboard-1-12.png","width":1108,"height":590,"caption":"Customer Management in Magento 2: Customize My Account, Order History and Functionality"},"datePublished":"2019-01-31T14:47:14+02:00","dateModified":"2023-11-01T13:57:20+02:00","inLanguage":"en-US","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#webpage"},"articleSection":"Magento, Magento 2, Magento 2 Development, Magento 2 Tutorial, Magento Speed Optimization, Magento Theme, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","position":2,"name":"Magento","item":"https:\/\/belvg.com\/blog\/category\/magento","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#listItem","name":"Magento 2 Customer Management: Customize My Account, Order History &amp; Functionality"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#listItem","position":3,"name":"Magento 2 Customer Management: Customize My Account, Order History &amp; Functionality","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"Person","@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author","url":"https:\/\/belvg.com\/blog\/author\/andrey-litvin","name":"Andrey Litvin","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Andrey Litvin"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#webpage","url":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html","name":"Magento 2 Customer Management Guide | BelVG Blog","description":"Discover our Magento 2 Customer Management Guide and learn more about Customize My Account, Order History & Functionality","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/Artboard-1-12.png","@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html\/#mainImage","width":1108,"height":590,"caption":"Customer Management in Magento 2: Customize My Account, Order History and Functionality"},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html#mainImage"},"datePublished":"2019-01-31T14:47:14+02:00","dateModified":"2023-11-01T13:57:20+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"18648","title":"Magento 2 Customer Management Guide | #site_title","description":"Discover our Magento 2 Customer Management Guide and learn more about Customize My Account, Order History &amp; Functionality","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:36:54","updated":"2026-11-03 18:36:54"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/magento\" title=\"Magento\">Magento<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMagento 2 Customer Management: Customize My Account, Order History &amp; Functionality\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"Magento","link":"https:\/\/belvg.com\/blog\/category\/magento"},{"label":"Magento 2 Customer Management: Customize My Account, Order History &amp; Functionality","link":"https:\/\/belvg.com\/blog\/customer-management-in-magento-2-customize-my-account-order-history-and-functionality.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/18648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=18648"}],"version-history":[{"count":2,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/18648\/revisions"}],"predecessor-version":[{"id":27764,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/18648\/revisions\/27764"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/18654"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=18648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=18648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=18648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}