Wednesday, April 15, 2020

Add custom tab in logged user account in magento 2

Hello All,

Today I saw you How to create custom tab in logged in user account in magento 2.

Custom tab will display like this:



app\code\Chirag\Customproduct\registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Chirag_Customproduct',
    __DIR__
);


app\code\Chirag\Customproduct\etc\module.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Chirag_Customproduct" setup_version="1.0.0" >
<sequence>
        <module name="Magento_Customer"/>
    </sequence>
</module>
</config>


app\code\Chirag\Customproduct\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Model\Order\Pdf\Invoice"
                type="Czargroup\Pdfinvoice\Model\Order\Pdf\Invoice"/>
</config>


app\code\Chirag\Customproduct\etc\frontend\routes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="customproduct" frontName="customproduct">
            <module name="Chirag_Customproduct" />
        </route>
    </router>
</config>


app\code\Chirag\Customproduct\Controller\Customer\Index.php

<?php
namespace Chirag\Customproduct\Controller\Customer; 
class Index extends \Magento\Framework\App\Action\Action {
 
 public function execute() {
 
    $this->_view->loadLayout();
    $this->_view->renderLayout();
  }
 
}
?> 


app\code\Chirag\Customproduct\view\frontend\layout\customer_account.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
      <referenceBlock name="customer_account_navigation">
         <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-customproduct">
            <arguments>
               <argument name="path" xsi:type="string">customproduct/customer/index</argument>
               <argument name="label" xsi:type="string">Custom Product</argument>
            </arguments>
         </block>
      </referenceBlock>
   </body>
</page> 


app\code\Chirag\Customproduct\view\frontend\layout\customproduct_customer_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
<body>
    <referenceBlock name="page.main.title">
            <action method="setPageTitle">
                <argument translate="true" name="title" xsi:type="string">Custom Product</argument>
            </action>
     </referenceBlock>
     <referenceContainer name="content">
        <block class="Magento\Framework\View\Element\Template" name="customproduct" template="Chirag_Customproduct::customproduct.phtml">
        </block>
    </referenceContainer>
</body>
</page>   


app\code\Chirag\Customproduct\view\frontend\templates\customproduct.phtml

<?php
 // Add Some Code Here 
echo "This is custom Product List";
?> 


Tuesday, April 14, 2020

Add footer and change label in PDF Invoice in magento 2

Hello

Today I saw you how to change label and add footer to PDF Invoice.

For doing this, we have to make module and override invoice file.

Create extension like this.

app/code/Czargroup/Pdfinvoice/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Czargroup_Pdfinvoice',
    __DIR__
);


app/code/Czargroup/Pdfinvoice/etc/module.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Czargroup_Pdfinvoice" setup_version="1.0.0" />
</config>


app/code/Czargroup/Pdfinvoice/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Model\Order\Pdf\Invoice"
                type="Czargroup\Pdfinvoice\Model\Order\Pdf\Invoice"/>
</config>


app/code/Czargroup/Pdfinvoice/Model/Order/Pdf/Invoice.php

<?php
namespace Czargroup\Pdfinvoice\Model\Order\Pdf;

class Invoice extends \Magento\Sales\Model\Order\Pdf\Invoice
{
  
    /**
     * Draw header for item table
     *
     * @param \Zend_Pdf_Page $page
     * @return void
     */
    protected function _drawHeader(\Zend_Pdf_Page $page)
    {
        /* Add table head */
        $this->_setFontRegular($page, 10);
        $page->setFillColor(new \Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));
        $page->setLineColor(new \Zend_Pdf_Color_GrayScale(0.5));
        $page->setLineWidth(0.5);
        $page->drawRectangle(25, $this->y, 570, $this->y - 15);
        $this->y -= 10;
        $page->setFillColor(new \Zend_Pdf_Color_Rgb(0, 0, 0));

        //columns headers
        $lines[0][] = ['text' => __('Products'), 'feed' => 35];

        $lines[0][] = ['text' => __('SKU'), 'feed' => 290, 'align' => 'right'];

        $lines[0][] = ['text' => __('Qty'), 'feed' => 435, 'align' => 'right'];

        $lines[0][] = ['text' => __('Price'), 'feed' => 360, 'align' => 'right'];

        $lines[0][] = ['text' => __('VAT'), 'feed' => 495, 'align' => 'right'];

        $lines[0][] = ['text' => __('Subtotal'), 'feed' => 565, 'align' => 'right'];

        $lineBlock = ['lines' => $lines, 'height' => 5];

        $this->drawLineBlocks($page, [$lineBlock], ['table_header' => true]);
        $page->setFillColor(new \Zend_Pdf_Color_GrayScale(0));
        $this->y -= 20;
    }

    /**
     * Return PDF document
     *
     * @param array|Collection $invoices
     * @return \Zend_Pdf
     */
    public function getPdf($invoices = [])
    {
        $this->_beforeGetPdf();
        $this->_initRenderer('invoice');

        $pdf = new \Zend_Pdf();
        $this->_setPdf($pdf);
        $style = new \Zend_Pdf_Style();
        $this->_setFontBold($style, 10);

        foreach ($invoices as $invoice) {
            if ($invoice->getStoreId()) {
                $this->_localeResolver->emulate($invoice->getStoreId());
                $this->_storeManager->setCurrentStore($invoice->getStoreId());
            }
            $page = $this->newPage();
            $order = $invoice->getOrder();
            /* Add image */
            $this->insertLogo($page, $invoice->getStore());
            /* Add address */
            $this->insertAddress($page, $invoice->getStore());
            /* Add head */
            $this->insertOrder(
                $page,
                $order,
                $this->_scopeConfig->isSetFlag(
                    self::XML_PATH_SALES_PDF_INVOICE_PUT_ORDER_ID,
                    \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
                    $order->getStoreId()
                )
            );
            /* Add document text and number */
            $this->insertDocumentNumber($page, __('Invoice # ') . $invoice->getIncrementId());
            /* Add table */
            $this->_drawHeader($page);
            /* Add body */
            foreach ($invoice->getAllItems() as $item) {
                if ($item->getOrderItem()->getParentItem()) {
                    continue;
                }
                /* Draw item */
                $this->_drawItem($item, $page, $order);
                $page = end($pdf->pages);
            }
            /* Add totals */
            $this->insertTotals($page, $invoice);
            if ($invoice->getStoreId()) {
                $this->_localeResolver->revert();
            }
        }
        $this->_drawFooter($page); // the custom text is added here
        $this->_afterGetPdf();
        return $pdf;
    }

    /**
     * Create new page and assign to PDF object
     *
     * @param  array $settings
     * @return \Zend_Pdf_Page
     */
    public function newPage(array $settings = [])
    {
        /* Add new table head */
        $page = $this->_getPdf()->newPage(\Zend_Pdf_Page::SIZE_A4);
        $this->_getPdf()->pages[] = $page;
        $this->y = 800;
        if (!empty($settings['table_header'])) {
            $this->_drawHeader($page);
        }
        return $page;
    }
    public function _drawFooter(\Zend_Pdf_Page $page)
        {
            $this->y =50;    
            //$page->setFillColor(new \Zend_Pdf_Color_RGB(1, 1, 1));
            $page->setFillColor(new \Zend_Pdf_Color_GrayScale(0));
            //$page->setLineWidth(0.5);
            //$page->drawRectangle(60, $this->y, 510, $this->y -30);

            $page->setFillColor(new \Zend_Pdf_Color_RGB(0.1, 0.1, 0.1));
            $page->setFont(\Zend_Pdf_Font::fontWithName(\Zend_Pdf_Font::FONT_HELVETICA), 11);
            //$this->y -=0;
            $page->drawText("OutdoorLivingUK Products Ltd, Unit C Oaklea House, Limesquare Estate, Peterborough PE3 8YQ", 70, $this->y, 'UTF-8');
            $this->y -=15;
            $page->drawText("Company Reg 07807363", 70, $this->y, 'UTF-8');
            //$page->drawText("Tel: +123 456 676", 230, $this->y, 'UTF-8');
            $page->drawText("VAT 169691651", 470, $this->y, 'UTF-8');
        }
}

It will display result like this:

Monday, April 13, 2020

Add custom tab to product page in maagento 2

Hello

Today I saw you how to add custom tab to product view page in magento 2.


Now create attribute from admin side.
Admin-> Store-> Attribute -> Product
Create a new attribute like this.
Now save it and assign to Attribute set.
Go to product add/edit page and give some value or text to that input box.

Go to your product override path like this :
/public_html/app/design/frontend/Companyname/Themename/Magento_Catalog/layout/catalog_product_view.xml

Write this :

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="Magento_Catalog::js/slick/slick-theme.css"/>
        <css src="Magento_Catalog::js/slick/slick.css"/>
</head>
    <body>
<referenceBlock name="page.main.title">
            <arguments>
                <argument name="css_class" xsi:type="string">product</argument>
                <argument name="add_base_attribute" xsi:type="string">itemprop="name"</argument>
            </arguments>
        </referenceBlock>
<referenceContainer name="product.info.stock.sku">
<container name="product.info.type" before="-"/>
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.sku" template="Magento_Catalog::product/view/attribute.phtml" after="product.info.type">
<arguments>
<argument name="at_call" xsi:type="string">getSku</argument>
<argument name="at_code" xsi:type="string">sku</argument>
<argument name="css_class" xsi:type="string">sku</argument>
<argument name="at_label" xsi:type="string">default</argument>
<argument name="add_attribute" xsi:type="string">itemprop="sku"</argument>
</arguments>
</block>
</referenceContainer>
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" as="description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
                    <arguments>
                        <argument name="at_call" xsi:type="string">getDescription</argument>
                        <argument name="at_code" xsi:type="string">description</argument>
                        <argument name="css_class" xsi:type="string">description</argument>
                        <argument name="at_label" xsi:type="string">none</argument>
                        <argument name="title" translate="true" xsi:type="string">Product Information</argument>
                        <argument name="sort_order" xsi:type="string">10</argument>
