1

如何为登录Magentoobserver的客户创建一个?

<events>
         <customer_login> <!-- identifier of the event we want to catch -->
           <observers>
             <Vi_Cartproduct> <!-- identifier of the event handler -->
               <type>singleton</type> <!-- class method call type; valid are model, object and singleton -->
               <class>cartproduct/observer</class> <!-- observers class alias -->
               <method>removeProduct</method>  <!-- observer's method to be called -->
               <args></args> <!-- additional arguments passed to observer -->
             </Vi_Cartproduct>
           </observers>
         </customer_login>
   </events>

上述事件不起作用

4

2 回答 2

2

试试这个....

<events>
    <customer_login>
        <observers>
            <vi_cartproduct_model_observer>
                <type>singleton</type>
                <class>Vi_Cartproduct_Model_Observer</class>
                <method>removeProduct</method>
            </vi_cartproduct_model_observer>
        </observers>
    </customer_login>
</events>
于 2013-04-10T11:08:03.180 回答
1

如果您只想自定义主题<customer_logged_in><customer_logged_out>您可以在布局中添加或删除任何块。

于 2013-04-10T10:15:02.733 回答