Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7720739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:44:51+00:00 2026-06-01T03:44:51+00:00

I want to create an observer for Product deletion. Means when admin deletes a

  • 0

I want to create an observer for Product deletion. Means when admin deletes a product, during deletion I want to add some custom functionality in this process. Currently I’m using

catalog_controller_product_delete

for this purpose. But it is doing nothing for me. Please help me. How can I do something extra during product deletion?

I want to send deleted product id to my API where I have copy of this product so that I can delete it from there too, but it is not triggering the event. I know this because I am triggering sendProductDelReq() method by <method>sendProductDelReq</method> and for verification I’ve put a die in this method.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:44:52+00:00Added an answer on June 1, 2026 at 3:44 am

    For the people that have encountered the same problem and who were hoping to find an answer here.
    I found the problem.
    First of all, how are you deleting the product?
    If you are deleting the product from within the product edit page, chances are your observer won’t work.
    If you are deleting the product from within the Product Grid page, your observer will probably work fine.

    The issue is that the event: catalog_controller_product_delete, only gets dispatched in the massDeleteAction() in the productController().
    And NOT inside the deleteAction().

    I’ve already submitted this issue as a bug at magentocommerce.com/bug-tracking.

    To fix this, paste this:

    Mage::dispatchEvent('catalog_controller_product_delete', array('product' => $product));
    

    Inside your deleteAction(), right before $product->delete();

    Like so:

    public function deleteAction()
    {
        if ($id = $this->getRequest()->getParam('id')) {
            $product = Mage::getModel('catalog/product')
                ->load($id);
            $sku = $product->getSku();
            try {
                Mage::dispatchEvent('catalog_controller_product_delete', array('product' => $product));
                $product->delete();
                $this->_getSession()->addSuccess($this->__('The product has been deleted.'));
            } catch (Exception $e) {
                $this->_getSession()->addError($e->getMessage());
            }
        }
        $this->getResponse()
            ->setRedirect($this->getUrl('*/*/', array('store'=>$this->getRequest()->getParam('store'))));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create conditional comments in XSLT. But when I use this: <!--
I have a string big_html and I want to add it to some div.
I want to do some post processing on an order, made using admin panel.
I want create a excel with Apache POI in java and I must insert
i want create image animation , i have 50 images with png format now
I want create module which update list of usb devices automatically (not only mass
We want to create a widget platform for a particular website. I couldn't find
I want to create a file in the current directory (where the executable is
I want to create a class with a nested enum. public class Foo {
I want to create a stored procedure (on SQL Server 2005) that fetches a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.