{"id":1659,"date":"2020-04-01T15:25:40","date_gmt":"2020-04-01T15:25:40","guid":{"rendered":"https:\/\/www.magetop.com\/blog\/?p=1659"},"modified":"2021-07-22T02:56:30","modified_gmt":"2021-07-22T02:56:30","slug":"how-to-use-helper-and-setting-in-magento","status":"publish","type":"post","link":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/","title":{"rendered":"How To Use Helper And Setting In Magento 2"},"content":{"rendered":"\n<p>I have introduced <a rel=\"noreferrer noopener\" href=\"https:\/\/www.magetop.com\/blog\/how-to-get-items-to-storefront-magento\/\" target=\"_blank\">How To Get Items To Storefront In Magento 2<\/a> in the previous lesson. In this lesson, I will introduce you to How To Use Helper And Setting In Magento 2.<\/p>\n\n\n\n<p>This lesson is very important, you will need to use it a lot. You should read the Magento 2 Extension Tutorial step by step to be able to understand this lesson.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Module File Structure<\/h2>\n\n\n\n<p>We updated our module file structure looks as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"545\" data-attachment-id=\"1680\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/helper-and-system-file-structure\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/helper-and-system-file-structure.png?fit=446%2C545&amp;ssl=1\" data-orig-size=\"446,545\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"helper-and-system-file-structure\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/helper-and-system-file-structure.png?fit=246%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/helper-and-system-file-structure.png?fit=446%2C545&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/helper-and-system-file-structure.png?resize=446%2C545&#038;ssl=1\" alt=\"helper and system file structure\" class=\"wp-image-1680\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/helper-and-system-file-structure.png?w=446&amp;ssl=1 446w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/helper-and-system-file-structure.png?resize=246%2C300&amp;ssl=1 246w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to use Helper<\/h2>\n\n\n\n<p>First, create Data.php with the following path: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?php\nnamespace Magetop\\Helloworld\\Helper;\n\nuse Magento\\Framework\\App\\Helper\\AbstractHelper;\nuse Magento\\Framework\\App\\Helper\\Context;\n\nclass Data extends AbstractHelper\n{\n    public function __construct(Context $context)\n    {\n        parent::__construct($context);\n    }\n\n    function checkDate($date = '')\n    {\n        $ok = false;\n        if($date != '')\n        {\n            $day = date('w', strtotime($date));\n            if($day == 0)\n                $ok = true;\n        }\n        return $ok;\n    }\n}\n<\/pre><\/div>\n\n\n<p>Next, edit Index.php in the Controller.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?php\nnamespace Magetop\\Helloworld\\Controller\\Index;\n\nuse Magento\\Framework\\App\\Action\\Context;\nuse Magetop\\Helloworld\\Model\\ResourceModel\\Posts\\CollectionFactory;\nuse Magetop\\Helloworld\\Helper\\Data;\n\nclass Index extends \\Magento\\Framework\\App\\Action\\Action\n{\n    protected $_resultPageFactory;\n    protected $_postsFactory;\n    protected $_dataHelper;\n\n    public function __construct(\n        Context $context,\n        \\Magento\\Framework\\View\\Result\\PageFactory $resultPageFactory,\n        CollectionFactory $postsFactory,\n        Data $dataHelper)\n    {\n        parent::__construct($context);\n        $this-&gt;_resultPageFactory = $resultPageFactory;\n        $this-&gt;_postsFactory = $postsFactory;\n        $this-&gt;_dataHelper = $dataHelper;\n    }\n\n    public function execute()\n    {\n        echo &quot;Get Data From magetop_blog table&quot;;\n        $this-&gt;_postsFactory-&gt;create();\n        $collection = $this-&gt;_postsFactory-&gt;create()\n            -&gt;addFieldToSelect(array('title', 'description', 'created_at', 'status'))\n            -&gt;addFieldToFilter('status', 1)\n            -&gt;setPageSize(10);\n        echo '&lt;pre&gt;';\n        print_r($collection-&gt;getData());\n        echo '&lt;pre&gt;';\n        echo &quot;========== Check date, helper function ======== &lt;br&gt;&quot;;\n        $date = '2020-04-01';\n        if ($this-&gt;_dataHelper-&gt;checkDate($date)) {\n            echo &quot;Yes, {$date} is Sunday , I can go to your home&quot;;\n        } else {\n            echo &quot;Yes, {$date} is not Sunday , I was to busy&quot;;\n        }\n    }\n}\n<\/pre><\/div>\n\n\n<p>Clear cache and check it in <code>&lt;yourdomain&gt;\/helloworld\/index\/index<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1278\" height=\"726\" data-attachment-id=\"1676\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/getdata-use-helper\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Getdata-use-helper.png?fit=1278%2C726&amp;ssl=1\" data-orig-size=\"1278,726\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Getdata-use-helper\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Getdata-use-helper.png?fit=300%2C170&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Getdata-use-helper.png?fit=800%2C455&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Getdata-use-helper.png?fit=800%2C455&amp;ssl=1\" alt=\"Get Data using Data Helper\" class=\"wp-image-1676\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Getdata-use-helper.png?w=1278&amp;ssl=1 1278w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Getdata-use-helper.png?resize=300%2C170&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Getdata-use-helper.png?resize=1024%2C582&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Getdata-use-helper.png?resize=768%2C436&amp;ssl=1 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to use Setting<\/h2>\n\n\n\n<p>The setting is very important in an extension because it helps the admin can configure data for the extension.<\/p>\n\n\n\n<p>Create file system.xml in Magetop\/Helloworld\/etc\/adminhtml\/system.xml.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;!--\n\/**\n * system\n *\n * @copyright Copyright \u00a9 2020 Magetop. All rights reserved.\n * @author    info@magetop.com\n *\/\n--&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:module:Magento_Config:etc\/system_file.xsd&quot;&gt;\n    &lt;system&gt;\n        &lt;tab id=&quot;magetop_helloworld&quot; translate=&quot;label&quot; sortOrder=&quot;1&quot;&gt;\n            &lt;label&gt;Magetop&lt;\/label&gt;\n        &lt;\/tab&gt;\n        &lt;section id=&quot;blog&quot; translate=&quot;label&quot; sortOrder=&quot;1&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n            &lt;label&gt;Magetop Helloworld&lt;\/label&gt;\n            &lt;tab&gt;magetop_helloworld&lt;\/tab&gt;\n            &lt;resource&gt;Magetop_Helloworld::system_config&lt;\/resource&gt;\n            &lt;group id=&quot;setting&quot; translate=&quot;label&quot; type=&quot;text&quot; sortOrder=&quot;2&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n                &lt;label&gt;General Settings&lt;\/label&gt;\n                &lt;field id=&quot;enable&quot; translate=&quot;label&quot; type=&quot;select&quot; sortOrder=&quot;2&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n                    &lt;label&gt;Enable&lt;\/label&gt;\n                    &lt;source_model&gt;Magento\\Config\\Model\\Config\\Source\\Yesno&lt;\/source_model&gt;\n                &lt;\/field&gt;\n                &lt;field id=&quot;number_posts&quot; translate=&quot;label comment&quot; type=&quot;text&quot; sortOrder=&quot;5&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n                    &lt;label&gt;Number Posts&lt;\/label&gt;\n                    &lt;comment&gt;Number Posts&lt;\/comment&gt;\n                    &lt;validate&gt;required-entry&lt;\/validate&gt;\n                &lt;\/field&gt;\n            &lt;\/group&gt;\n        &lt;\/section&gt;\n    &lt;\/system&gt;\n&lt;\/config&gt;\n<\/pre><\/div>\n\n\n<p>You run two commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:upgrade\nphp bin\/magento setup:static-content:deploy -f<\/code><\/pre>\n\n\n\n<p>Go to Magento Admin Panel &gt; STORES &gt; Configuration in Settings section.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1906\" height=\"938\" data-attachment-id=\"1677\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/configuration-in-backend\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?fit=1906%2C938&amp;ssl=1\" data-orig-size=\"1906,938\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Configuration-in-Backend\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?fit=300%2C148&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?fit=800%2C394&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?fit=800%2C394&amp;ssl=1\" alt=\"Configuration in Magento Backend\" class=\"wp-image-1677\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?w=1906&amp;ssl=1 1906w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?resize=300%2C148&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?resize=1024%2C504&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?resize=768%2C378&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?resize=1536%2C756&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Configuration-in-Backend.png?w=1600&amp;ssl=1 1600w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1904\" height=\"938\" data-attachment-id=\"1678\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/config-value-in-backend\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?fit=1904%2C938&amp;ssl=1\" data-orig-size=\"1904,938\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Config-Value-in-Backend\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?fit=300%2C148&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?fit=800%2C394&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?fit=800%2C394&amp;ssl=1\" alt=\"Config Value In Magento Backend\" class=\"wp-image-1678\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?w=1904&amp;ssl=1 1904w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?resize=300%2C148&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?resize=1024%2C504&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?resize=768%2C378&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?resize=1536%2C757&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Config-Value-in-Backend.png?w=1600&amp;ssl=1 1600w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>You need to edit Data.php in Helper.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?php\nnamespace Magetop\\Helloworld\\Helper;\n\nuse Magento\\Framework\\App\\Helper\\AbstractHelper;\nuse Magento\\Framework\\App\\Helper\\Context;\nuse Magento\\Store\\Model\\ScopeInterface;\n\nclass Data extends AbstractHelper\n{\n    public function __construct(Context $context)\n    {\n        parent::__construct($context);\n    }\n\n    function checkDate($date = '')\n    {\n        $ok = false;\n        if($date != '')\n        {\n            $day = date('w', strtotime($date));\n            if($day == 0)\n                $ok = true;\n        }\n        return $ok;\n    }\n    \/**\n     * @param string $path\n     * @return mixed\n     *\/\n    function getHelloSetting($path = '')\n    {\n        return $this-&gt;scopeConfig-&gt;getValue($path,ScopeInterface::SCOPE_STORE);\n    }\n}\n<\/pre><\/div>\n\n\n<p>And call the new function in Controller, you can edit the file.<\/p>\n\n\n\n<p>Edit Index.php in the Controller.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?php\nnamespace Magetop\\Helloworld\\Controller\\Index;\n\nuse Magento\\Framework\\App\\Action\\Context;\nuse Magetop\\Helloworld\\Model\\ResourceModel\\Posts\\CollectionFactory;\nuse Magetop\\Helloworld\\Helper\\Data;\n\nclass Index extends \\Magento\\Framework\\App\\Action\\Action\n{\n    protected $_resultPageFactory;\n    protected $_postsFactory;\n    protected $_dataHelper;\n\n    public function __construct(\n        Context $context,\n        \\Magento\\Framework\\View\\Result\\PageFactory $resultPageFactory,\n        CollectionFactory $postsFactory,\n        Data $dataHelper)\n    {\n        parent::__construct($context);\n        $this-&gt;_resultPageFactory = $resultPageFactory;\n        $this-&gt;_postsFactory = $postsFactory;\n        $this-&gt;_dataHelper = $dataHelper;\n    }\n\n    public function execute()\n    {\n        echo &quot;Get Data From magetop_blog table &lt;br&gt;&quot;;\n        $numberPosts = $this-&gt;_dataHelper-&gt;getHelloSetting('blog\/setting\/number_posts');\n        echo &quot;Number Posts = {$numberPosts}&quot;;\n        $this-&gt;_postsFactory-&gt;create();\n        $collection = $this-&gt;_postsFactory-&gt;create()\n            -&gt;addFieldToSelect(array('title','description','created_at','status')) \/\/ fields to select\n            -&gt;addFieldToFilter('status',1) \/\/ filter status = 1\n            -&gt;setPageSize($numberPosts); \/\/ get 2 items\n        echo '&lt;pre&gt;';\n        print_r($collection-&gt;getData());\n        echo '&lt;pre&gt;';\n        echo &quot;==========Check date, helper function ======== &lt;br&gt;&quot;;\n        $date = '2020-04-01';\n        if ($this-&gt;_dataHelper-&gt;checkDate($date)) {\n            echo &quot;Yes, {$date} is Sunday , I can go to your home&quot;;\n        } else {\n            echo &quot;Yes, {$date} is not Sunday , I was to busy&quot;;\n        }\n    }\n}\n<\/pre><\/div>\n\n\n<p>Then, you can see it in <code>&lt;yourdomain&gt;\/helloworld\/index\/index<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1273\" height=\"431\" data-attachment-id=\"1679\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/check-it-after-config-value-in-backend\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Check-it-after-config-value-in-backend.png?fit=1273%2C431&amp;ssl=1\" data-orig-size=\"1273,431\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Check-it-after-config-value-in-backend\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Check-it-after-config-value-in-backend.png?fit=300%2C102&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Check-it-after-config-value-in-backend.png?fit=800%2C271&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Check-it-after-config-value-in-backend.png?fit=800%2C271&amp;ssl=1\" alt=\"Check it after config value in backend\" class=\"wp-image-1679\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Check-it-after-config-value-in-backend.png?w=1273&amp;ssl=1 1273w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Check-it-after-config-value-in-backend.png?resize=300%2C102&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Check-it-after-config-value-in-backend.png?resize=1024%2C347&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Check-it-after-config-value-in-backend.png?resize=768%2C260&amp;ssl=1 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>I hope through this series you can create your own complete module. Good luck!<\/p>\n\n\n\n<p>In addition to How To Use Helper And Setting In Magento 2, you can read the articles <a href=\"https:\/\/www.magetop.com\/blog\/how-to-use-event-in-magento-2\/\">How To Use Event In Magento 2<\/a>.<\/p>\n\n\n\n<p>Follow us for the more helpful article!<\/p>\n\n\n\n<p>We hope this is a useful series for you.<\/p>\n\n\n\n<p>Thank you for reading!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have introduced How To Get Items To Storefront In Magento 2 in the previous lesson. In this lesson, I will introduce you to How To Use Helper And Setting In Magento 2.<br \/>\nThis lesson is very important, you will need to use it a lot. You should read the Magento 2 Extension Tutorial step by step to be able to understand this lesson.<\/p>\n","protected":false},"author":106,"featured_media":1745,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[350,348,349,347,107],"class_list":["post-1659","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento-2-tutorials","tag-create-configuration-magento-2","tag-how-to-create-a-helper-in-magento-2","tag-how-to-create-system-configuration-in-magento-2","tag-how-to-use-helper-and-setting-in-magento-2","tag-magento-2-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Use Helper And Setting In Magento 2 - Magetop Blog<\/title>\n<meta name=\"description\" content=\"In this lesson, I will introduce you to How To Use Helper And Setting In Magento 2. This lesson is very important, you will need to use it a lot.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Use Helper And Setting In Magento 2 - Magetop Blog\" \/>\n<meta property=\"og:description\" content=\"In this lesson, I will introduce you to How To Use Helper And Setting In Magento 2. This lesson is very important, you will need to use it a lot.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/\" \/>\n<meta property=\"og:site_name\" content=\"Magetop Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MagetopStore\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-01T15:25:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-22T02:56:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i1.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"445\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Aaron LX\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:site\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aaron LX\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/\"},\"author\":{\"name\":\"Aaron LX\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7\"},\"headline\":\"How To Use Helper And Setting In Magento 2\",\"datePublished\":\"2020-04-01T15:25:40+00:00\",\"dateModified\":\"2021-07-22T02:56:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/\"},\"wordCount\":244,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1\",\"keywords\":[\"Create configuration Magento 2\",\"How to Create a Helper in Magento 2\",\"how to create system configuration in magento 2\",\"How To Use Helper And Setting In Magento 2\",\"magento 2 tutorials\"],\"articleSection\":[\"Magento 2 Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/\",\"url\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/\",\"name\":\"How To Use Helper And Setting In Magento 2 - Magetop Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1\",\"datePublished\":\"2020-04-01T15:25:40+00:00\",\"dateModified\":\"2021-07-22T02:56:30+00:00\",\"description\":\"In this lesson, I will introduce you to How To Use Helper And Setting In Magento 2. This lesson is very important, you will need to use it a lot.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1\",\"width\":750,\"height\":445,\"caption\":\"Magento 2 How To Use Hepler And Setting\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.magetop.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Use Helper And Setting In Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"name\":\"Magetop Blog\",\"description\":\"Exploring Magento Tips, Tricks, and Trends\",\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.magetop.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\",\"name\":\"Magetop.com\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"width\":475,\"height\":475,\"caption\":\"Magetop.com\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/MagetopStore\",\"https:\/\/x.com\/MagetopStore\",\"https:\/\/www.linkedin.com\/company\/magetop\",\"https:\/\/www.pinterest.com\/magetop\",\"https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7\",\"name\":\"Aaron LX\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1\",\"caption\":\"Aaron LX\"},\"description\":\"Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.\",\"url\":\"https:\/\/www.magetop.com\/blog\/author\/aaron-lx\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Use Helper And Setting In Magento 2 - Magetop Blog","description":"In this lesson, I will introduce you to How To Use Helper And Setting In Magento 2. This lesson is very important, you will need to use it a lot.","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:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/","og_locale":"en_US","og_type":"article","og_title":"How To Use Helper And Setting In Magento 2 - Magetop Blog","og_description":"In this lesson, I will introduce you to How To Use Helper And Setting In Magento 2. This lesson is very important, you will need to use it a lot.","og_url":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/","og_site_name":"Magetop Blog","article_publisher":"https:\/\/www.facebook.com\/MagetopStore","article_published_time":"2020-04-01T15:25:40+00:00","article_modified_time":"2021-07-22T02:56:30+00:00","og_image":[{"width":750,"height":445,"url":"https:\/\/i1.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1","type":"image\/png"}],"author":"Aaron LX","twitter_card":"summary_large_image","twitter_creator":"@MagetopStore","twitter_site":"@MagetopStore","twitter_misc":{"Written by":"Aaron LX","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#article","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/"},"author":{"name":"Aaron LX","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7"},"headline":"How To Use Helper And Setting In Magento 2","datePublished":"2020-04-01T15:25:40+00:00","dateModified":"2021-07-22T02:56:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/"},"wordCount":244,"commentCount":0,"publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1","keywords":["Create configuration Magento 2","How to Create a Helper in Magento 2","how to create system configuration in magento 2","How To Use Helper And Setting In Magento 2","magento 2 tutorials"],"articleSection":["Magento 2 Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/","url":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/","name":"How To Use Helper And Setting In Magento 2 - Magetop Blog","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#primaryimage"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1","datePublished":"2020-04-01T15:25:40+00:00","dateModified":"2021-07-22T02:56:30+00:00","description":"In this lesson, I will introduce you to How To Use Helper And Setting In Magento 2. This lesson is very important, you will need to use it a lot.","breadcrumb":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#primaryimage","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1","width":750,"height":445,"caption":"Magento 2 How To Use Hepler And Setting"},{"@type":"BreadcrumbList","@id":"https:\/\/www.magetop.com\/blog\/how-to-use-helper-and-setting-in-magento\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.magetop.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Use Helper And Setting In Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/www.magetop.com\/blog\/#website","url":"https:\/\/www.magetop.com\/blog\/","name":"Magetop Blog","description":"Exploring Magento Tips, Tricks, and Trends","publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.magetop.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.magetop.com\/blog\/#organization","name":"Magetop.com","url":"https:\/\/www.magetop.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","width":475,"height":475,"caption":"Magetop.com"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MagetopStore","https:\/\/x.com\/MagetopStore","https:\/\/www.linkedin.com\/company\/magetop","https:\/\/www.pinterest.com\/magetop","https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA"]},{"@type":"Person","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7","name":"Aaron LX","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1","caption":"Aaron LX"},"description":"Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.","url":"https:\/\/www.magetop.com\/blog\/author\/aaron-lx\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Hepler-And-Setting.png?fit=750%2C445&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/paOdw5-qL","jetpack-related-posts":[{"id":1402,"url":"https:\/\/www.magetop.com\/blog\/magento-2-extension-tutorial\/","url_meta":{"origin":1659,"position":0},"title":"Magento 2 Extension Tutorial","author":"Aaron LX","date":"February 15, 2020","format":false,"excerpt":"Magento 2 is an open-source platform that allows you can create a module for yourself. And those modules can extend functions for the Magento store. And in this article, I will introduce to Magento 2 Extension Tutorial.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magetop Extension Tutorial","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/02\/Extension-Tutorial.jpg?fit=750%2C455&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/02\/Extension-Tutorial.jpg?fit=750%2C455&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/02\/Extension-Tutorial.jpg?fit=750%2C455&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/02\/Extension-Tutorial.jpg?fit=750%2C455&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1664,"url":"https:\/\/www.magetop.com\/blog\/how-to-get-items-to-storefront-magento\/","url_meta":{"origin":1659,"position":1},"title":"How To Get Items To Storefront In Magento 2","author":"Aaron LX","date":"April 1, 2020","format":false,"excerpt":"In the previous lesson, we learned together How To Use Model In Magento 2. Continuing that lesson, I will introduce How To Get Items To Storefront In Magento 2. You should read the Magento 2 Extension Tutorial step by step to be able to understand this lesson.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 How To Get Items To Storefront","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Get-Items-To-Storefront.png?fit=813%2C450&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Get-Items-To-Storefront.png?fit=813%2C450&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Get-Items-To-Storefront.png?fit=813%2C450&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Get-Items-To-Storefront.png?fit=813%2C450&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1458,"url":"https:\/\/www.magetop.com\/blog\/magento-2-folder-structure\/","url_meta":{"origin":1659,"position":2},"title":"Magento 2 Folder Structure","author":"Aaron LX","date":"March 6, 2020","format":false,"excerpt":"In the first lesson, I want to introduce to you the folder structure of Magento 2 and the function of each of those directories. This is a very important lesson in this series. If you know the functions of each of these folders, it will become easier to absorb the\u2026","rel":"","context":"In &quot;Magento 2 Knowledge Base&quot;","block_context":{"text":"Magento 2 Knowledge Base","link":"https:\/\/www.magetop.com\/blog\/magento-2-knowledge-base\/"},"img":{"alt_text":"Magento 2 Folder Structure","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/03\/Magento-2-Folder-Structure.png?fit=638%2C384&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/03\/Magento-2-Folder-Structure.png?fit=638%2C384&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/03\/Magento-2-Folder-Structure.png?fit=638%2C384&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1651,"url":"https:\/\/www.magetop.com\/blog\/how-to-use-event-in-magento-2\/","url_meta":{"origin":1659,"position":3},"title":"How To Use Event In Magento 2","author":"Aaron LX","date":"April 1, 2020","format":false,"excerpt":"In the previous article, we learned How To Use Helper And Setting In Magento 2. Following the previous tutorial, we will learn about How To Use Event in Magento 2. This is a very basic tutorial but it is very important.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 How To Use Event","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Event.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Event.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Event.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Event.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1098,"url":"https:\/\/www.magetop.com\/blog\/how-to-get-store-config-value-in-magento-2\/","url_meta":{"origin":1659,"position":4},"title":"How To Get Store Config Value In Magento 2","author":"Adam Roger","date":"January 6, 2020","format":false,"excerpt":"In the previous article, we learned about How To Create Simple Module To Configure Options For Theme In Magento 2. Today, we will introduce you about How To Get Store Config Value In Magento 2.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"How To Get Store Config Value M2","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/How-To-Get-Store-Config-Value.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/How-To-Get-Store-Config-Value.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/How-To-Get-Store-Config-Value.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/01\/How-To-Get-Store-Config-Value.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1640,"url":"https:\/\/www.magetop.com\/blog\/how-to-use-model-in-magento-2\/","url_meta":{"origin":1659,"position":5},"title":"How To Use Model In Magento 2","author":"Aaron LX","date":"April 1, 2020","format":false,"excerpt":"In this tutorial, we will learn about How To Use Model in Magento 2. This is a basic tutorial followed by How To Create Database Table in Magento 2. You should see the previous article to understand this lesson.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 How To Use Model","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Model.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Model.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Model.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Model.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/users\/106"}],"replies":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/comments?post=1659"}],"version-history":[{"count":6,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1659\/revisions"}],"predecessor-version":[{"id":2375,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1659\/revisions\/2375"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media\/1745"}],"wp:attachment":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media?parent=1659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/categories?post=1659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/tags?post=1659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}