{"id":50925,"date":"2016-06-03T12:45:49","date_gmt":"2016-06-03T12:45:49","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=50925"},"modified":"2016-11-19T07:20:24","modified_gmt":"2016-11-19T07:20:24","slug":"add-new-product-type-magento2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/","title":{"rendered":"Add New Product Type &#8211; Magento2"},"content":{"rendered":"<p>We can create and add new product type in magento2.<br \/>\nIn this blog we will see how to add own product type in magento2.<\/p>\n<h2>New Product Type Declaration<\/h2>\n<p>First of all create &#8216;product_types.xml&#8217; file in location Namespace\/Module\/etc.<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:module:Magento_Catalog:etc\/product_types.xsd\"&gt;\r\n\t&lt;type name=\"demo\" label=\"Demo Product\" modelInstance=\"Namespace\\Module\\Model\\Product\\DemoType\" indexPriority=\"70\" sortOrder=\"70\"&gt;\r\n\t&lt;\/type&gt;\r\n&lt;\/config&gt;<\/pre>\n<p>After defining product type in &#8216;product_types.xml&#8217;, we need to create model for product type.<br \/>\nFinally create DemoType.php in location Namespace\/Module\/Model\/Product.<\/p>\n<pre class=\"brush:php\">&lt;?php\r\nnamespace Namespace\\Module\\Model\\Product;\r\n\r\nclass DemoType extends \\Magento\\Catalog\\Model\\Product\\Type\\AbstractType\r\n{\r\n    public function deleteTypeSpecificData(\\Magento\\Catalog\\Model\\Product $product)\r\n    {\r\n    }\r\n}<\/pre>\n<p>After this you will see a new product type in admin.<br \/>\n<img decoding=\"async\" alt=\"New Product Type\" class=\"alignnone size-large wp-image-50970\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/productType-1200x631.png\" width=\"1200\" height=\"631\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/productType-1200x631.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/productType-250x131.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/productType-300x158.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/productType-768x404.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/productType.png 1426w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can create and add new product type in magento2. In this blog we will see how to add own product type in magento2. New Product Type Declaration First of all create &#8216;product_types.xml&#8217; file in location Namespace\/Module\/etc. &lt;?xml version=&#8221;1.0&#8243;?&gt; &lt;config xmlns:xsi=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#8221; xsi:noNamespaceSchemaLocation=&#8221;urn:magento:module:Magento_Catalog:etc\/product_types.xsd&#8221;&gt; &lt;type name=&#8221;demo&#8221; label=&#8221;Demo Product&#8221; modelInstance=&#8221;Namespace\\Module\\Model\\Product\\DemoType&#8221; indexPriority=&#8221;70&#8243; sortOrder=&#8221;70&#8243;&gt; &lt;\/type&gt; &lt;\/config&gt; After defining product type <a href=\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":21,"featured_media":61035,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302],"tags":[2070,3959],"class_list":["post-50925","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento2","tag-magento2","tag-new-product-type"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Add Custom New Product Type in Magento2<\/title>\n<meta name=\"description\" content=\"Add custom product type in magento2, Create custom product type in magento2, Add new product type in magento2, Create new product type in magento2\" \/>\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\/add-new-product-type-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Custom New Product Type in Magento2\" \/>\n<meta property=\"og:description\" content=\"Add custom product type in magento2, Create custom product type in magento2, Add new product type in magento2, Create new product type in magento2\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/add-new-product-type-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:author\" content=\"https:\/\/www.facebook.com\/rahul0989\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-03T12:45:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-11-19T07:20:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/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=\"Rahul Mahto\" \/>\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=\"Rahul Mahto\" \/>\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\/add-new-product-type-magento2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/\"},\"author\":{\"name\":\"Rahul Mahto\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3002e6bca8362f6cf1c61b2663496c4f\"},\"headline\":\"Add New Product Type &#8211; Magento2\",\"datePublished\":\"2016-06-03T12:45:49+00:00\",\"dateModified\":\"2016-11-19T07:20:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/\"},\"wordCount\":84,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png\",\"keywords\":[\"Magento2\",\"New Product Type\"],\"articleSection\":[\"Magento2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/\",\"url\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/\",\"name\":\"How to Add Custom New Product Type in Magento2\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png\",\"datePublished\":\"2016-06-03T12:45:49+00:00\",\"dateModified\":\"2016-11-19T07:20:24+00:00\",\"description\":\"Add custom product type in magento2, Create custom product type in magento2, Add new product type in magento2, Create new product type in magento2\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png\",\"width\":825,\"height\":260,\"caption\":\"New Product Type\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add New Product Type &#8211; Magento2\"}]},{\"@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\/3002e6bca8362f6cf1c61b2663496c4f\",\"name\":\"Rahul Mahto\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b0def172ef24ea3f7319500afbb65af8012023ba5c143982a4c958b2fb58ee0d?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\/b0def172ef24ea3f7319500afbb65af8012023ba5c143982a4c958b2fb58ee0d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Rahul Mahto\"},\"sameAs\":[\"http:\/\/webkul.com\",\"https:\/\/www.facebook.com\/rahul0989\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/rahul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add Custom New Product Type in Magento2","description":"Add custom product type in magento2, Create custom product type in magento2, Add new product type in magento2, Create new product type in magento2","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\/add-new-product-type-magento2\/","og_locale":"en_US","og_type":"article","og_title":"How to Add Custom New Product Type in Magento2","og_description":"Add custom product type in magento2, Create custom product type in magento2, Add new product type in magento2, Create new product type in magento2","og_url":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_author":"https:\/\/www.facebook.com\/rahul0989","article_published_time":"2016-06-03T12:45:49+00:00","article_modified_time":"2016-11-19T07:20:24+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png","type":"image\/png"}],"author":"Rahul Mahto","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Rahul Mahto","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/"},"author":{"name":"Rahul Mahto","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3002e6bca8362f6cf1c61b2663496c4f"},"headline":"Add New Product Type &#8211; Magento2","datePublished":"2016-06-03T12:45:49+00:00","dateModified":"2016-11-19T07:20:24+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/"},"wordCount":84,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png","keywords":["Magento2","New Product Type"],"articleSection":["Magento2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/","url":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/","name":"How to Add Custom New Product Type in Magento2","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png","datePublished":"2016-06-03T12:45:49+00:00","dateModified":"2016-11-19T07:20:24+00:00","description":"Add custom product type in magento2, Create custom product type in magento2, Add new product type in magento2, Create new product type in magento2","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/10\/Magneto-Code-Snippet.png","width":825,"height":260,"caption":"New Product Type"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/add-new-product-type-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Add New Product Type &#8211; Magento2"}]},{"@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\/3002e6bca8362f6cf1c61b2663496c4f","name":"Rahul Mahto","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b0def172ef24ea3f7319500afbb65af8012023ba5c143982a4c958b2fb58ee0d?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\/b0def172ef24ea3f7319500afbb65af8012023ba5c143982a4c958b2fb58ee0d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Rahul Mahto"},"sameAs":["http:\/\/webkul.com","https:\/\/www.facebook.com\/rahul0989"],"url":"https:\/\/webkul.com\/blog\/author\/rahul\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/50925","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\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=50925"}],"version-history":[{"count":14,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/50925\/revisions"}],"predecessor-version":[{"id":65020,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/50925\/revisions\/65020"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/61035"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=50925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=50925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=50925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}