{"id":1088,"date":"2012-10-15T09:57:36","date_gmt":"2012-10-15T09:57:36","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=1088"},"modified":"2012-10-15T09:57:36","modified_gmt":"2012-10-15T09:57:36","slug":"magento-add-new-tab-in-customer-grid","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/","title":{"rendered":"Magento Add new tab in customer grid"},"content":{"rendered":"<p>Here we are going to add new custom tab in the Magento Customer Grid by overriding it in our custom module.<\/p>\n<p>1. To override magento customer grid go to your custom module config.xml<\/p>\n<pre class=\"brush:xml\">&lt;config&gt;\r\n &lt;global&gt;\r\n  &lt;blocks&gt;\r\n   &lt;adminhtml&gt;\r\n    &lt;rewrite&gt;\r\n     &lt;customer_edit_tabs&gt;Webkul_modulename_Block_Adminhtml_Customer_Edit_Tabs&lt;\/customer_edit_tabs&gt;\r\n    &lt;\/rewrite&gt;\r\n   &lt;\/adminhtml&gt;\r\n  &lt;\/blocks&gt;\r\n &lt;\/global&gt;\r\n&lt;\/config&gt;<\/pre>\n<p>2. Create a file tabs.php at following path<\/p>\n<p>app\/code\/local\/Webkul\/Modulename\/Block\/Adminhtml\/Customer\/Edit\/<\/p>\n<p>3. Copy the entire code from this file\u00a0app\/code\/core\/Mage\/Adminhtml\/Block\/Customer\/Edit\/tabs.php<\/p>\n<p>to your tabs.php (app\/code\/local\/Webkul\/Modulename\/Block\/Adminhtml\/Customer\/Edit\/)<\/p>\n<p>4. Add this code to create new tab<\/p>\n<pre class=\"brush:php\">$this-&gt;addTab('payment', array(\r\n'label' =&gt; Mage::helper('customer')-&gt;__('Payment Mode'),\r\n'content' =&gt; $this-&gt;paymentmode(),\r\n));<\/pre>\n<p>inside function _beforeToHtml()<\/p>\n<pre class=\"brush:php\">protected function _beforeToHtml()\r\n{\r\n   if (Mage::registry('current_customer')-&gt;getId()) {\r\n                        $this-&gt;addTab('payment', array(\r\n\t\t\t\t'label'     =&gt; Mage::helper('customer')-&gt;__('Payment Mode'),\r\n\t\t\t\t'content'   =&gt; 'Your content Come Here',\r\n\t\t\t));\r\n   }\r\n}\r\n\r\n\/*note: in 'content' you can pass a string or function*\/\r\n\r\n\/* passing function *\/\r\nprotected function _beforeToHtml()\r\n{\r\n   if (Mage::registry('current_customer')-&gt;getId()) {\r\n                        $this-&gt;addTab('payment', array(\r\n\t\t\t\t'label'     =&gt; Mage::helper('customer')-&gt;__('Payment Mode'),\r\n\t\t\t\t'content'   =&gt; $this-&gt;paymentmode(),\r\n\t\t\t));\r\n   }\r\n}\r\n\/* write these line after completion of  function 'protected function _beforeToHtml(){}'*\/\r\nprotected function paymentmode()\r\n{ \r\n return 'Your content Come Here';\r\n}<\/pre>\n<p>5. Save and Enjoy !!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here we are going to add new custom tab in the Magento Customer Grid by overriding it in our custom module. 1. To override magento customer grid go to your custom module config.xml &lt;config&gt; &lt;global&gt; &lt;blocks&gt; &lt;adminhtml&gt; &lt;rewrite&gt; &lt;customer_edit_tabs&gt;Webkul_modulename_Block_Adminhtml_Customer_Edit_Tabs&lt;\/customer_edit_tabs&gt; &lt;\/rewrite&gt; &lt;\/adminhtml&gt; &lt;\/blocks&gt; &lt;\/global&gt; &lt;\/config&gt; 2. Create a file tabs.php at following path app\/code\/local\/Webkul\/Modulename\/Block\/Adminhtml\/Customer\/Edit\/ 3. Copy <a href=\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[191],"class_list":["post-1088","post","type-post","status-publish","format-standard","hentry","category-magento","tag-magento-customer-grid"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento Add new tab in customer grid - Webkul Blog<\/title>\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\/magento-add-new-tab-in-customer-grid\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento Add new tab in customer grid - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Here we are going to add new custom tab in the Magento Customer Grid by overriding it in our custom module. 1. To override magento customer grid go to your custom module config.xml &lt;config&gt; &lt;global&gt; &lt;blocks&gt; &lt;adminhtml&gt; &lt;rewrite&gt; &lt;customer_edit_tabs&gt;Webkul_modulename_Block_Adminhtml_Customer_Edit_Tabs&lt;\/customer_edit_tabs&gt; &lt;\/rewrite&gt; &lt;\/adminhtml&gt; &lt;\/blocks&gt; &lt;\/global&gt; &lt;\/config&gt; 2. Create a file tabs.php at following path app\/code\/local\/Webkul\/Modulename\/Block\/Adminhtml\/Customer\/Edit\/ 3. Copy [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/\" \/>\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=\"2012-10-15T09:57:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"ankit\" \/>\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=\"ankit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/\"},\"author\":{\"name\":\"ankit\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/a331ec773a9ba5bb761b65a82a1d198b\"},\"headline\":\"Magento Add new tab in customer grid\",\"datePublished\":\"2012-10-15T09:57:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/\"},\"wordCount\":100,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"keywords\":[\"magento customer grid\"],\"articleSection\":[\"magento\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/\",\"url\":\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/\",\"name\":\"Magento Add new tab in customer grid - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2012-10-15T09:57:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Magento Add new tab in customer grid\"}]},{\"@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\/a331ec773a9ba5bb761b65a82a1d198b\",\"name\":\"ankit\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fa24dab5cfd90e75459873b28679347321078dd9343d76216081b804a3e76ad0?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\/fa24dab5cfd90e75459873b28679347321078dd9343d76216081b804a3e76ad0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"ankit\"},\"sameAs\":[\"http:\/\/webkul.com\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/ankit\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Magento Add new tab in customer grid - Webkul Blog","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\/magento-add-new-tab-in-customer-grid\/","og_locale":"en_US","og_type":"article","og_title":"Magento Add new tab in customer grid - Webkul Blog","og_description":"Here we are going to add new custom tab in the Magento Customer Grid by overriding it in our custom module. 1. To override magento customer grid go to your custom module config.xml &lt;config&gt; &lt;global&gt; &lt;blocks&gt; &lt;adminhtml&gt; &lt;rewrite&gt; &lt;customer_edit_tabs&gt;Webkul_modulename_Block_Adminhtml_Customer_Edit_Tabs&lt;\/customer_edit_tabs&gt; &lt;\/rewrite&gt; &lt;\/adminhtml&gt; &lt;\/blocks&gt; &lt;\/global&gt; &lt;\/config&gt; 2. Create a file tabs.php at following path app\/code\/local\/Webkul\/Modulename\/Block\/Adminhtml\/Customer\/Edit\/ 3. Copy [...]","og_url":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2012-10-15T09:57:36+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"ankit","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"ankit","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/"},"author":{"name":"ankit","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/a331ec773a9ba5bb761b65a82a1d198b"},"headline":"Magento Add new tab in customer grid","datePublished":"2012-10-15T09:57:36+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/"},"wordCount":100,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"keywords":["magento customer grid"],"articleSection":["magento"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/","url":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/","name":"Magento Add new tab in customer grid - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2012-10-15T09:57:36+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/magento-add-new-tab-in-customer-grid\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Magento Add new tab in customer grid"}]},{"@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\/a331ec773a9ba5bb761b65a82a1d198b","name":"ankit","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fa24dab5cfd90e75459873b28679347321078dd9343d76216081b804a3e76ad0?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\/fa24dab5cfd90e75459873b28679347321078dd9343d76216081b804a3e76ad0?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"ankit"},"sameAs":["http:\/\/webkul.com"],"url":"https:\/\/webkul.com\/blog\/author\/ankit\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/1088","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=1088"}],"version-history":[{"count":3,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/1088\/revisions"}],"predecessor-version":[{"id":1092,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/1088\/revisions\/1092"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=1088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=1088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=1088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}