I have this XML structure in my Alchemy directory module:
<?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Alchemy_Catalog> <version>0.1.0</version> </Alchemy_Catalog> </modules> <global> <models> <alchemycatalog> <rewrite> <product>Alchemy_Catalog_Model_Product</product> <block>Alchemy_Catalog_Model_Block</block> </rewrite> </alchemycatalog> </models> <events> <catalog_product_save_after> <observers> <Alchemy_Catalog> <type>singleton</type> <class>Alchemy_Catalog_Model_Product</class> <method>pingBaseProductService</method> </Alchemy_Catalog> </observers> </catalog_product_save_after> <catalog_category_save_after> <observers> <Alchemy_Catalog> <type>singleton</type> <class>Alchemy_Catalog_Model_Product</class> <method>pingBaseCategoryService</method> </Alchemy_Catalog> </observers> </catalog_category_save_after> <cms_block_save_before> <observers> <Alchemy_Catalog> <type>singleton</type> <class>Alchemy_Catalog_Model_Block</class> <method>rabbitmqBlockProducer</method> </Alchemy_Catalog> </observers> </cms_block_save_before> </events> </global> </config>
and this model, which must register a message in order to prove that it works:
<?php class Alchemy_Catalog_Model_Block extends Mage_Cms_Model_Block { protected $_eventPrefix = 'cms_block'; public function rabbitmqBlockProducer ($event) { Mage::log('save3 block invoked', null, 'marian.log'); } protected function _beforeSave() { Mage::log('save2 block invoked', null, 'marian.log'); } }
But the rabbitmqBlockProducer () method is never called. Note. Other methods for the product and catalog work very well.
Any help fixing this or any other method would be appreciated.
Marian zburlea
source share