{"id":431,"date":"2015-04-17T12:04:32","date_gmt":"2015-04-17T11:04:32","guid":{"rendered":"http:\/\/dknzdesign.com\/?p=431"},"modified":"2015-04-17T12:11:53","modified_gmt":"2015-04-17T11:11:53","slug":"magento-certification-basics-codepools","status":"publish","type":"post","link":"https:\/\/dknzdesign.com\/de\/blog\/magento\/magento-certification-basics-codepools\/","title":{"rendered":"Magento-Zertifizierung: Grundlagen \u2013 Codepools"},"content":{"rendered":"<p>In order to go through all of these questions, the best place to start is obviously the beginning. There\u2019s a lot of material to cover but I think by answering at least one of the questions a day I\u2019ll be able to learn a whole lot about Magento. Piece by piece we\u2019ll crack this bad boy open. First up in the Magento Certification Study Guide \u2014 The Basics. We need to describe the codepools in detail. Here\u2019s the question from the guide:<\/p>\n<p><a href=\"http:\/\/dknzdesign.com\/wp-content\/uploads\/2015\/04\/codepool.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-432 aligncenter\" src=\"http:\/\/dknzdesign.com\/wp-content\/uploads\/2015\/04\/codepool.png\" alt=\"codepool\" width=\"294\" height=\"264\" \/><\/a><\/p>\n<p><strong>Describe Magento Codepools<\/strong><\/p>\n<p>Magento has three different codepools:<\/p>\n<ul>\n<li>Community<\/li>\n<li>Core<\/li>\n<li>Local<\/li>\n<\/ul>\n<p><strong>Core<\/strong><br \/>\nThe Core Codepool is where all the magic happens; this folder contains all of the base classes where Magento gets its flexibility and functionality from. As a good rule of thumb, this folder belongs to the Core Developers only. Any functionality you need to add can generally be added by rewriting or extending the classes and their methods.<\/p>\n<p><strong>Community<\/strong><br \/>\nThis codepool belongs to all of the Community Developers and third-party modules, including those that can be downloaded from Magento Connect. Essentially if you\u2019re installing any modules, 9 times ouf of 10 you\u2019ll end up installing them in this codepool.<\/p>\n<p><strong>Local<\/strong><br \/>\nAny other kind of modification, added functionality or core\/community override being added to the site you\u2019re working will end up in this codepool. If you\u2019re making changes to just a specific site, those will end up here, too. The local codepool gets loaded first; this allows you to easily change anything instantiated in the Community or Core Codepool.<\/p>\n<p><strong>How does the framework interact with the various codepools?<\/strong><\/p>\n<p>To identify the proccess let\u2019s take a look at app\/Mage.php<\/p>\n<pre>\/**\r\n* Set include path\r\n*\/\r\n$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';\r\n$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';\r\n$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';\r\n$paths[] = BP . DS . 'lib';\r\n\r\n$appPath = implode(PS, $paths);\r\nset_include_path($appPath . PS . Mage::registry('original_include_path'));\r\ninclude_once \"Mage\/Core\/functions.php\";\r\ninclude_once \"Varien\/Autoload.php\";<\/pre>\n<p>This code shows the order Magento is using to include code pool&#8217;s paths \u2013 First it includes Local code pool, than community and after that \u2013 core, which allow developers to override classes without changing core files.<\/p>","protected":false},"excerpt":{"rendered":"<p>Um all diese Fragen durchzugehen, ist der beste Ausgangspunkt nat\u00fcrlich der Anfang. Es gibt eine Menge Material zu behandeln, aber ich denke, wenn ich jeden Tag mindestens eine der Fragen beantworte, werde ich in der Lage sein, eine Menge \u00fcber Magento zu lernen. St\u00fcck f\u00fcr St\u00fcck knacken wir dieses \u00dcbel\u2026<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[76,77,78,43,75,79],"class_list":["post-431","post","type-post","status-publish","format-standard","hentry","category-magento","tag-certificate","tag-certification","tag-codepools","tag-magento","tag-magento-codepool","tag-study-guide"],"_links":{"self":[{"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/posts\/431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/comments?post=431"}],"version-history":[{"count":4,"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/posts\/431\/revisions"}],"predecessor-version":[{"id":436,"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/posts\/431\/revisions\/436"}],"wp:attachment":[{"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/media?parent=431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/categories?post=431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dknzdesign.com\/de\/wp-json\/wp\/v2\/tags?post=431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}