1

For the event name

cataloginventory_stock_revert_products_sale event

in Magento 1, what is the equivalent event in magento2?

Thanks

2

This is not a core event as pointed out by Raul.

This event is a part of the extension r-martins/magento-stock-history. You can see a rewrite to the class Mage_CatalogInventory_Model_Stock and injecting the event the rewrite class as you see below:

File: app/code/community/JR/StockHistory/Model/CatalogInventory/Stock.php

<?php

class JR_StockHistory_Model_CatalogInventory_Stock extends Mage_CatalogInventory_Model_Stock
{
    public function revertProductsSale($items)
    {
        parent::revertProductsSale($items);
        Mage::dispatchEvent('cataloginventory_stock_revert_products_sale', array('items' => $items));

        return $this;
    }
}

So there wont be any core event corresponding to this. Either you need to use an M2 extension corresponding to this module or use your own development to accomplish the same.

  • @PriyaM please accept any of the answer if it helped. please dont leave a question as it is. – Rajeev K Tomy Mar 14 '18 at 9:28
1

I think that event cataloginventory_stock_revert_products_sale is not available in a default Magento1 installation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.