{"id":15196,"date":"2018-03-06T15:11:09","date_gmt":"2018-03-06T12:11:09","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=15196"},"modified":"2019-09-30T15:55:14","modified_gmt":"2019-09-30T13:55:14","slug":"custom-sample-data-module-magento-2","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html","title":{"rendered":"How to Develop a Custom Sample Data Module for Magento 2"},"content":{"rendered":"\n<p><span style=\"font-weight: 400;\">Today we&rsquo;re going to discuss designing Sample Data module to create data for <strong>Belvg_WelcomeAgreement<\/strong> demo module. The case is that we use Gitlab CI to automatically create a demo for the module. Additionally, we wanted database data to be created simultaneously, so we decided to design Sample Data module using Magento 2 Way.<\/span><!--more--><\/p>\n<p><span style=\"font-weight: 400;\">You might have seen Sample Data modules designed by Magento team, for example, Magento_CmsSampleData, Magento_ConfigurableSampleData, Magento_MsrpSampleData etc. Similar to these examples, we&rsquo;ve designed our own module, the code of which you can find on&nbsp;<a href=\"https:\/\/github.com\/Simonchik\/WelcomeAgreementSampleData\" target=\"_blank\" rel=\"noopener\">github<\/a><\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let&rsquo;s consider each file separately:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Belvg\/WelcomeAgreementSampleData\/registration.php<\/strong> &ndash; file which records a new module in the system. <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Belvg\/WelcomeAgreementSampleData\/module.xml<\/strong> &ndash; one more file every module for Magento 2 must have. Here we specify Belvg_WelcomeAgreementSampleData dependence on Belvg_WelcomeAgreement in order to set the order of module installation. <\/span><\/li>\n<\/ul>\n<pre class=\"lang:yaml decode:true\">&lt;sequence&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;module name=\"Magento_SampleData\"\/&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;module name=\"Belvg_WelcomeAgreement\" \/&gt;\r\n&lt;\/sequence&gt;<\/pre>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Belvg\/WelcomeAgreementSampleData\/Setup\/InstallData.php<\/strong> &ndash; &nbsp;file which with the help of Dependency Injection (DI) creates the object installing interface Setup\\SampleData\\InstallerInterface.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Belvg\/WelcomeAgreementSampleData\/Setup\/Installer.php<\/strong> &ndash; class which installs the interface and &#1080; <\/span><a href=\"https:\/\/github.com\/Simonchik\/WelcomeAgreementSampleData\/blob\/master\/Belvg\/WelcomeAgreementSampleData\/Setup\/Installer.php#L44\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">triggers data import<\/span><\/a><span style=\"font-weight: 400;\"> for \\Belvg\\WelcomeAgreementSampleData\\Model\\Agreement by using fixtures\/belvg_welcomeagreement_agreement.csv.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Belvg\/WelcomeAgreementSampleData\/Model\/Agreement.php<\/strong> &ndash; class which represents <\/span><a href=\"https:\/\/github.com\/Simonchik\/WelcomeAgreementSampleData\/blob\/master\/Belvg\/WelcomeAgreementSampleData\/Model\/Agreement.php#L61\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">install method<\/span><\/a><span style=\"font-weight: 400;\"> responsible for data import:<\/span><\/li>\n<\/ul>\n<pre class=\"lang:php decode:true \">\/**\r\n* @param array $fixtures\r\n* @throws \\Exception\r\n*\/\r\npublic function install(array $fixtures)\r\n{\r\n    foreach ($fixtures as $fileName) {\r\n        $fileName = $this-&gt;fixtureManager-&gt;getFixture($fileName);\r\n        if (!file_exists($fileName)) {\r\n            continue;\r\n        }\r\n        $rows = $this-&gt;csvReader-&gt;getData($fileName);\r\n        $header = array_shift($rows);\r\n        foreach ($rows as $row) {\r\n            $data = [];\r\n            foreach ($row as $key =&gt; $value) {\r\n               $data[$header[$key]] = $value;\r\n            }\r\n            $row = $data;\r\n            $this-&gt;agreementFactory-&gt;create()\r\n                -&gt;addData($row)\r\n                -&gt;setStores([\r\n                    \\Magento\\Store\\Model\\Store::DEFAULT_STORE_ID,\r\n                    \\Magento\\Store\\Model\\Store::DISTRO_STORE_ID\r\n               ])\r\n            -&gt;save();\r\n        }\r\n    }\r\n}<\/pre>\n<p><span style=\"font-weight: 400;\">We used <strong>$this-&gt;agreementFactory<\/strong> object delivered on via DA while being the sample of the original Belvg_WelcomeAgreement module. Agreement entity has the following structure:<\/span><\/p>\n<pre class=\"lang:mysql decode:true\">mysql&gt; SHOW CREATE TABLE `belvg_welcomeagreement_agreement`;\r\n\r\nCREATE TABLE `belvg_welcomeagreement_agreement` (\r\n&nbsp;`belvg_welcomeagreement_agreement_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\r\n&nbsp;`title` varchar(255) NOT NULL COMMENT 'Title',\r\n&nbsp;`content` text NOT NULL COMMENT 'Agreement content ',\r\n&nbsp;`start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Time Start',\r\n&nbsp;`finish_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Time Finish',\r\n&nbsp;`creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation Time',\r\n&nbsp;`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modification Time',\r\n&nbsp;`is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Active',\r\n&nbsp;PRIMARY KEY (`belvg_welcomeagreement_agreement_id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table To Store history of accept'<\/pre>\n<p>Besides, &nbsp;<strong>belvg_welcomeagreement_agreement_store<\/strong> table is used for keeping agreements &lt;-&gt; stores.<\/p>\n<pre class=\"lang:mysql decode:true\">mysql&gt; SHOW CREATE TABLE `belvg_welcomeagreement_agreement_store`;\r\n\r\nCREATE TABLE `belvg_welcomeagreement_agreement_store` (\r\n&nbsp;`belvg_welcomeagreement_agreement_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\r\n&nbsp;`store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',\r\n&nbsp;PRIMARY KEY (`belvg_welcomeagreement_agreement_id`,`store_id`),\r\n&nbsp;KEY `BELVG_WELCOMEAGREEMENT_AGREEMENT_STORE_STORE_ID` (`store_id`),\r\n&nbsp;CONSTRAINT `BELVG_WELCOMEAGREEMENT_AGREEMENT_STORE_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE,\r\n&nbsp;CONSTRAINT `FK_E536FD3FB4F1E1A48A7C442A41F74A66` FOREIGN KEY (`belvg_welcomeagreement_agreement_id`) REFERENCES `belvg_welcomeagreement_agreement` (`belvg_welcomeagreement_agreement_id`) ON DELETE CASCADE\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Table To Store Linkage `store` &lt;-&gt; `agreement`'<\/pre>\n<p><span style=\"font-weight: 400;\">In order to install the module, you need to run the commands (having Belvg_WelcomeAgreement module):<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">php bin\/magento module:enable Belvg_WelcomeAgreementSampleData<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">php bin\/magento setup:upgrade<\/span><\/li>\n<\/ul>\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=\"How to Develop a Custom Sample Data Module for Magento 2\"><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 Ecommerce Development <\/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":"Developing Custom Sample Data Module for Magento 2","protected":false},"author":12,"featured_media":15200,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,389],"tags":[],"class_list":["post-15196","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-magento","category-magento2-development","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=\"Today we\u2019re going to discuss designing Sample Data module to create data for Belvg_WelcomeAgreement demo module.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Aliaksandr Simonchik\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.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\\\/custom-sample-data-module-magento-2.html#article\",\"name\":\"How to Develop a Custom Sample Data Module for Magento 2 | BelVG Blog\",\"headline\":\"How to Develop a Custom Sample Data Module for Magento 2\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/alex-simonchik#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/03\\\/How-to-Develop-a-Custom-Sample-Data-Module-for-Magento-2.jpg\",\"width\":770,\"height\":433,\"caption\":\"How to Develop a Custom Sample Data Module for Magento 2\"},\"datePublished\":\"2018-03-06T15:11:09+02:00\",\"dateModified\":\"2019-09-30T15:55:14+02:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html#webpage\"},\"articleSection\":\"Magento, Magento 2 Development, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.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\\\/custom-sample-data-module-magento-2.html#listItem\",\"name\":\"How to Develop a Custom Sample Data Module for Magento 2\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html#listItem\",\"position\":3,\"name\":\"How to Develop a Custom Sample Data Module for Magento 2\",\"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\\\/alex-simonchik#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/alex-simonchik\",\"name\":\"Aliaksandr Simonchik\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6553917a81b1da7866b8b875368df6cbbec56413c3438694df8539de7fb092c0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Aliaksandr Simonchik\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html\",\"name\":\"How to Develop a Custom Sample Data Module for Magento 2 | BelVG Blog\",\"description\":\"Today we\\u2019re going to discuss designing Sample Data module to create data for Belvg_WelcomeAgreement demo module.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/alex-simonchik#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/alex-simonchik#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/03\\\/How-to-Develop-a-Custom-Sample-Data-Module-for-Magento-2.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html\\\/#mainImage\",\"width\":770,\"height\":433,\"caption\":\"How to Develop a Custom Sample Data Module for Magento 2\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/custom-sample-data-module-magento-2.html#mainImage\"},\"datePublished\":\"2018-03-06T15:11:09+02:00\",\"dateModified\":\"2019-09-30T15:55:14+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":"How to Develop a Custom Sample Data Module for Magento 2 | BelVG Blog","description":"Today we\u2019re going to discuss designing Sample Data module to create data for Belvg_WelcomeAgreement demo module.","canonical_url":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html#article","name":"How to Develop a Custom Sample Data Module for Magento 2 | BelVG Blog","headline":"How to Develop a Custom Sample Data Module for Magento 2","author":{"@id":"https:\/\/belvg.com\/blog\/author\/alex-simonchik#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/03\/How-to-Develop-a-Custom-Sample-Data-Module-for-Magento-2.jpg","width":770,"height":433,"caption":"How to Develop a Custom Sample Data Module for Magento 2"},"datePublished":"2018-03-06T15:11:09+02:00","dateModified":"2019-09-30T15:55:14+02:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html#webpage"},"articleSection":"Magento, Magento 2 Development, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.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\/custom-sample-data-module-magento-2.html#listItem","name":"How to Develop a Custom Sample Data Module for Magento 2"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html#listItem","position":3,"name":"How to Develop a Custom Sample Data Module for Magento 2","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\/alex-simonchik#author","url":"https:\/\/belvg.com\/blog\/author\/alex-simonchik","name":"Aliaksandr Simonchik","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/6553917a81b1da7866b8b875368df6cbbec56413c3438694df8539de7fb092c0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Aliaksandr Simonchik"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html#webpage","url":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html","name":"How to Develop a Custom Sample Data Module for Magento 2 | BelVG Blog","description":"Today we\u2019re going to discuss designing Sample Data module to create data for Belvg_WelcomeAgreement demo module.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/alex-simonchik#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/alex-simonchik#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/03\/How-to-Develop-a-Custom-Sample-Data-Module-for-Magento-2.jpg","@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html\/#mainImage","width":770,"height":433,"caption":"How to Develop a Custom Sample Data Module for Magento 2"},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html#mainImage"},"datePublished":"2018-03-06T15:11:09+02:00","dateModified":"2019-09-30T15:55:14+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":"15196","title":"How to Develop a Custom Sample Data Module for Magento 2  | #site_title","description":"Today we\u2019re going to discuss designing Sample Data module to create data for Belvg_WelcomeAgreement demo module.","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:37:11","updated":"2026-11-03 18:37:11"},"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\tHow to Develop a Custom Sample Data Module for Magento 2\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":"How to Develop a Custom Sample Data Module for Magento 2","link":"https:\/\/belvg.com\/blog\/custom-sample-data-module-magento-2.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/15196","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\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=15196"}],"version-history":[{"count":0,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/15196\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/15200"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=15196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=15196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=15196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}