1

Magento にログインしている顧客observer向けの を作成する方法は?

<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 に答える