Skip to main content
added 226 characters in body
Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 64
  • 104
class SmashingMagazine_LogProductUpdate_Model_Observer { public function processPreDispatch(Varien_Event_Observer $observer) { $action = $observer->getEvent()->getControllerAction()->getFullActionName(); // Check to see if $action is a CMScontroller if ($action == 'cms_page_view') { $cache = Mage::app()->getCacheInstance(); // Tell Magento to 'ban' the use of FPC for this request $cache->banUse('full_page'); } } } 

PS : Also try to use controller_action_predispatch_cms_page_view. If this event is working for you, then go for it. It would be the best event for this scenario

Edit

I have tested this in my local machine and it works for me. You can get my extension here. Please try to use it.

class SmashingMagazine_LogProductUpdate_Model_Observer { public function processPreDispatch(Varien_Event_Observer $observer) { $action = $observer->getEvent()->getFullActionName(); // Check to see if $action is a CMScontroller if ($action == 'cms_page_view') { $cache = Mage::app()->getCacheInstance(); // Tell Magento to 'ban' the use of FPC for this request $cache->banUse('full_page'); } } } 

PS : Also try to use controller_action_predispatch_cms_page_view. If this event is working for you, then go for it. It would be the best event for this scenario

class SmashingMagazine_LogProductUpdate_Model_Observer { public function processPreDispatch(Varien_Event_Observer $observer) { $action = $observer->getEvent()->getControllerAction()->getFullActionName(); // Check to see if $action is a CMScontroller if ($action == 'cms_page_view') { $cache = Mage::app()->getCacheInstance(); // Tell Magento to 'ban' the use of FPC for this request $cache->banUse('full_page'); } } } 

PS : Also try to use controller_action_predispatch_cms_page_view. If this event is working for you, then go for it. It would be the best event for this scenario

Edit

I have tested this in my local machine and it works for me. You can get my extension here. Please try to use it.

added 1 character in body
Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 64
  • 104
<config> <modules> <SmashingMagazine_LogProductUpdate> <active>true</active> <codePool>core<<codePool>local</codePool> <depends> <Mage_Cms /> </depends> </SmashingMagazine_LogProductUpdate> </modules> </config> 
<config> <modules> <SmashingMagazine_LogProductUpdate> <active>true</active> <codePool>core</codePool> <depends> <Mage_Cms /> </depends> </SmashingMagazine_LogProductUpdate> </modules> </config> 
<config> <modules> <SmashingMagazine_LogProductUpdate> <active>true</active> <codePool>local</codePool> <depends> <Mage_Cms /> </depends> </SmashingMagazine_LogProductUpdate> </modules> </config> 
deleted 1 character in body
Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 64
  • 104

The name of the above event says it all. It gives a clear hint that, the event is going to happen before dispatching the controller action. A controller action is the place where magento is used to load and render the layout. So at the point of magento processing this event, magento didnt touch the layout part. So our first requirement satisfies here. Now if you look on the definition of this event you can see that it holds Mage_Core_Controller_Varien_ActionMage_Core_Controller_Front_Action instance.

The name of the above event says it all. It gives a clear hint that, the event is going to happen before dispatching the controller action. A controller action is the place where magento is used to load and render the layout. So at the point of magento processing this event, magento didnt touch the layout part. So our first requirement satisfies here. Now if you look on the definition of this event you can see that it holds Mage_Core_Controller_Varien_Action instance.

The name of the above event says it all. It gives a clear hint that, the event is going to happen before dispatching the controller action. A controller action is the place where magento is used to load and render the layout. So at the point of magento processing this event, magento didnt touch the layout part. So our first requirement satisfies here. Now if you look on the definition of this event you can see that it holds Mage_Core_Controller_Front_Action instance.

added 129 characters in body
Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 64
  • 104
Loading
added 129 characters in body
Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 64
  • 104
Loading
Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 64
  • 104
Loading