Skip to main content
added 2 characters in body
Source Link
Alex
  • 14k
  • 19
  • 83
  • 167

I got lucky and found the event in the config.xml which led me to this method in Reports/Model/Event/Observer.phpReports/Model/Event/Observer.php

public function catalogProductView(Varien_Event_Observer $observer)
{
    $productId = $observer->getEvent()->getProduct()->getId();

    Mage::getModel('reports/product_index_viewed')
        ->setProductId($productId)
        ->save()
        ->calculate();

    return $this->_event(Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW, $productId);
}

Now to figure out why that isnt being called!

I got lucky and found the event in the config.xml which led me to this method in Reports/Model/Event/Observer.php

public function catalogProductView(Varien_Event_Observer $observer)
{
    $productId = $observer->getEvent()->getProduct()->getId();

    Mage::getModel('reports/product_index_viewed')
        ->setProductId($productId)
        ->save()
        ->calculate();

    return $this->_event(Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW, $productId);
}

Now to figure out why that isnt being called!

I got lucky and found the event in the config.xml which led me to this method in Reports/Model/Event/Observer.php

public function catalogProductView(Varien_Event_Observer $observer)
{
    $productId = $observer->getEvent()->getProduct()->getId();

    Mage::getModel('reports/product_index_viewed')
        ->setProductId($productId)
        ->save()
        ->calculate();

    return $this->_event(Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW, $productId);
}

Now to figure out why that isnt being called!

Source Link
Bryan Ruiz
  • 224
  • 5
  • 13

I got lucky and found the event in the config.xml which led me to this method in Reports/Model/Event/Observer.php

public function catalogProductView(Varien_Event_Observer $observer)
{
    $productId = $observer->getEvent()->getProduct()->getId();

    Mage::getModel('reports/product_index_viewed')
        ->setProductId($productId)
        ->save()
        ->calculate();

    return $this->_event(Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW, $productId);
}

Now to figure out why that isnt being called!