php - Magento 1.7 Observer Method -


i believe have config issue code below, module activated observer not being fired on event. can spot issue?

app/etc/modules/james_coreproductcheck.xml

<?xml version="1.0"?> <config> <modules>     <james_coreproductcheck>         <active>true</active>         <codepool>local</codepool>     </james_coreproductcheck> </modules> </config> 

app/code/local/james/coreproductcheck/etc/config.xml

<?xml version="1.0"?> <config>  <modules>    <james_coreproductcheck>      <version>0.0.1</version>    </james_coreproductcheck>  </modules> <global> <models>   <james_coreproductcheck>     <class>james_coreproductcheck_model</class>   </james_coreproductcheck> </models>   <events>     <checkout_cart_product_add_after>       <observers>         <james_coreproduct_check_model_observer>           <type>singleton</type>           <class>james_coreproductcheck_model_observer</class>           <method>check</method>         </james_coreproduct_check_model_observer>       </observers>     </checkout_cart_product_add_after>   </events> </global> </config> 

app/code/local/james/coreproductcheck/model/observer.php

class james_coreproductcheck_model_observer {     public function check(varien_event_observer $observer) {        mage::log('yet product added', null, 'product-updates.log');   } } 

try one.

     <events>         <checkout_cart_product_add_after>             <observers>                 <sales_quote_add_item>                     <class>james_coreproductcheck_model_observer</class>                     <method>check</method>                 </sales_quote_add_item>             </observers>         </checkout_cart_product_add_after>       </events> 

make sure clear cache. :)


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -