https://magento2.atlassian.net/wiki/display/m1wiki/Magento+1.x+Events+Reference The following is a list of many Magento Community Edition events with module and parameters. Note that some events are dispatched with dynamically-calculated names, so this list is and always will be “incomplete”. At the bottom there is example of using...
Day: June 10, 2016
Declaring Observers in Magento 2.0 (Updated)
Registration and creation of observers in Magento 2.x is a bit different from the version 1.x. a separate events.xml file is used for registering observers; the scope of the observer is defined not by the xml node, but by the...
Magento 2 upgradeschema script
<?php namespace MagePal\TestDiscount\Setup; use Magento\Framework\Setup\UpgradeSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; class UpgradeSchema implements UpgradeSchemaInterface { public function upgrade(SchemaSetupInterface $setup,ModuleContextInterface $context){ $setup->startSetup(); if (version_compare($context->getVersion(), '1.0.2') < 0||version_compare($context->getVersion(), '1.0.3') < 0||version_compare($context->getVersion(), '1.0.4') < 0 ||version_compare($context->getVersion(), '1.0.5') < 0 ) { // Get module...