<argument name="add_attribute" xsi:type="string">itemprop="description"</argument>
                    </arguments>
                </block>
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.video" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info" after="product.info.description">
<arguments>
<argument name="at_call" xsi:type="string">getVideoScript</argument>
<argument name="at_code" xsi:type="string">video_script</argument>
<argument name="css_class" xsi:type="string">videoscript</argument>
<argument name="at_label" xsi:type="string">none</argument>
<argument name="title" translate="true" xsi:type="string">Video</argument>
<argument name="sort_order" xsi:type="string">20</argument>
</arguments>
</block>
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.pump" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info" after="product.info.video">
<arguments>
<argument name="at_call" xsi:type="string">getPumpDesc</argument>
<argument name="at_code" xsi:type="string">pump_desc</argument>
<argument name="css_class" xsi:type="string">pumpdesc</argument>
<argument name="at_label" xsi:type="string">none</argument>
<argument name="title" translate="true" xsi:type="string">Pump Kit Requirements</argument>
<argument name="sort_order" xsi:type="string">30</argument>
</arguments>
</block>
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.cover" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info" after="product.info.pump">
<arguments>
<argument name="at_call" xsi:type="string">getCoverDesc</argument>
<argument name="at_code" xsi:type="string">cover_desc</argument>
<argument name="css_class" xsi:type="string">coverdesc</argument>
<argument name="at_label" xsi:type="string">none</argument>
<argument name="title" translate="true" xsi:type="string">Cover Information</argument>
<argument name="sort_order" xsi:type="string">40</argument>
</arguments>
</block>
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.care" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info" after="product.info.cover">
<arguments>
<argument name="at_call" xsi:type="string">getCareDesc</argument>
<argument name="at_code" xsi:type="string">care_desc</argument>
<argument name="css_class" xsi:type="string">caredesc</argument>
<argument name="at_label" xsi:type="string">none</argument>
<argument name="title" translate="true" xsi:type="string">Care Kit Information</argument>
<argument name="sort_order" xsi:type="string">50</argument>
</arguments>
</block>
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.other" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info" after="product.info.care">
<arguments>
<argument name="at_call" xsi:type="string">getOtherDesc</argument>
<argument name="at_code" xsi:type="string">other_desc</argument>
<argument name="css_class" xsi:type="string">otherdesc</argument>
<argument name="at_label" xsi:type="string">none</argument>
<argument name="title" translate="true" xsi:type="string">Additional Information</argument>
<argument name="sort_order" xsi:type="string">60</argument>
</arguments>
</block>
</referenceBlock>
<referenceContainer name="content">
<container name="upsell-products-popup" htmlTag="div" htmlClass="upsell_popup" after="product.info.details">
<block class="Magento\Catalog\Block\Product\ProductList\Upsell" name="product.info.upsell" template="Magento_Catalog::product/list/upsell.phtml">
<arguments>
<argument name="type" xsi:type="string">upsell</argument>
</arguments>
</block>
</container>
</referenceContainer>
<referenceContainer name="product.info.price">
<container name="product.prices" label="Product prices" htmlTag="div" htmlClass="product-msrp-price">
<container name="product.msrp" label="Product msrp" htmlTag="div" htmlClass="product-msrp" before="-">
<block class="Magento\Catalog\Pricing\Render" name="product.price.msrp">
<arguments>
<argument name="price_render" xsi:type="string">product.price.render.default</argument>
<argument name="price_type_code" xsi:type="string">msrp_price</argument>
<argument name="zone" xsi:type="string">item_view</argument>
</arguments>
</block>
</container>
<block class="Magento\Catalog\Pricing\Render" name="product.price.final">
<arguments>
<argument name="price_render" xsi:type="string">product.price.render.default</argument>
<argument name="price_type_code" xsi:type="string">final_price</argument>
<argument name="zone" xsi:type="string">item_view</argument>
</arguments>
</block>
</container>
</referenceContainer>
<referenceContainer name="content">
<block class="Magento\Framework\View\Element\Template" name="image_carousel" template="Magento_Catalog::product/view/image_reviews_carousel.phtml" before="product.info.details" />
</referenceContainer>
<move element="upsell-products-popup" destination="content" after="product.info.details"/>
<move element="image_carousel" destination="content" before="product.info.details"/>
<move element="product.info.stock.sku" destination="product.info.price" before="-"/>
<move element="product.info.type" destination="product.info.stock.sku" after="-"/>
<move element="product.info.video" destination="product.info.details" after="product.info.description"/>
<move element="product.info.pump" destination="product.info.details" after="product.info.video"/>
<move element="product.info.cover" destination="product.info.details" after="product.info.pump"/>
<move element="product.info.care" destination="product.info.details" after="product.info.cover"/>
<move element="product.info.other" destination="product.info.details" after="product.info.care"/>
<referenceContainer name="product.info.review" remove="true" />
<referenceContainer name="reviews.tab" remove="true" />
<referenceContainer name="sidebar.main">
<block class="Magento\Catalog\Block\Product\ProductList\Related" name="product.related" template="Magento_Catalog::product/list/related.phtml"/>
<block class="Magento\Catalog\Block\Product\ProductList\Related" name="product.recommended" template="Magento_Catalog::product/list/recommended.phtml"/>
</referenceContainer>
<referenceContainer name="sidebar.additional" remove="true" />
<referenceContainer name="product.info.social" remove="true" />
<referenceContainer name="product.info.overview" remove="true" />
<referenceBlock name="catalog.product.related" remove="true" />
    </body>
</page>


Make changes in phtml file. : /public_html/app/design/frontend/Companyname/Themename/Magento_Catalog/templates/product/view/attribute.phtml

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * Product view template
 *
 * @see \Magento\Catalog\Block\Product\View\Description
 */
?>
<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
$_call = $block->getAtCall();
$_code = $block->getAtCode();
$_className = $block->getCssClass();
$_attributeLabel = $block->getAtLabel();
$_attributeType = $block->getAtType();
$_attributeAddAttribute = $block->getAddAttribute();

$renderLabel = true;
// if defined as 'none' in layout, do not render
if ($_attributeLabel == 'none') {
    $renderLabel = false;
}

if ($_attributeLabel && $_attributeLabel == 'default') {
    $_attributeLabel = $_product->getResource()->getAttribute($_code)->getStoreLabel();
}
if ($_attributeType && $_attributeType == 'text') {
    $_attributeValue = ($_helper->productAttribute($_product, $_product->$_call(), $_code)) ? $_product->getAttributeText($_code) : '';
} else {
    $_attributeValue = $_helper->productAttribute($_product, $_product->$_call(), $_code);
}
?>
<?php if ($_attributeValue): ?>
<?php if($_className == "sku") { ?>
<div class="product attribute <?= /* @escapeNotVerified */ $_className ?>">
    <p class="product-code"><?php echo "Product Code:" ; ?>
    <span class="value" <?= /* @escapeNotVerified */ $_attributeAddAttribute ?>><?= /* @escapeNotVerified */ $_attributeValue ?></span></p>
</div>
<?php } elseif($_className == "description") { ?>
<div class="product attribute <?= /* @escapeNotVerified */ $_className ?>">                                    
<div class="box-des"> 
<div class="row">
<div class="col-xs-12 col-sm-8 col-md-8 col-lg-8 right-left-bordaer">
<div class="des-in-left value"  <?= /* @escapeNotVerified */ $_attributeAddAttribute ?>>
<?= $_product->getDescription(); ?>
</div>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 right-col ">
<div class="des-in-right">
<p class="specilation">Specification</p>
<p class="dimonion">Dimensions:</p>
<ul class="height-weght">
<li>Height:<span><?= (!empty($_product->getResource()->getAttribute('height')->getFrontend()->getValue($_product))) ? $_product->getResource()->getAttribute('height')->getFrontend()->getValue($_product) . " cm" : "n/a" ?> </span></li>
<li>Width:<span>
<?= (!empty($_product->getResource()->getAttribute('width')->getFrontend()->getValue($_product))) ? $_product->getResource()->getAttribute('width')->getFrontend()->getValue($_product) . " cm" : "n/a" ?>
</span></li>
<li>Depth:<span>
<?= (!empty($_product->getResource()->getAttribute('spec_depth')->getFrontend()->getValue($_product))) ? $_product->getResource()->getAttribute('spec_depth')->getFrontend()->getValue($_product) . " cm" : "n/a" ?>

</span></li>

<li>Brands:<span> <?php echo $_product->getResource()->getAttribute('brandp')->getFrontend()->getValue($_product); ?></span></li>
<li>Other:<span> <?php echo $_product->getResource()->getAttribute('spec_other')->getFrontend()->getValue($_product); ?></span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<?php } elseif($_className == "videoscript") { ?>
<?php if(!empty($_product->getResource()->getAttribute('video_script')->getFrontend()->getValue($_product))) {?>
<div role="tabpanel" class="tab-pane" id="vd1">
<?= $_product->getResource()->getAttribute('video_script')->getFrontend()->getValue($_product) ?> 
</div>
<?php } ?>
<?php } elseif($_className == "pumpdesc") { echo "<div style='display:none'>pump:".$_product->getResource()->getAttribute('pump_desc')->getFrontend()->getValue($_product)."</div>"; ?>
<?php if(!empty($_product->getResource()->getAttribute('pump_desc')->getFrontend()->getValue($_product))) {?>
<div role="tabpanel" class="tab-pane" id="ppm">
<?= $_product->getResource()->getAttribute('pump_desc')->getFrontend()->getValue($_product) ?> 
</div>
<?php } ?>
<?php } elseif($_className == "coverdesc") { echo "<div style='display:none'>cover:".$_product->getResource()->getAttribute('cover_desc')->getFrontend()->getValue($_product)."</div>"; ?>
<?php if(!empty($_product->getResource()->getAttribute('cover_desc')->getFrontend()->getValue($_product))) {?>
<div role="tabpanel" class="tab-pane" id="cvr">
<?= $_product->getResource()->getAttribute('cover_desc')->getFrontend()->getValue($_product) ?> 
</div>
<?php } ?>
<?php } elseif($_className == "caredesc") { echo "<div style='display:none'>care:".$_product->getResource()->getAttribute('care_desc')->getFrontend()->getValue($_product)."</div>"; ?>
<?php if(!empty($_product->getResource()->getAttribute('care_desc')->getFrontend()->getValue($_product))) {?>
<div role="tabpanel" class="tab-pane" id="car">
<?= $_product->getResource()->getAttribute('care_desc')->getFrontend()->getValue($_product) ?> 
</div>
<?php } ?>
<?php } elseif($_className == "otherdesc") { ?>
<?php if(!empty($_product->getResource()->getAttribute('other_desc')->getFrontend()->getValue($_product))) {?>
<div role="tabpanel" class="tab-pane" id="othr">
<?= $_product->getResource()->getAttribute('other_desc')->getFrontend()->getValue($_product) ?> 
</div>
<?php } ?>
<?php } else { ?>
<div class="product attribute <?= /* @escapeNotVerified */ $_className ?>">
    <?php if ($renderLabel): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
    <div class="value" <?= /* @escapeNotVerified */ $_attributeAddAttribute ?>><?= /* @escapeNotVerified */ $_attributeValue ?></div>
</div>
<?php } ?>
<?php endif; ?>


Now save it and flush it. You will get custom tabs in product view page

Wednesday, March 18, 2020

List of Events in magento 2

Here I describe the list of events in Magento 2.

You have to create an events.xml file in your extension to handle this event.

Magento uses area definition to manage the store. We will have a frontend area and admin area. With the configuration file, they can be put in 3 places:
  • Under etc/ folder is the configuration that can be used in both admin and frontend.
  • Under etc/frontend folder will be used for the frontend area.
  • Under etc/adminhtml folder will be used for the admin area.
