Delete product event hook

  • Hi!

    I'm trying to run a few queries when a product is deleted,edited or added from the perch_shop. I have no problem for the add/edit, but the delete event seems to never be triggered. This is what I'm doing :

    1. API = new PerchAPI(1.0, 'perch_shop');
    2. $API->on('*', function(PerchSystemEvent $Event){
    3. $DB = PerchDB::fetch();
    4. $dataToInsert = array("message" => "Event: ".$Event->event.".");
    5. $DB->insert('debug', $dataToInsert);
    6. });
  • drewm

    Approved the thread.