{"id":67371,"date":"2016-12-09T11:44:22","date_gmt":"2016-12-09T11:44:22","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=67371"},"modified":"2024-07-31T13:02:22","modified_gmt":"2024-07-31T13:02:22","slug":"enable-city-field-cart-page-magento2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/","title":{"rendered":"How to enable city field on cart page in Adobe Commerce (Magento 2)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Enable city field on cart page in Adobe Commerce (Magento 2)<\/h3>\n\n\n\n<p>Here we learn how to enable city field in Adobe Commerce (Magento 2) cart page.<\/p>\n\n\n\n<p>1. create <strong>di.xml<\/strong> file to overwrite block <strong>Magento\\Checkout\\Block\\Cart\\LayoutProcessor<\/strong> Block.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;!--\n\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_EnableCity\n * @author    Webkul\n * @copyright Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\n--&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:ObjectManager\/etc\/config.xsd&quot;&gt;\n    &lt;preference for=&quot;Magento\\Checkout\\Block\\Cart\\LayoutProcessor&quot;\n                type=&quot;Webkul\\EnableCity\\Model\\Checkout\\Block\\Cart\\Shipping&quot; \/&gt;\n&lt;\/config&gt;<\/pre>\n\n\n\n<p>Purpose of override <strong>Magento\\Checkout\\Block\\Cart\\LayoutProcessor<\/strong> is that we need to overwrite function isCityActive() because its return false by default.<\/p>\n\n\n\n<p>We could create plugin for this method but its a protected function.<\/p>\n\n\n\n<p>2. Now create own override block <strong>Webkul\\EnableCity\\Model\\Checkout\\Block\\Cart\\Shipping<\/strong>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_EnableCity\n * @author    Webkul\n * @copyright Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\n\nnamespace Webkul\\EnableCity\\Model\\Checkout\\Block\\Cart;\n\n\/**\n * Checkout cart shipping block plugin\n *\/\nclass Shipping extends \\Magento\\Checkout\\Block\\Cart\\LayoutProcessor\n{\n    \/**\n     * @var \\Magento\\Framework\\App\\Config\\ScopeConfigInterface\n     *\/\n    protected $_scopeConfig;\n\n    \/**\n     * @param \\Magento\\Framework\\App\\Config\\ScopeConfigInterface $scopeConfig\n     *\/\n    public function __construct(\n        \\Magento\\Framework\\App\\Config\\ScopeConfigInterface $scopeConfig,\n        \\Magento\\Checkout\\Block\\Checkout\\AttributeMerger $merger,\n        \\Magento\\Directory\\Model\\ResourceModel\\Country\\Collection $countryCollection,\n        \\Magento\\Directory\\Model\\ResourceModel\\Region\\Collection $regionCollection\n    ) {\n        $this-&gt;_scopeConfig = $scopeConfig;\n        parent::__construct($merger, $countryCollection, $regionCollection);\n    }\n\n    \/**\n     * Show City in Shipping Estimation\n     *\n     * @return bool\n     * @codeCoverageIgnore\n     *\/\n    protected function isCityActive()\n    {\n        return true;\n    }\n}<\/pre>\n\n\n\n<p>Still we will not able to see the city field at cart page. Because when you open <strong>Magento\/Checkout\/view\/frontend\/web\/js\/model\/cart\/totals-processor\/default.js<\/strong> file, you would see there is <strong>&#8216;countryId&#8217;, &#8216;region&#8217;, &#8216;regionId&#8217;, &#8216;postcode&#8217;<\/strong> passed in <strong>requiredFields<\/strong> array. <\/p>\n\n\n\n<p>So now we need to override this js file in our module.<\/p>\n\n\n\n<p>3. Create <strong>Webkul\/EnableCity\/view\/frontend\/requirejs-config.js<\/strong> file<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_EnableCity\n * @author    Webkul\n * @copyright Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\n \/*jshint jquery:true*\/\nvar config = {\n    map: {\n        &#039;*&#039;: {\n            &#039;Magento_Checkout\/js\/model\/cart\/totals-processor\/default&#039;: &#039;Webkul_EnableCity\/js\/model\/cart\/totals-processor\/default&#039;\n        }\n    }\n};<\/pre>\n\n\n\n<p>4. Create <strong>Webkul\/EnableCity\/view\/frontend\/web\/js\/model\/cart\/totals-processor\/default.js<\/strong> file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_EnableCity\n * @author    Webkul\n * @copyright Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\ndefine(\n    &#091;\n        &#039;underscore&#039;,\n        &#039;Magento_Checkout\/js\/model\/resource-url-manager&#039;,\n        &#039;Magento_Checkout\/js\/model\/quote&#039;,\n        &#039;mage\/storage&#039;,\n        &#039;Magento_Checkout\/js\/model\/totals&#039;,\n        &#039;Magento_Checkout\/js\/model\/error-processor&#039;\n    ],\n    function (_, resourceUrlManager, quote, storage, totalsService, errorProcessor) {\n        &#039;use strict&#039;;\n\n        return {\n            requiredFields: &#091;&#039;countryId&#039;, &#039;region&#039;, &#039;regionId&#039;, &#039;postcode&#039;, &#039;city&#039;],\n\n            \/**\n             * Get shipping rates for specified address.\n             *\/\n            estimateTotals: function (address) {\n                var serviceUrl, payload;\n                totalsService.isLoading(true);\n                serviceUrl = resourceUrlManager.getUrlForTotalsEstimationForNewAddress(quote),\n                    payload = {\n                        addressInformation: {\n                            address: _.pick(address, this.requiredFields)\n                        }\n                    };\n\n                if (quote.shippingMethod() &amp;&amp; quote.shippingMethod()&#091;&#039;method_code&#039;]) {\n                    payload.addressInformation&#091;&#039;shipping_method_code&#039;] = quote.shippingMethod()&#091;&#039;method_code&#039;];\n                    payload.addressInformation&#091;&#039;shipping_carrier_code&#039;] = quote.shippingMethod()&#091;&#039;carrier_code&#039;];\n                }\n\n                storage.post(\n                    serviceUrl, JSON.stringify(payload), false\n                ).done(\n                    function (result) {\n                        quote.setTotals(result);\n                    }\n                ).fail(\n                    function (response) {\n                        errorProcessor.process(response);\n                    }\n                ).always(\n                    function () {\n                        totalsService.isLoading(false);\n                    }\n                );\n            }\n        };\n    }\n);<\/pre>\n\n\n\n<p>Now run <strong>php bin\/magento setup:static-content:deploy<\/strong> command, and go to the cart page, you can see city filed there.<\/p>\n\n\n\n<p>If you need technical support, please contact us at <a href=\"mailto:support@webkul.com\">support@webkul.com<\/a>. Additionally, explore a range of solutions to enhance your online store&#8217;s capabilities by visiting the <a href=\"https:\/\/store.webkul.com\/Magento-2.html\">Adobe Commerce extensions<\/a> page.<\/p>\n\n\n\n<p>For specialized advice or to develop custom features, consider hiring <a href=\"https:\/\/webkul.com\/hire-magento-developers\/\">Adobe Commerce Developers<\/a> for your project.<\/p>\n\n\n\n<p>Any query please ask in comment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enable city field on cart page in Adobe Commerce (Magento 2) Here we learn how to enable city field in Adobe Commerce (Magento 2) cart page. 1. create di.xml file to overwrite block Magento\\Checkout\\Block\\Cart\\LayoutProcessor Block. Purpose of override Magento\\Checkout\\Block\\Cart\\LayoutProcessor is that we need to overwrite function isCityActive() because its return false by default. We could <a href=\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":4,"featured_media":66844,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3286],"tags":[4119,4120,2898],"class_list":["post-67371","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento2-1","tag-city-field-on-cart-page-magento2","tag-enable-city-field-magento2","tag-magento2-cart"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Add city field in Adobe Commerce (Magento 2) cart page<\/title>\n<meta name=\"description\" content=\"Here we learn how to enable city field in Adobe Commerce (Magento 2) cart page for get city value form customer add checkout.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add city field in Adobe Commerce (Magento 2) cart page\" \/>\n<meta property=\"og:description\" content=\"Here we learn how to enable city field in Adobe Commerce (Magento 2) cart page for get city value form customer add checkout.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-09T11:44:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-31T13:02:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abhishek Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/\"},\"author\":{\"name\":\"Abhishek Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0\"},\"headline\":\"How to enable city field on cart page in Adobe Commerce (Magento 2)\",\"datePublished\":\"2016-12-09T11:44:22+00:00\",\"dateModified\":\"2024-07-31T13:02:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/\"},\"wordCount\":244,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png\",\"keywords\":[\"City field on cart page magento2\",\"Enable City Field Magento2\",\"magento2 cart\"],\"articleSection\":[\"Magento2.1\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/\",\"url\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/\",\"name\":\"Add city field in Adobe Commerce (Magento 2) cart page\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png\",\"datePublished\":\"2016-12-09T11:44:22+00:00\",\"dateModified\":\"2024-07-31T13:02:22+00:00\",\"description\":\"Here we learn how to enable city field in Adobe Commerce (Magento 2) cart page for get city value form customer add checkout.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to enable city field on cart page in Adobe Commerce (Magento 2)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0\",\"name\":\"Abhishek Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Abhishek Singh\"},\"description\":\"Adobe Commerce certified Magento developer with over 12 years of experience at Webkul. Passionate about scalable Magento 2-based webshops, AI, and multi-channel integrations, Abhishek consistently delivers innovative and efficient e-commerce solutions that propel businesses forward.\",\"sameAs\":[\"http:\/\/webkul.com\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/abhishek\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add city field in Adobe Commerce (Magento 2) cart page","description":"Here we learn how to enable city field in Adobe Commerce (Magento 2) cart page for get city value form customer add checkout.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/","og_locale":"en_US","og_type":"article","og_title":"Add city field in Adobe Commerce (Magento 2) cart page","og_description":"Here we learn how to enable city field in Adobe Commerce (Magento 2) cart page for get city value form customer add checkout.","og_url":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2016-12-09T11:44:22+00:00","article_modified_time":"2024-07-31T13:02:22+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png","type":"image\/png"}],"author":"Abhishek Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Abhishek Singh","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/"},"author":{"name":"Abhishek Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0"},"headline":"How to enable city field on cart page in Adobe Commerce (Magento 2)","datePublished":"2016-12-09T11:44:22+00:00","dateModified":"2024-07-31T13:02:22+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/"},"wordCount":244,"commentCount":3,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png","keywords":["City field on cart page magento2","Enable City Field Magento2","magento2 cart"],"articleSection":["Magento2.1"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/","url":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/","name":"Add city field in Adobe Commerce (Magento 2) cart page","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png","datePublished":"2016-12-09T11:44:22+00:00","dateModified":"2024-07-31T13:02:22+00:00","description":"Here we learn how to enable city field in Adobe Commerce (Magento 2) cart page for get city value form customer add checkout.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/12\/Magneto-Code-Snippet.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/enable-city-field-cart-page-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to enable city field on cart page in Adobe Commerce (Magento 2)"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0","name":"Abhishek Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Abhishek Singh"},"description":"Adobe Commerce certified Magento developer with over 12 years of experience at Webkul. Passionate about scalable Magento 2-based webshops, AI, and multi-channel integrations, Abhishek consistently delivers innovative and efficient e-commerce solutions that propel businesses forward.","sameAs":["http:\/\/webkul.com"],"url":"https:\/\/webkul.com\/blog\/author\/abhishek\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/67371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=67371"}],"version-history":[{"count":5,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/67371\/revisions"}],"predecessor-version":[{"id":455646,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/67371\/revisions\/455646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/66844"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=67371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=67371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=67371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}