The same with the event configuration file. You can create events configuration file for each area like this:
  • Admin area: app/code/Chirag/HelloWorld/etc/adminhtml/events.xml
  • Frontend area: app/code/Chirag/HelloWorld/etc/frontend/events.xml
  • Global area: app/code/Chirag/HelloWorld/etc/events.xml


List all events in Magento 2

Events in PHP Files

  • Event name: sales_quote_remove_item
  • File: vendor/magento/Collect/Model/Quote.php

 $this->_eventManager->dispatch('sales_quote_remove_item', ['quote_item' => $item]);

  • Event name: sales_quote_add_item
  • File: vendor/magento/Collect/Model/Quote.php

 $this->_eventManager->dispatch('sales_quote_add_item', ['quote_item' => $item]);

  • Event name: sales_quote_product_add_after
  • File: vendor/magento/Collect/Model/Quote.php

 $this->_eventManager->dispatch('sales_quote_product_add_after', ['items' => $items]);

  • Event name: _merge_before
  • File: vendor/magento/Collect/Model/Quote.php

 $this->_eventManager->dispatch(
     $this->_eventPrefix . '_merge_before',
     [$this->_eventObject => $this, 'source' => $quote]
 );

  • Event name: _merge_after
  • File: vendor/magento/Collect/Model/Quote.php

 $this->_eventManager->dispatch(
     $this->_eventPrefix . '_merge_after',
     [$this->_eventObject => $this, 'source' => $quote]
 );

  • Event name: sales_quote_item_qty_set_after
  • File: vendor/magento/Collect/Model/Quote/Item.php

  $this->_eventManager->dispatch('sales_quote_item_qty_set_after', ['item' => $this]);

  • Event name: sales_quote_item_set_product
  • File: vendor/magento/Collect/Model/Quote/Item.php

 $this->_eventManager->dispatch(
     'sales_quote_item_set_product',
     ['product' => $product, 'quote_item' => $this]
 );

  • Event name: _import_data_before
  • File: vendor/magento/Collect/Model/Quote/Payment.php

 $this->_eventManager->dispatch(
     $this->_eventPrefix . '_import_data_before',
     [$this->_eventObject => $this, 'input' => $data]
 );

  • Event name: _load_after
  • File: vendor/magento/Collect/Model/ResourceModel/Quote/Address/Collection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', [$this->_eventObject => $this]);

  • Event name: prepare_catalog_product_collection_prices
  • File: vendor/magento/Collect/Model/ResourceModel/Quote/Item/Collection.php

 $this->_eventManager->dispatch(
     'prepare_catalog_product_collection_prices',
     ['collection' => $productCollection, 'store_id' => $this->getStoreId()]
 );

  • Event name: sales_quote_item_collection_products_after_load
  • File: vendor/magento/Collect/Model/ResourceModel/Quote/Item/Collection.php

 $this->_eventManager->dispatch(
     'sales_quote_item_collection_products_after_load',
     ['collection' => $productCollection]
 );

  • Event name: controller_front_send_response_before
  • File: vendor/magento/framework/App/Http.php

 $this->_eventManager->dispatch('controller_front_send_response_before', $eventParams);

  • Event name: controller_action_layout_render_before
  • File: vendor/magento/framework/App/View.php

 $this->_eventManager->dispatch('controller_action_layout_render_before');

  • Event name: controller_action_layout_render_before_
  • File: vendor/magento/framework/App/View.php

 $this->_eventManager->dispatch(
     'controller_action_layout_render_before_' . $this->_request->getFullActionName()
 );

  • Event name: controller_action_predispatch
  • File: vendor/magento/framework/App/Action/Action.php

 $this->_eventManager->dispatch('controller_action_predispatch', $eventParameters);

  • Event name: controller_action_predispatch_
  • File: vendor/magento/framework/App/Action/Action.php

 $this->_eventManager->dispatch('controller_action_predispatch_' . $request->getRouteName(), $eventParameters);

  • Event name: controller_action_predispatch_
  • File: vendor/magento/framework/App/Action/Action.php

 $this->_eventManager->dispatch(
     'controller_action_predispatch_' . $request->getFullActionName(),
     $eventParameters
 );

  • Event name: controller_action_postdispatch_
  • File: vendor/magento/framework/App/Action/Action.php

 $this->_eventManager->dispatch(
   'controller_action_postdispatch_' . $request->getFullActionName(),
     $eventParameters
 );

  • Event name: controller_action_postdispatch_
  • File: vendor/magento/framework/App/Action/Action.php

 $this->_eventManager->dispatch(
        'controller_action_postdispatch_' . $request->getRouteName(),
        $eventParameters
 );

  • Event name: controller_action_postdispatch
  • File: vendor/magento/framework/App/Action/Action.php

 $this->_eventManager->dispatch('controller_action_postdispatch', $eventParameters);

  • Event name: controller_action_noroute
  • File: vendor/magento/framework/Controller/Noroute/Index.php

 $this->_eventManager->dispatch('controller_action_noroute', ['action' => $this, 'status' => $status]);

  • Event name: currency_display_options_forming
  • File: vendor/magento/framework/Locale/Currency.php

 $this->_eventManager->dispatch(
    'currency_display_options_forming',
    ['currency_options' => $options, 'base_code' => $currency]
 );

  • Event name: model_load_before
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('model_load_before', $params);

  • Event name: _load_before
  • File: vendor/magento/framework/Model/AbstractModel.php

  $this->_eventManager->dispatch($this->_eventPrefix . '_load_before', $params);

  • Event name: model_load_after
  • File: vendor/magento/framework/Model/AbstractModel.php

  $this->_eventManager->dispatch('model_load_after', ['object' => $this]);

  • Event name: _load_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', $this->_getEventData());

  • Event name: model_save_commit_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('model_save_commit_after', ['object' => $this]);

  • Event name: _save_commit_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_save_commit_after', $this->_getEventData());

  • Event name: model_save_before
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('model_save_before', ['object' => $this]);

  • Event name: _save_before
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_save_before', $this->_getEventData());

  • Event name: model_save_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('model_save_after', ['object' => $this]);

  • Event name: clean_cache_by_tags
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('clean_cache_by_tags', ['object' => $this]);

  • Event name: _save_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_save_after', $this->_getEventData());

  • Event name: model_delete_before
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('model_delete_before', ['object' => $this]);

  • Event name: _delete_before
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_delete_before', $this->_getEventData());

  • Event name: model_delete_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('model_delete_after', ['object' => $this]);

  • Event name: clean_cache_by_tags
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('clean_cache_by_tags', ['object' => $this]);

  • Event name: _delete_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_delete_after', $this->_getEventData());

  • Event name: model_delete_commit_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch('model_delete_commit_after', ['object' => $this]);

  • Event name: _delete_commit_after
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_delete_commit_after', $this->_getEventData());

  • Event name: _clear
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_clear', $this->_getEventData());

  • Event name: _clear
  • File: vendor/magento/framework/Model/AbstractModel.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_clear', $this->_getEventData());

  • Event name: core_collection_abstract_load_before
  • File: vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php

 $this->_eventManager->dispatch('core_collection_abstract_load_before', ['collection' => $this]);

  • Event name: _load_before
  • File: vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_before', [$this->_eventObject => $this]);

  • Event name: core_collection_abstract_load_after
  • File: vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php

 $this->_eventManager->dispatch('core_collection_abstract_load_after', ['collection' => $this]);

  • Event name: _load_after
  • File: vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', [$this->_eventObject => $this]);

  • Event name: core_layout_render_element
  • File: vendor/magento/framework/View/Layout.php

 $this->_eventManager->dispatch(
            'core_layout_render_element',
            ['element_name' => $name, 'layout' => $this, 'transport' => $this->_renderingOutput]
        );

  • Event name: view_block_abstract_to_html_before
  • File: vendor/magento/framework/View/Element/AbstractBlock.php

 $this->_eventManager->dispatch('view_block_abstract_to_html_before', ['block' => $this]);

  • Event name: view_message_block_render_grouped_html_after
  • File: vendor/magento/framework/View/Element/Messages.php

 $this->_eventManager->dispatch('view_message_block_render_grouped_html_after', $params);

  • Event name: adminhtml_block_html_before
  • File: vendor/magento/module-backend/Block/Template.php

 $this->_eventManager->dispatch('adminhtml_block_html_before', ['block' => $this]);

  • Event name: adminhtml_store_edit_form_prepare_form
  • File: vendor/magento/module-backend/Block/System/Store/Edit/AbstractForm.php

 $this->_eventManager->dispatch('adminhtml_store_edit_form_prepare_form', ['block' => $this]);

  • Event name: backend_block_widget_grid_prepare_grid_before
  • File: vendor/magento/module-backend/Block/Widget/Grid.php

 $this->_eventManager->dispatch(
            'backend_block_widget_grid_prepare_grid_before',
            ['grid' => $this, 'collection' => $this->getCollection()]
        );

  • Event name: clean_catalog_images_cache_after
  • File: vendor/magento/module-backend/Controller/Adminhtml/Cache/CleanImages.php

 $this->_eventManager->dispatch('clean_catalog_images_cache_after');

  • Event name: clean_media_cache_after
  • File: vendor/magento/module-backend/Controller/Adminhtml/Cache/CleanMedia.php

 $this->_eventManager->dispatch('clean_media_cache_after');

  • Event name: clean_static_files_cache_after
  • File: vendor/magento/module-backend/Controller/Adminhtml/Cache/CleanStaticFiles.php

 $this->_eventManager->dispatch('clean_static_files_cache_after');

  • Event name: adminhtml_cache_flush_all
  • File: vendor/magento/module-backend/Controller/Adminhtml/Cache/FlushAll.php

 $this->_eventManager->dispatch('adminhtml_cache_flush_all');

  • Event name: adminhtml_cache_flush_system
  • File: vendor/magento/module-backend/Controller/Adminhtml/Cache/FlushSystem.php

 $this->_eventManager->dispatch('adminhtml_cache_flush_system');

  • Event name: theme_save_after
  • File: vendor/magento/module-backend/Controller/Adminhtml/System/Design/Save.php

 $this->_eventManager->dispatch('theme_save_after');

  • Event name: store_delete
  • File: vendor/magento/module-backend/Controller/Adminhtml/System/Store/DeleteStorePost.php

 $this->_eventManager->dispatch('store_delete', ['store' => $model]);

  • Event name: store_group_save
  • File: vendor/magento/module-backend/Controller/Adminhtml/System/Store/Save.php

 $this->_eventManager->dispatch('store_group_save', ['group' => $groupModel]);

  • Event name: store_edit
  • File: vendor/magento/module-backend/Controller/Adminhtml/System/Store/Save.php
 $eventName = 'store_edit';
 $this->_eventManager->dispatch($eventName, ['store' => $storeModel]);

  • Event name: store_add
  • File: vendor/magento/module-backend/Controller/Adminhtml/System/Store/Save.php
 $eventName = 'store_add';
 $this->_eventManager->dispatch($eventName, ['store' => $storeModel]);

  • Event name: backend_auth_user_login_success
  • File: vendor/magento/module-backend/Model/Auth.php

 $this->_eventManager->dispatch(
     'backend_auth_user_login_success',
     ['user' => $this->getCredentialStorage()]
 );

  • Event name: backend_auth_user_login_failed
  • File: vendor/magento/module-backend/Model/Auth.php

 $this->_eventManager->dispatch(
  'backend_auth_user_login_failed',
  ['user_name' => $username, 'exception' => $e]
 );

  • Event name: catalog_product_option_price_configuration_after
  • File: vendor/magento/module-bundle/Block/Catalog/Product/View/Type/Bundle.php

 $this->_eventManager->dispatch('catalog_product_option_price_configuration_after', ['configObj' => $configObj]);

  • Event name: prepare_catalog_product_collection_prices
  • File: vendor/magento/module-bundle/Model/Product/Price.php

 $this->_eventManager->dispatch(
  'prepare_catalog_product_collection_prices',
  ['collection' => $selections, 'store_id' => $product->getStoreId()]
 );

  • Event name: catalog_product_get_final_price
  • File: vendor/magento/module-bundle/Model/Product/Price.php

 $this->_eventManager->dispatch('catalog_product_get_final_price', ['product' => $product, 'qty' => $qty]);

  • Event name: catalog_product_prepare_index_select
  • File: vendor/magento/module-bundle/Model/ResourceModel/Indexer/Price.php

        $this->_eventManager->dispatch(
            'catalog_product_prepare_index_select',
            [
                'select' => $select,
                'entity_field' => new \Zend_Db_Expr('e.entity_id'),
                'website_field' => new \Zend_Db_Expr('cw.website_id'),
                'store_field' => new \Zend_Db_Expr('cs.store_id')
            ]
        );

  • Event name: catalog_product_import_bunch_delete_commit_before
  • File: vendor/magento/module-catalog-import-export/Model/Import/Product.php

 $this->_eventManager->dispatch(
 'catalog_product_import_bunch_delete_commit_before',
  [
      'adapter' => $this,
      'bunch' => $bunch,
      'ids_to_delete' => $idsToDelete
  ]
 );

  • Event name: catalog_product_import_bunch_delete_after
  • File: vendor/magento/module-catalog-import-export/Model/Import/Product.php

 $this->_eventManager->dispatch('catalog_product_import_bunch_delete_after', ['adapter' => $this, 'bunch' => $bunch]);

  • Event name: catalog_product_import_finish_before
  • File: vendor/magento/module-catalog-import-export/Model/Import/Product.php

 $this->_eventManager->dispatch('catalog_product_import_finish_before', ['adapter' => $this]);

  • Event name: catalog_product_import_bunch_save_after
  • File: vendor/magento/module-catalog-import-export/Model/Import/Product.php

 $this->_eventManager->dispatch(
  'catalog_product_import_bunch_save_after',
  ['adapter' => $this, 'bunch' => $bunch]
 );
 
  • Event name: catalogrule_dirty_notice
  • File: vendor/magento/module-catalog-rule/Controller/Adminhtml/Promo/Catalog/Index.php

        $this->_eventManager->dispatch(
            'catalogrule_dirty_notice',
            ['dirty_rules' => $dirtyRules, 'message' => $this->getDirtyRulesNoticeMessage()]
        );
 
  • Event name: adminhtml_controller_catalogrule_prepare_save
  • File: vendor/magento/module-catalog-rule/Controller/Adminhtml/Promo/Catalog/Save.php

 $this->_eventManager->dispatch(
     'adminhtml_controller_catalogrule_prepare_save',
     ['request' => $this->getRequest()]
 );
 
  • Event name: clean_cache_by_tags
  • File: vendor/magento/module-catalog-rule/Model/Indexer/AbstractIndexer.php

 $this->_eventManager->dispatch('clean_cache_by_tags', ['object' => $this]);
 
  • Event name: catalogsearch_reset_search_result
  • File: vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext.php

 $this->_eventManager->dispatch('catalogsearch_reset_search_result');
 
  • Event name: shortcut_buttons_container
  • File: vendor/magento/module-catalog/Block/ShortcutButtons.php

        $this->_eventManager->dispatch(
            'shortcut_buttons_container',
            [
                'container' => $this,
                'is_catalog_product' => $this->_isCatalogProduct,
                'or_position' => $this->_orPosition
            ]
        );
 
  • Event name: adminhtml_catalog_category_tree_is_moveable
  • File: vendor/magento/module-catalog/Block/Adminhtml/Category/Tree.php

 $this->_eventManager->dispatch('adminhtml_catalog_category_tree_is_moveable', ['options' => $options]);
 
  • Event name: adminhtml_catalog_category_tree_can_add_root_category
  • File: vendor/magento/module-catalog/Block/Adminhtml/Category/Tree.php

 $this->_eventManager->dispatch(
            'adminhtml_catalog_category_tree_can_add_root_category',
            ['category' => $this->getCategory(), 'options' => $options, 'store' => $this->getStore()->getId()]
        );
 
  • Event name: adminhtml_catalog_category_tree_can_add_sub_category
  • File: vendor/magento/module-catalog/Block/Adminhtml/Category/Tree.php

        $this->_eventManager->dispatch(
            'adminhtml_catalog_category_tree_can_add_sub_category',
            ['category' => $this->getCategory(), 'options' => $options, 'store' => $this->getStore()->getId()]
        );
 
  • Event name: adminhtml_catalog_product_grid_prepare_massaction
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Grid.php

 $this->_eventManager->dispatch('adminhtml_catalog_product_grid_prepare_massaction', ['block' => $this]);
 
  • Event name: product_attribute_grid_build
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/Grid.php

 $this->_eventManager->dispatch('product_attribute_grid_build', ['grid' => $this]);
 
  • Event name: product_attribute_form_build
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php

 $this->_eventManager->dispatch('product_attribute_form_build', ['form' => $form]);
 
  • Event name: product_attribute_form_build_front_tab
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php

 $this->_eventManager->dispatch('product_attribute_form_build_front_tab', ['form' => $form]);
 
  • Event name: adminhtml_catalog_product_attribute_edit_frontend_prepare_form
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php

        $this->_eventManager->dispatch(
            'adminhtml_catalog_product_attribute_edit_frontend_prepare_form',
            ['form' => $form, 'attribute' => $attributeObject]
        );
 
  • Event name: adminhtml_product_attribute_types
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php

 $this->_eventManager->dispatch('adminhtml_product_attribute_types', ['response' => $response]);
 
  • Event name: product_attribute_form_build_main_tab
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php

 $this->_eventManager->dispatch('product_attribute_form_build_main_tab', ['form' => $form]);
 
  • Event name: adminhtml_catalog_product_edit_prepare_form
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php

 $this->_eventManager->dispatch('adminhtml_catalog_product_edit_prepare_form', ['form' => $form]);
 
  • Event name: adminhtml_catalog_product_edit_element_types
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php

 $this->_eventManager->dispatch('adminhtml_catalog_product_edit_element_types', ['response' => $response]);
 
  • Event name: adminhtml_catalog_product_attribute_set_main_html_before
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/Set/Main.php

        $this->_eventManager->dispatch(
            'adminhtml_catalog_product_attribute_set_main_html_before',
            ['block' => $this]
        );
 
  • Event name: adminhtml_catalog_product_attribute_set_toolbar_main_html_before
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php

        $this->_eventManager->dispatch(
            'adminhtml_catalog_product_attribute_set_toolbar_main_html_before',
            ['block' => $this]
        );
 
  • Event name: adminhtml_catalog_product_form_prepare_excluded_field_list
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php

 $this->_eventManager->dispatch(
     'adminhtml_catalog_product_form_prepare_excluded_field_list',
     ['object' => $this]
 );
 
  • Event name: adminhtml_catalog_product_edit_prepare_form
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php

 $this->_eventManager->dispatch(
  'adminhtml_catalog_product_edit_prepare_form',
  ['form' => $form, 'layout' => $this->getLayout()]
 );
 
  • Event name: adminhtml_catalog_product_edit_element_types
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php

  $this->_eventManager->dispatch('adminhtml_catalog_product_edit_element_types', ['response' => $response]);
 
  • Event name: catalog_product_gallery_prepare_layout
  • File: vendor/magento/module-catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php

 $this->_eventManager->dispatch('catalog_product_gallery_prepare_layout', ['block' => $this]);
 
  • Event name: catalog_block_product_status_display
  • File: vendor/magento/module-catalog/Block/Product/AbstractProduct.php

 $this->_eventManager->dispatch('catalog_block_product_status_display', ['status' => $statusInfo]);
 
  • Event name: catalog_block_product_list_collection
  • File: vendor/magento/module-catalog/Block/Product/ListProduct.php

        $this->_eventManager->dispatch(
            'catalog_block_product_list_collection',
            ['collection' => $this->_getProductCollection()]
        );

  • Event name: catalog_product_view_config
  • File: vendor/magento/module-catalog/Block/Product/View.php

 $this->_eventManager->dispatch('catalog_product_view_config', ['response_object' => $responseObject]);

  • Event name: catalog_product_upsell
  • File: vendor/magento/module-catalog/Block/Product/ProductList/Upsell.php

        $this->_eventManager->dispatch(
            'catalog_product_upsell',
            ['product' => $product, 'collection' => $this->_itemCollection, 'limit' => null]
        );

  • Event name: catalog_product_option_price_configuration_after
  • File: vendor/magento/module-catalog/Block/Product/View/Options.php

 $this->_eventManager->dispatch('catalog_product_option_price_configuration_after', ['configObj' => $configObj]);

  • Event name: rss_catalog_category_xml_callback
  • File: vendor/magento/module-catalog/Block/Rss/Category.php

 $this->_eventManager->dispatch('rss_catalog_category_xml_callback', ['product' => $product]);

  • Event name: rss_catalog_new_xml_callback
  • File: vendor/magento/module-catalog/Block/Rss/Product/NewProducts.php

 $this->_eventManager->dispatch('rss_catalog_new_xml_callback', [
  'row' => $item->getData(),
  'product' => $item
 ]);

  • Event name: rss_catalog_special_xml_callback
  • File: vendor/magento/module-catalog/Block/Rss/Product/Special.php

 $this->_eventManager->dispatch('rss_catalog_special_xml_callback', [
  'row' => $item->getData(),
  'product' => $item
 ]);

  • Event name: category_prepare_ajax_response
  • File: vendor/magento/module-catalog/Controller/Adminhtml/Category.php

        $this->_eventManager->dispatch(
            'category_prepare_ajax_response',
            ['response' => $eventResponse, 'controller' => $this]
        );

  • Event name: catalog_controller_category_delete
  • File: vendor/magento/module-catalog/Controller/Adminhtml/Category/Delete.php

