3

In my plugin observer I want to call controller action but I do not know, I searched a lot but did not find any feasible solution for that. I have tried this one also-

 public function proccessFeeds()
    {

    //this i have added to call controller
     $url = "www.example.com";
     Mage::app()->getResponse()->setRedirect($url); 

        if ($this->_isWrongTimeStamp()) {
            // Handle the exit
            return;
        }

        $collection = Mage::getResourceModel('ranvi_feed/item_collection')
            ->addFieldToFilter('restart_cron', '1')
            ->addFieldToFilter('upload_day', array(
                'like' => '%' . strtolower(date('D')) . '%'
            ));

        foreach ($collection as $feed) {
            try {
                /** @var $feed Ranvi_Feed_Model_Item */
                $feed->generateFeed();
                $feed->clearInstance();
                unset($feed);
                //  }
            } catch (Exception $e) {
                $feed->setData('restart_cron', intval($feed->getData('restart_cron')) + 1);
                $feed->save();
                continue;
            }
        }
    }

but seems this is not correct.

halfer
  • 19,824
  • 17
  • 99
  • 186
Hina
  • 598
  • 1
  • 5
  • 20

0 Answers0