$this->_eventManager->dispatch('catalog_controller_category_delete', ['category' => $category]);

  • Event name: catalog_category_prepare_save
  • File: vendor/magento/module-catalog/Controller/Adminhtml/Category/Save.php

 $this->_eventManager->dispatch(
  'catalog_category_prepare_save',
  ['category' => $category, 'request' => $this->getRequest()]
 );

  • Event name: catalog_product_edit_action
  • File: vendor/magento/module-catalog/Controller/Adminhtml/Product/Edit.php

 $this->_eventManager->dispatch('catalog_product_edit_action', ['product' => $product]);

  • Event name: catalog_product_new_action
  • File: vendor/magento/module-catalog/Controller/Adminhtml/Product/NewAction.php

 $this->_eventManager->dispatch('catalog_product_new_action', ['product' => $product]);

  • Event name: controller_action_catalog_product_save_entity_after
  • File: vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php

 $this->_eventManager->dispatch(
  'controller_action_catalog_product_save_entity_after',
  ['controller' => $this, 'product' => $product]
 );

  • Event name: catalog_product_to_website_change
  • File: vendor/magento/module-catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php

 $this->_eventManager->dispatch('catalog_product_to_website_change', ['products' => $productIds]);

  • Event name: catalog_controller_category_init_after
  • File: vendor/magento/module-catalog/Controller/Category/View.php

 $this->_eventManager->dispatch(
  'catalog_controller_category_init_after',
  ['category' => $category, 'controller_action' => $this]
 );

  • Event name: catalog_product_compare_add_product
  • File: vendor/magento/module-catalog/Controller/Product/Compare/Add.php

 $this->_eventManager->dispatch('catalog_product_compare_add_product', ['product' => $product]);

  • Event name: catalog_product_compare_remove_product
  • File: vendor/magento/module-catalog/Controller/Product/Compare/Remove.php

 $this->_eventManager->dispatch(
  'catalog_product_compare_remove_product',
  ['product' => $item]
 );

  • Event name: catalog_controller_product_init_before
  • File: vendor/magento/module-catalog/Helper/Product.php

        $this->_eventManager->dispatch(
            'catalog_controller_product_init_before',
            ['controller_action' => $controller, 'params' => $params]
        );

  • Event name: catalog_controller_product_init_after
  • File: vendor/magento/module-catalog/Helper/Product.php

 $this->_eventManager->dispatch(
  'catalog_controller_product_init_after',
  ['product' => $product, 'controller_action' => $controller]
 );

  • Event name: catalog_controller_product_view
  • File: vendor/magento/module-catalog/Helper/Product/View.php

 $this->_eventManager->dispatch('catalog_controller_product_view', ['product' => $product]);

  • Event name: _move_before
  • File: vendor/magento/module-catalog/Model/Category.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_move_before', $eventParams);

  • Event name: _move_after
  • File: vendor/magento/module-catalog/Model/Category.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_move_after', $eventParams);

  • Event name: category_move
  • File: vendor/magento/module-catalog/Model/Category.php

 $this->_eventManager->dispatch($this->_eventPrefix . 'category_move', $eventParams);

  • Event name: clean_cache_by_tags
  • File: vendor/magento/module-catalog/Model/Category.php

 $this->_eventManager->dispatch('clean_cache_by_tags', ['object' => $this]);

  • Event name: _validate_before
  • File: vendor/magento/module-catalog/Model/Product.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_validate_before', $this->_getEventData());

  • Event name: _validate_after
  • File: vendor/magento/module-catalog/Model/Product.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_validate_after', $this->_getEventData());

  • Event name: catalog_product_is_salable_before
  • File: vendor/magento/module-catalog/Model/Product.php

 $this->_eventManager->dispatch('catalog_product_is_salable_before', ['product' => $this]);

  • Event name: catalog_product_is_salable_after
  • File: vendor/magento/module-catalog/Model/Product.php

        $this->_eventManager->dispatch(
            'catalog_product_is_salable_after',
            ['product' => $this, 'salable' => $object]
        );

  • Event name: catalog_product_attribute_update_before
  • File: vendor/magento/module-catalog/Model/Product/Action.php

        $this->_eventManager->dispatch(
            'catalog_product_attribute_update_before',
            ['attributes_data' => &$attrData, 'product_ids' => &$productIds, 'store_id' => &$storeId]
        );

  • Event name: adminhtml_product_attribute_types
  • File: vendor/magento/module-catalog/Model/Product/Attribute/Source/Inputtype.php

 $this->_eventManager->dispatch('adminhtml_product_attribute_types', ['response' => $response]);
 
  • Event name: catalog_product_type_prepare_%s_options
  • File: vendor/magento/module-catalog/Model/Product/Type/AbstractType.php

        $eventName = sprintf('catalog_product_type_prepare_%s_options', $processMode);
        $this->_eventManager->dispatch(
            $eventName,
            ['transport' => $transport, 'buy_request' => $buyRequest, 'product' => $product]
        );
 
  • Event name: catalog_product_get_final_price
  • File: vendor/magento/module-catalog/Model/Product/Type/Price.php

 $this->_eventManager->dispatch('catalog_product_get_final_price', ['product' => $product, 'qty' => $qty]);
 
  • Event name: catalog_category_change_products
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category.php

 $this->_eventManager->dispatch(
  'catalog_category_change_products',
  ['category' => $category, 'product_ids' => $productIds]
 );
 
  • Event name: catalog_category_delete_after_done
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category.php

        $this->_eventManager->dispatch(
            'catalog_category_delete_after_done',
            ['product' => $object]
        );
 
  • Event name: _load_before
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Collection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_before', [$this->_eventObject => $this]);
 
  • Event name: _load_after
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Collection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', [$this->_eventObject => $this]);
 
  • Event name: _add_is_active_filter
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Collection.php

        $this->_eventManager->dispatch(
            $this->_eventPrefix . '_add_is_active_filter',
            [$this->_eventObject => $this]
        );
 
  • Event name: catalog_category_tree_init_inactive_category_ids
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Flat.php

 $this->_eventManager->dispatch('catalog_category_tree_init_inactive_category_ids', ['tree' => $this]);
 
  • Event name: catalog_category_flat_loadnodes_before
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Flat.php

 $this->_eventManager->dispatch('catalog_category_flat_loadnodes_before', ['select' => $select]);
 
  • Event name: catalog_category_tree_init_inactive_category_ids
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Tree.php

 $this->_eventManager->dispatch('catalog_category_tree_init_inactive_category_ids', ['tree' => $this]);
 
  • Event name: _load_before
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Flat/Collection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_before', [$this->_eventObject => $this]);
 
  • Event name: _load_after
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Flat/Collection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', [$this->_eventObject => $this]);
 
  • Event name: _add_is_active_filter
  • File: vendor/magento/module-catalog/Model/ResourceModel/Category/Flat/Collection.php

        $this->_eventManager->dispatch(
            $this->_eventPrefix . '_add_is_active_filter',
            [$this->_eventObject => $this]
        );
 
  • Event name: catalog_prepare_price_select
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php

 $this->_eventManager->dispatch('catalog_prepare_price_select', $eventArgs);
 
  • Event name: catalog_product_collection_load_after
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php

 $this->_eventManager->dispatch('catalog_product_collection_load_after', ['collection' => $this]);
 
  • Event name: catalog_product_collection_before_add_count_to_categories
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php

 $this->_eventManager->dispatch(
  'catalog_product_collection_before_add_count_to_categories',
  ['collection' => $this]
 );
 
  • Event name: catalog_product_collection_apply_limitations_after
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php

        $this->_eventManager->dispatch(
            'catalog_product_collection_apply_limitations_after',
            ['collection' => $this]
        );
  • Event name: catalog_product_compare_item_collection_clear
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Compare/Item/Collection.php

 $this->_eventManager->dispatch('catalog_product_compare_item_collection_clear');
  • Event name: prepare_catalog_product_index_select
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Eav/AbstractEav.php

        $this->_eventManager->dispatch(
            'prepare_catalog_product_index_select',
            [
                'select' => $select,
                'entity_field' => new \Zend_Db_Expr('l.parent_id'),
                'website_field' => new \Zend_Db_Expr('cs.website_id'),
                'store_field' => new \Zend_Db_Expr('cs.store_id')
            ]
        );
  • Event name: prepare_catalog_product_index_select
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Eav/Decimal.php

        $this->_eventManager->dispatch(
            'prepare_catalog_product_index_select',
            [
                'select' => $select,
                'entity_field' => new \Zend_Db_Expr('cpe.entity_id'),
                'website_field' => new \Zend_Db_Expr('cs.website_id'),
                'store_field' => new \Zend_Db_Expr('cs.store_id')
            ]
        );

  • Event name: prepare_catalog_product_index_select
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php

        $this->_eventManager->dispatch(
            'prepare_catalog_product_index_select',
            [
                'select' => $select,
                'entity_field' => new \Zend_Db_Expr('pid.entity_id'),
                'website_field' => new \Zend_Db_Expr('pid.website_id'),
                'store_field' => new \Zend_Db_Expr('pid.store_id')
            ]
        );
  
  • Event name: prepare_catalog_product_index_select
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php

        $this->_eventManager->dispatch(
            'prepare_catalog_product_index_select',
            [
                'select' => $select,
                'entity_field' => new \Zend_Db_Expr('cpe.entity_id'),
                'website_field' => new \Zend_Db_Expr('cs.website_id'),
                'store_field' => new \Zend_Db_Expr('cs.store_id')
            ]
        );
  
  • Event name: prepare_catalog_product_index_select
  • File: vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php

        $this->_eventManager->dispatch(
            'prepare_catalog_product_index_select',
            [
                'select' => $select,
                'entity_field' => new \Zend_Db_Expr('e.entity_id'),
                'website_field' => new \Zend_Db_Expr('cw.website_id'),
                'store_field' => new \Zend_Db_Expr('cs.store_id')
            ]
        );
  
  • Event name: shortcut_buttons_container
  • File: vendor/magento/module-checkout/Block/QuoteShortcutButtons.php

        $this->_eventManager->dispatch(
            'shortcut_buttons_container',
            [
                'container' => $this,
                'is_catalog_product' => $this->_isCatalogProduct,
                'or_position' => $this->_orPosition,
                'checkout_session' => $this->_checkoutSession
            ]
        );
  
  • Event name: checkout_cart_add_product_complete
  • File: vendor/magento/module-checkout/Controller/Cart/Add.php

            $this->_eventManager->dispatch(
                'checkout_cart_add_product_complete',
                ['product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse()]
            );
  
  • Event name: checkout_cart_update_item_complete
  • File: vendor/magento/module-checkout/Controller/Cart/UpdateItemOptions.php

            $this->_eventManager->dispatch(
                'checkout_cart_update_item_complete',
                ['item' => $item, 'request' => $this->getRequest(), 'response' => $this->getResponse()]
            );
  
  • Event name: checkout_controller_onepage_saveOrder
  • File: vendor/magento/module-checkout/Controller/Onepage/SaveOrder.php

 $this->_eventManager->dispatch(
  'checkout_controller_onepage_saveOrder',
  [
   'result' => $result,
   'action' => $this
  ]
 );
  
  • Event name: checkout_onepage_controller_success_action
  • File: vendor/magento/module-checkout/Controller/Onepage/Success.php

 $this->_eventManager->dispatch(
  'checkout_onepage_controller_success_action',
  ['order_ids' => [$session->getLastOrderId()]]
 );
  
  • Event name: checkout_allow_guest
  • File: vendor/magento/module-checkout/Helper/Data.php

 $this->_eventManager->dispatch(
  'checkout_allow_guest',
  ['quote' => $quote, 'store' => $store, 'result' => $result]
 );
  
  • Event name: checkout_cart_product_add_after
  • File: vendor/magento/module-checkout/Model/Cart.php

 $this->_eventManager->dispatch(
  'checkout_cart_product_add_after',
  ['quote_item' => $result, 'product' => $product]
 );
  
  • Event name: checkout_cart_update_items_before
  • File: vendor/magento/module-checkout/Model/Cart.php

 $this->_eventManager->dispatch(
  'checkout_cart_update_items_before',
  ['cart' => $this, 'info' => $infoDataObject]
 );
  
  • Event name: checkout_cart_update_items_after
  • File: vendor/magento/module-checkout/Model/Cart.php

 $this->_eventManager->dispatch(
  'checkout_cart_update_items_after',
  ['cart' => $this, 'info' => $infoDataObject]
 );

  
  • Event name: checkout_cart_save_before
  • File: vendor/magento/module-checkout/Model/Cart.php

 $this->_eventManager->dispatch('checkout_cart_save_before', ['cart' => $this]);
  
  • Event name: checkout_cart_save_after
  • File: vendor/magento/module-checkout/Model/Cart.php

 $this->_eventManager->dispatch('checkout_cart_save_after', ['cart' => $this]);
  
  • Event name: checkout_cart_product_update_after
  • File: vendor/magento/module-checkout/Model/Cart.php

 $this->_eventManager->dispatch(
  'checkout_cart_product_update_after',
  ['quote_item' => $result, 'product' => $product]
 );
  
  • Event name: custom_quote_process
  • File: vendor/magento/module-checkout/Model/Session.php

 $this->_eventManager->dispatch('custom_quote_process', ['checkout_session' => $this]);
  
  • Event name: checkout_quote_init
  • File: vendor/magento/module-checkout/Model/Session.php

 $this->_eventManager->dispatch('checkout_quote_init', ['quote' => $quote]);
  
  • Event name: load_customer_quote_before
  • File: vendor/magento/module-checkout/Model/Session.php

 $this->_eventManager->dispatch('load_customer_quote_before', ['checkout_session' => $this]);
  
  • Event name: checkout_quote_destroy
  • File: vendor/magento/module-checkout/Model/Session.php

 $this->_eventManager->dispatch('checkout_quote_destroy', ['quote' => $this->getQuote()]);
  
  • Event name: restore_quote
  • File: vendor/magento/module-checkout/Model/Session.php

 $this->_eventManager->dispatch('restore_quote', ['order' => $order, 'quote' => $quote]);
  
  • Event name: checkout_type_onepage_save_order_after
  • File: vendor/magento/module-checkout/Model/Type/Onepage.php

 $this->_eventManager->dispatch(
  'checkout_type_onepage_save_order_after',
  ['order' => $order, 'quote' => $this->getQuote()]
 );

  • Event name: checkout_submit_all_after
  • File: vendor/magento/module-checkout/Model/Type/Onepage.php

 $this->_eventManager->dispatch(
  'checkout_submit_all_after',
  [
   'order' => $order,
   'quote' => $this->getQuote()
  ]
 );

  • Event name: cms_controller_router_match_before
  • File: vendor/magento/module-cms/Controller/Router.php

 $this->_eventManager->dispatch(
  'cms_controller_router_match_before',
  ['router' => $this, 'condition' => $condition]
 );

  • Event name: adminhtml_cmspage_on_delete
  • File: vendor/magento/module-cms/Controller/Adminhtml/Page/Delete.php

 $this->_eventManager->dispatch(
  'adminhtml_cmspage_on_delete',
  ['title' => $title, 'status' => 'success']
 );

  • Event name: adminhtml_cmspage_on_delete
  • File: vendor/magento/module-cms/Controller/Adminhtml/Page/Delete.php

 $this->_eventManager->dispatch(
  'adminhtml_cmspage_on_delete',
  ['title' => $title, 'status' => 'fail']
 );

  • Event name: cms_page_prepare_save
  • File: vendor/magento/module-cms/Controller/Adminhtml/Page/Save.php

 $this->_eventManager->dispatch(
  'cms_page_prepare_save',
  ['page' => $model, 'request' => $this->getRequest()]
 );

  • Event name: cms_page_render
  • File: vendor/magento/module-cms/Helper/Page.php

 $this->_eventManager->dispatch(
  'cms_page_render',
  ['page' => $this->_page, 'controller_action' => $action]
 );

  • Event name: cms_wysiwyg_images_static_urls_allowed
  • File: vendor/magento/module-cms/Helper/Wysiwyg/Images.php

 $this->_eventManager->dispatch(
  'cms_wysiwyg_images_static_urls_allowed',
  ['result' => $checkResult, 'store_id' => $this->_storeId]
 );

  • Event name: adminhtml_system_config_advanced_disableoutput_render_before
  • File: vendor/magento/module-config/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php

 $this->_eventManager->dispatch(
  'adminhtml_system_config_advanced_disableoutput_render_before',
  ['modules' => $dispatchResult]
 );

  • Event name: admin_system_config_changed_section_
  • File: vendor/magento/module-config/Model/Config.php

 $this->_eventManager->dispatch(
  "admin_system_config_changed_section_{$this->getSection()}",
  ['website' => $this->getWebsite(), 'store' => $this->getStore()]
 );

  • Event name: controller_action_nocookies
  • File: vendor/magento/module-cookie/Controller/Index/NoCookies.php

 $this->_eventManager->dispatch(
  'controller_action_nocookies',
  ['action' => $this, 'redirect' => $redirect]
 );

  • Event name: admin_system_config_changed_section_currency_before_reinit
  • File: vendor/magento/module-currency-symbol/Model/System/Currencysymbol.php

 $this->_eventManager->dispatch(
  'admin_system_config_changed_section_currency_before_reinit',
  ['website' => $this->_websiteId, 'store' => $this->_storeId]
 );

  • Event name: adminhtml_block_html_before
  • File: vendor/magento/module-customer/Block/Adminhtml/Edit/Tab/Carts.php

 $this->_eventManager->dispatch('adminhtml_block_html_before', ['block' => $this]);

  • Event name: customer_register_success
  • File: vendor/magento/module-customer/Controller/Account/CreatePost.php

 $this->_eventManager->dispatch(
  'customer_register_success',
  ['account_controller' => $this, 'customer' => $customer]
 );

  • Event name: customer_account_edited
  • File: vendor/magento/module-customer/Controller/Account/EditPost.php

 $this->_eventManager->dispatch(
  'customer_account_edited',
  ['email' => $customerCandidateDataObject->getEmail()]
 );

  • Event name: adminhtml_customer_prepare_save
  • File: vendor/magento/module-customer/Controller/Adminhtml/Index/Save.php

 $this->_eventManager->dispatch(
  'adminhtml_customer_prepare_save',
  ['customer' => $customer, 'request' => $this->getRequest()]
 );

  • Event name: adminhtml_customer_save_after
  • File: vendor/magento/module-customer/Controller/Adminhtml/Index/Save.php

 $this->_eventManager->dispatch(
  'adminhtml_customer_save_after',
  ['customer' => $customer, 'request' => $this->getRequest()]
 );

  • Event name: customer_customer_authenticated
  • File: vendor/magento/module-customer/Model/Customer.php

 $this->_eventManager->dispatch(
  'customer_customer_authenticated',
  ['model' => $this, 'password' => $password]
 );

  • Event name: customer_session_init
  • File: vendor/magento/module-customer/Model/Session.php

 $this->_eventManager->dispatch('customer_session_init', ['customer_session' => $this]);

  • Event name: customer_login
  • File: vendor/magento/module-customer/Model/Session.php

 $this->_eventManager->dispatch('customer_login', ['customer' => $customer]);

  • Event name: customer_data_object_login
  • File: vendor/magento/module-customer/Model/Session.php

 $this->_eventManager->dispatch('customer_data_object_login', ['customer' => $this->getCustomerDataObject()]);

  • Event name: customer_logout
  • File: vendor/magento/module-customer/Model/Session.php

 $this->_eventManager->dispatch('customer_logout', ['customer' => $this->getCustomer()]);

  • Event name: visitor_init
  • File: vendor/magento/module-customer/Model/Visitor.php

 $this->_eventManager->dispatch('visitor_init', ['visitor' => $this]);

  • Event name: visitor_activity_save
  • File: vendor/magento/module-customer/Model/Visitor.php

 $this->_eventManager->dispatch('visitor_activity_save', ['visitor' => $this]);

  • Event name: customer_address_format
  • File: vendor/magento/module-customer/Model/Address/AbstractAddress.php

  $this->_eventManager->dispatch('customer_address_format', ['type' => $formatType, 'address' => $this]);

  • Event name: adminhtml_block_eav_attribute_edit_form_init
  • File: vendor/magento/module-eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php

 $this->_eventManager->dispatch(
  'adminhtml_block_eav_attribute_edit_form_init',
  ['form' => $this->getForm()]
 );

  • Event name: eav_collection_abstract_load_before
  • File: vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php

 $this->_eventManager->dispatch('eav_collection_abstract_load_before', ['collection' => $this]);

  • Event name: gift_options_prepare_items
  • File: vendor/magento/module-gift-message/Block/Message/Inline.php

 $this->_eventManager->dispatch('gift_options_prepare_items', ['items' => $entityItems]);

  • Event name: catalog_product_prepare_index_select
  • File: vendor/magento/module-grouped-product/Model/ResourceModel/Product/Indexer/Price/Grouped.php

        $this->_eventManager->dispatch(
            'catalog_product_prepare_index_select',
            [
                'select' => $select,
                'entity_field' => new \Zend_Db_Expr('e.entity_id'),
                'website_field' => new \Zend_Db_Expr('cw.website_id'),
                'store_field' => new \Zend_Db_Expr('cs.store_id')
            ]
        );

  • Event name: checkout_controller_multishipping_shipping_post
  • File: vendor/magento/module-multishipping/Controller/Checkout/ShippingPost.php

 $this->_eventManager->dispatch(
  'checkout_controller_multishipping_shipping_post',
  ['request' => $this->getRequest(), 'quote' => $this->_getCheckout()->getQuote()]
 );

  • Event name: multishipping_checkout_controller_success_action
  • File: vendor/magento/module-multishipping/Controller/Checkout/Success.php

 $this->_eventManager->dispatch('multishipping_checkout_controller_success_action', ['order_ids' => $ids]);

  • Event name: checkout_type_multishipping_set_shipping_items
  • File: vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php

 $this->_eventManager->dispatch('checkout_type_multishipping_set_shipping_items', ['quote' => $quote]);

  • Event name: checkout_type_multishipping_create_orders_single
  • File: vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php

 $this->_eventManager->dispatch(
  'checkout_type_multishipping_create_orders_single',
  ['order' => $order, 'address' => $address, 'quote' => $this->getQuote()]
 );

  • Event name: checkout_submit_all_after
  • File: vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php

 $this->_eventManager->dispatch(
  'checkout_submit_all_after',
  ['orders' => $orders, 'quote' => $this->getQuote()]
 );

  • Event name: checkout_multishipping_refund_all
  • File: vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php

 $this->_eventManager->dispatch('checkout_multishipping_refund_all', ['orders' => $orders]);

  • Event name: payment_form_block_to_html_before
  • File: vendor/magento/module-payment/Block/Form/Cc.php

 $this->_eventManager->dispatch('payment_form_block_to_html_before', ['block' => $this]);

  • Event name: payment_cart_collect_items_and_amounts
  • File: vendor/magento/module-payment/Model/Cart.php

 $this->_eventManager->dispatch('payment_cart_collect_items_and_amounts', ['cart' => $this]);

  • Event name: payment_method_assign_data_
  • File: vendor/magento/module-payment/Model/Method/AbstractMethod.php

 $this->_eventManager->dispatch(
  'payment_method_assign_data_' . $this->getCode(),
  [
   AbstractDataAssignObserver::METHOD_CODE => $this,
   AbstractDataAssignObserver::MODEL_CODE => $this->getInfoInstance(),
   AbstractDataAssignObserver::DATA_CODE => $data
  ]
 );

  • Event name: payment_method_assign_data
  • File: vendor/magento/module-payment/Model/Method/AbstractMethod.php

 $this->_eventManager->dispatch(
  'payment_method_assign_data',
  [
   AbstractDataAssignObserver::METHOD_CODE => $this,
   AbstractDataAssignObserver::MODEL_CODE => $this->getInfoInstance(),
   AbstractDataAssignObserver::DATA_CODE => $data
  ]
 );

  • Event name: payment_method_is_active
  • File: vendor/magento/module-payment/Model/Method/AbstractMethod.php

 $this->_eventManager->dispatch(
  'payment_method_is_active',
  [
   'result' => $checkResult,
   'method_instance' => $this,
   'quote' => $quote
  ]
 );

  • Event name: paypal_express_place_order_success
  • File: vendor/magento/module-paypal/Controller/Express/AbstractExpress/PlaceOrder.php

 $this->_eventManager->dispatch(
  'paypal_express_place_order_success',
   [
        'order' => $order,
        'quote' => $this->_getQuote()
   ]
 );

  • Event name: persistent_session_expired
  • File: vendor/magento/module-persistent/Controller/Index/UnsetCookie.php

 $this->_eventManager->dispatch('persistent_session_expired');

  • Event name: persistent_session_expired
  • File: vendor/magento/module-persistent/Observer/CheckExpirePersistentQuoteObserver.php

 $this->_eventManager->dispatch('persistent_session_expired');

  • Event name: sales_quote_remove_item
  • File: vendor/magento/module-quote/Model/Quote.php

 $this->_eventManager->dispatch('sales_quote_remove_item', ['quote_item' => $item]);

  • Event name: sales_quote_add_item
  • File: vendor/magento/module-quote/Model/Quote.php

 $this->_eventManager->dispatch('sales_quote_add_item', ['quote_item' => $item]);

  • Event name: sales_quote_product_add_after
  • File: vendor/magento/module-quote/Model/Quote.php

 $this->_eventManager->dispatch('sales_quote_product_add_after', ['items' => $items]);

  • Event name: _merge_before
  • File: vendor/magento/module-quote/Model/Quote.php

 $this->_eventManager->dispatch(
  $this->_eventPrefix . '_merge_before',
  [$this->_eventObject => $this, 'source' => $quote]
 );

  • Event name: _merge_after
  • File: vendor/magento/module-quote/Model/Quote.php

 $this->_eventManager->dispatch(
  $this->_eventPrefix . '_merge_after',
  [$this->_eventObject => $this, 'source' => $quote]
 );

  • Event name: sales_quote_item_qty_set_after
  • File: vendor/magento/module-quote/Model/Quote/Item.php

 $this->_eventManager->dispatch('sales_quote_item_qty_set_after', ['item' => $this]);

  • Event name: sales_quote_item_set_product
  • File: vendor/magento/module-quote/Model/Quote/Item.php

 $this->_eventManager->dispatch(
  'sales_quote_item_set_product',
  ['product' => $product, 'quote_item' => $this]
 );

  • Event name: _import_data_before
  • File: vendor/magento/module-quote/Model/Quote/Payment.php

 $this->_eventManager->dispatch(
  $this->_eventPrefix . '_import_data_before',
  [$this->_eventObject => $this, 'input' => $data]
 );

  • Event name: _load_after
  • File: vendor/magento/module-quote/Model/ResourceModel/Quote/Address/Collection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', [$this->_eventObject => $this]);

  • Event name: prepare_catalog_product_collection_prices
  • File: vendor/magento/module-quote/Model/ResourceModel/Quote/Item/Collection.php

 $this->_eventManager->dispatch(
  'prepare_catalog_product_collection_prices',
  ['collection' => $productCollection, 'store_id' => $this->getStoreId()]
 );

  • Event name: sales_quote_item_collection_products_after_load
  • File: vendor/magento/module-quote/Model/ResourceModel/Quote/Item/Collection.php

 $this->_eventManager->dispatch(
  'sales_quote_item_collection_products_after_load',
  ['collection' => $productCollection]
 );

  • Event name: adminhtml_widget_grid_filter_collection
  • File: vendor/magento/module-reports/Block/Adminhtml/Grid.php

 $this->_eventManager->dispatch(
  'adminhtml_widget_grid_filter_collection',
  ['collection' => $this->getCollection(), 'filter_values' => $this->_filterValues]
 );

  • Event name: sales_prepare_amount_expression
  • File: vendor/magento/module-reports/Model/ResourceModel/Order/Collection.php

 $this->_eventManager->dispatch(
  'sales_prepare_amount_expression',
  ['collection' => $this, 'expression_object' => $expressionTransferObject]
 );

  • Event name: review_controller_product_init_before
  • File: vendor/magento/module-review/Controller/Product.php

 $this->_eventManager->dispatch('review_controller_product_init_before', ['controller_action' => $this]);

  • Event name: review_controller_product_init
  • File: vendor/magento/module-review/Controller/Product.php

 $this->_eventManager->dispatch('review_controller_product_init', ['product' => $product]);

  • Event name: review_controller_product_init_after
  • File: vendor/magento/module-review/Controller/Product.php

 $this->_eventManager->dispatch(
  'review_controller_product_init_after',
  ['product' => $product, 'controller_action' => $this]
 );

  • Event name: rating_rating_collection_load_before
  • File: vendor/magento/module-review/Model/ResourceModel/Rating/Collection.php

 $this->_eventManager->dispatch('rating_rating_collection_load_before', ['collection' => $this]);

  • Event name: review_review_collection_load_before
  • File: vendor/magento/module-review/Model/ResourceModel/Review/Collection.php

 $this->_eventManager->dispatch('review_review_collection_load_before', ['collection' => $this]);

  • Event name: adminhtml_block_salesrule_actions_prepareform
  • File: vendor/magento/module-sales-rule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php

 $this->_eventManager->dispatch('adminhtml_block_salesrule_actions_prepareform', ['form' => $form]);

  • Event name: adminhtml_promo_quote_edit_tab_coupons_form_prepare_form
  • File: vendor/magento/module-sales-rule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php

 $this->_eventManager->dispatch(
  'adminhtml_promo_quote_edit_tab_coupons_form_prepare_form',
  ['form' => $form]
 );

  • Event name: adminhtml_block_promo_widget_chooser_prepare_collection
  • File: vendor/magento/module-sales-rule/Block/Adminhtml/Promo/Widget/Chooser.php

 $this->_eventManager->dispatch(
  'adminhtml_block_promo_widget_chooser_prepare_collection',
  ['collection' => $collection]
 );

  • Event name: adminhtml_controller_salesrule_prepare_save
  • File: vendor/magento/module-sales-rule/Controller/Adminhtml/Promo/Quote/Save.php

 $this->_eventManager->dispatch(
  'adminhtml_controller_salesrule_prepare_save',
  ['request' => $this->getRequest()]
 );

  • Event name: salesrule_rule_get_coupon_types
  • File: vendor/magento/module-sales-rule/Model/Rule.php

 $this->_eventManager->dispatch('salesrule_rule_get_coupon_types', ['transport' => $transport]);

  • Event name: salesrule_validator_process
  • File: vendor/magento/module-sales-rule/Model/RulesApplier.php

 $this->_eventManager->dispatch(
  'salesrule_validator_process',
  [
   'rule' => $rule,
   'item' => $item,
   'address' => $address,
   'quote' => $quote,
   'qty' => $qty,
   'result' => $discountData
  ]
 );

  • Event name: salesrule_rule_condition_combine
  • File: vendor/magento/module-sales-rule/Model/Rule/Condition/Combine.php

 $this->_eventManager->dispatch('salesrule_rule_condition_combine', ['additional' => $additional]);

  • Event name: adminhtml_customer_orders_add_action_renderer
  • File: vendor/magento/module-sales/Block/Adminhtml/Reorder/Renderer/Action.php

 $this->_eventManager->dispatch(
  'adminhtml_customer_orders_add_action_renderer',
  ['renderer' => $this, 'row' => $row]
 );

  • Event name: admin_sales_order_address_update
  • File: vendor/magento/module-sales/Controller/Adminhtml/Order/AddressSave.php

 $this->_eventManager->dispatch(
  'admin_sales_order_address_update',
  [
   'order_id' => $address->getParentId()
  ]
 );

  • Event name: adminhtml_sales_order_create_process_data_before
  • File: vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php

 $this->_eventManager->dispatch('adminhtml_sales_order_create_process_data_before', $eventData);

  • Event name: adminhtml_sales_order_create_process_data
  • File: vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php

 $this->_eventManager->dispatch('adminhtml_sales_order_create_process_data', $eventData);

  • Event name: sales_order_place_before
  • File: vendor/magento/module-sales/Model/Order.php

 $this->_eventManager->dispatch('sales_order_place_before', ['order' => $this]);

  • Event name: sales_order_place_after
  • File: vendor/magento/module-sales/Model/Order.php

 $this->_eventManager->dispatch('sales_order_place_after', ['order' => $this]);

  • Event name: order_cancel_after
  • File: vendor/magento/module-sales/Model/Order.php

 $this->_eventManager->dispatch('order_cancel_after', ['order' => $this]);

  • Event name: sales_convert_order_to_quote
  • File: vendor/magento/module-sales/Model/AdminOrder/Create.php

 $this->_eventManager->dispatch('sales_convert_order_to_quote', ['order' => $order, 'quote' => $quote]);

  • Event name: sales_convert_order_item_to_quote_item
  • File: vendor/magento/module-sales/Model/AdminOrder/Create.php

 $this->_eventManager->dispatch(
  'sales_convert_order_item_to_quote_item',
  ['order_item' => $orderItem, 'quote_item' => $item]
 );

  • Event name: checkout_submit_all_after
  • File: vendor/magento/module-sales/Model/AdminOrder/Create.php

 $this->_eventManager->dispatch('checkout_submit_all_after', ['order' => $order, 'quote' => $quote]);

  • Event name: _sales_email_general_async_sending_
  • File: vendor/magento/module-sales/Model/Config/Backend/Email/AsyncSending.php

 $this->_eventManager->dispatch(
  $this->_eventPrefix . '_sales_email_general_async_sending_' . $state,
  $this->_getEventData()
 );

  • Event name: _dev_grid_async_indexing_
  • File: vendor/magento/module-sales/Model/Config/Backend/Grid/AsyncIndexing.php

 $this->_eventManager->dispatch(
  $this->_eventPrefix . '_dev_grid_async_indexing_' . $state,
  $this->_getEventData()
 );

  • Event name: sales_order_invoice_pay
  • File: vendor/magento/module-sales/Model/Order/Invoice.php

 $this->_eventManager->dispatch('sales_order_invoice_pay', [$this->_eventObject => $this]);

  • Event name: sales_order_invoice_cancel
  • File: vendor/magento/module-sales/Model/Order/Invoice.php

 $this->_eventManager->dispatch('sales_order_invoice_cancel', [$this->_eventObject => $this]);

  • Event name: sales_order_invoice_register
  • File: vendor/magento/module-sales/Model/Order/Invoice.php

 $this->_eventManager->dispatch(
  'sales_order_invoice_register',
  [$this->_eventObject => $this, 'order' => $order]
 );

  • Event name: sales_order_item_cancel
  • File: vendor/magento/module-sales/Model/Order/Item.php

 $this->_eventManager->dispatch('sales_order_item_cancel', ['item' => $this]);

  • Event name: sales_order_payment_place_start
  • File: vendor/magento/module-sales/Model/Order/Payment.php

 $this->_eventManager->dispatch('sales_order_payment_place_start', ['payment' => $this]);

  • Event name: sales_order_payment_place_end
  • File: vendor/magento/module-sales/Model/Order/Payment.php

 $this->_eventManager->dispatch('sales_order_payment_place_end', ['payment' => $this]);

  • Event name: sales_order_payment_cancel_invoice
  • File: vendor/magento/module-sales/Model/Order/Payment.php

 $this->_eventManager->dispatch(
  'sales_order_payment_cancel_invoice',
  ['payment' => $this, 'invoice' => $invoice]
 );

  • Event name: sales_order_payment_void
  • File: vendor/magento/module-sales/Model/Order/Payment.php

 $this->_eventManager->dispatch('sales_order_payment_void', ['payment' => $this, 'invoice' => $document]);

  • Event name: sales_order_payment_refund
  • File: vendor/magento/module-sales/Model/Order/Payment.php

 $this->_eventManager->dispatch(
  'sales_order_payment_refund',
  ['payment' => $this, 'creditmemo' => $creditmemo]
 );

  • Event name: sales_order_payment_cancel_creditmemo
  • File: vendor/magento/module-sales/Model/Order/Payment.php

 $this->_eventManager->dispatch(
  'sales_order_payment_cancel_creditmemo',
  ['payment' => $this, 'creditmemo' => $creditmemo]
 );

  • Event name: sales_order_payment_cancel
  • File: vendor/magento/module-sales/Model/Order/Payment.php

 $this->_eventManager->dispatch('sales_order_payment_cancel', ['payment' => $this]);

  • Event name: sales_order_status_unassign
  • File: vendor/magento/module-sales/Model/Order/Status.php

 $this->_eventManager->dispatch(
  'sales_order_status_unassign',
  [
   'status' => $this->getStatus(),
   'state' => $state
  ]
 );

  • Event name: _html_txn_id
  • File: vendor/magento/module-sales/Model/Order/Payment/Transaction.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_html_txn_id', $this->_getEventData());

  • Event name: _load_after
  • File: vendor/magento/module-sales/Model/ResourceModel/Order/Address/Collection.php

 $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', [$this->_eventObject => $this]);

  • Event name: _set_sales_order
  • File: vendor/magento/module-sales/Model/ResourceModel/Order/Collection/AbstractCollection.php

 $this->_eventManager->dispatch(
  $this->_eventPrefix . '_set_sales_order',
  ['collection' => $this, $this->_eventObject => $this, 'order' => $order]
 );

  • Event name: sales_sale_collection_query_before
  • File: vendor/magento/module-sales/Model/ResourceModel/Sale/Collection.php

 $this->_eventManager->dispatch('sales_sale_collection_query_before', ['collection' => $this]);

  • Event name: on_view_report
  • File: vendor/magento/module-search/Controller/Adminhtml/Term/Report.php

 $this->_eventManager->dispatch('on_view_report', ['report' => 'search']);

  • Event name: sendfriend_product
  • File: vendor/magento/module-send-friend/Controller/Product/Send.php

 $this->_eventManager->dispatch('sendfriend_product', ['product' => $product]);

  • Event name: swatch_gallery_upload_image_after
  • File: vendor/magento/module-swatches/Controller/Adminhtml/Iframe/Show.php

 $this->_eventManager->dispatch(
  'swatch_gallery_upload_image_after',
  ['result' => $result, 'action' => $this]
 );

  • Event name: adminhtml_cache_refresh_type
  • File: vendor/magento/module-tax/Controller/Adminhtml/Tax/IgnoreTaxNotification.php

 $this->_eventManager->dispatch('adminhtml_cache_refresh_type', ['type' => 'block_html']);

  • Event name: tax_rate_data_fetch
  • File: vendor/magento/module-tax/Model/Calculation.php

 $this->_eventManager->dispatch('tax_rate_data_fetch', ['request' => $request, 'sender' => $this]);

  • Event name: tax_settings_change_after
  • File: vendor/magento/module-tax/Model/Calculation/Rate.php

 $this->_eventManager->dispatch('tax_settings_change_after');

  • Event name: page_block_html_topmenu_gethtml_before
  • File: vendor/magento/module-theme/Block/Html/Topmenu.php

 $this->_eventManager->dispatch(
  'page_block_html_topmenu_gethtml_before',
  ['menu' => $this->_menu, 'block' => $this]
 );

  • Event name: page_block_html_topmenu_gethtml_after
  • File: vendor/magento/module-theme/Block/Html/Topmenu.php

 $this->_eventManager->dispatch(
  'page_block_html_topmenu_gethtml_after',
  ['menu' => $this->_menu, 'transportObject' => $transportObject]
 );

  • Event name: assign_theme_to_stores_after
  • File: vendor/magento/module-theme/Model/Config.php

        $this->_eventManager->dispatch(
            'assign_theme_to_stores_after',
            ['stores' => $stores, 'scope' => $scope, 'theme' => $theme]
        );

  • Event name: permissions_role_html_before
  • File: vendor/magento/module-user/Block/Role.php

 $this->_eventManager->dispatch('permissions_role_html_before', ['block' => $this]);

  • Event name: admin_permissions_role_prepare_save
  • File: vendor/magento/module-user/Controller/Adminhtml/User/Role/SaveRole.php

 $this->_eventManager->dispatch(
  'admin_permissions_role_prepare_save',
  ['object' => $role, 'request' => $this->getRequest()]
 );

  • Event name: admin_user_authenticate_before
  • File: vendor/magento/module-user/Model/User.php

 $this->_eventManager->dispatch(
  'admin_user_authenticate_before',
  ['username' => $username, 'user' => $this]
 );

  • Event name: admin_user_authenticate_after
  • File: vendor/magento/module-user/Model/User.php

 $this->_eventManager->dispatch(
  'admin_user_authenticate_after',
  ['username' => $username, 'password' => $password, 'user' => $this, 'result' => $result]
 );

  • Event name: admin_user_authenticate_after
  • File: vendor/magento/module-user/Model/User.php

 $this->_eventManager->dispatch(
  'admin_user_authenticate_after',
  [
   'username' => $this->getUserName(),
   'password' => $passwordString,
   'user' => $this,
   'result' => $isCheckSuccessful
  ]
 );

  • Event name: product_option_renderer_init
  • File: vendor/magento/module-wishlist/Block/Customer/Wishlist/Item/Options.php

 $this->_eventManager->dispatch('product_option_renderer_init', ['block' => $this]);

  • Event name: wishlist_add_product
  • File: vendor/magento/module-wishlist/Controller/Index/Add.php

    $this->_eventManager->dispatch(
 'wishlist_add_product',
 ['wishlist' => $wishlist, 'product' => $product, 'item' => $result]
    );

  • Event name: wishlist_share
  • File: vendor/magento/module-wishlist/Controller/Index/Send.php

 $this->_eventManager->dispatch('wishlist_share', ['wishlist' => $wishlist]);

  • Event name: wishlist_items_renewed
  • File: vendor/magento/module-wishlist/Helper/Data.php

 $this->_eventManager->dispatch('wishlist_items_renewed');

  • Event name: wishlist_product_add_after
  • File: vendor/magento/module-wishlist/Model/Wishlist.php

 $this->_eventManager->dispatch('wishlist_product_add_after', ['items' => $items]);

  • Event name: wishlist_item_collection_products_after_load
  • File: vendor/magento/module-wishlist/Model/ResourceModel/Item/Collection.php

 $this->_eventManager->dispatch(
  'wishlist_item_collection_products_after_load',
  ['product_collection' => $productCollection]
 );