我是Magento內容的新手,現在我鎖定了一件事。我一直在試圖理解Magento的事件模型,我發現這條線:Magento事件模型問題
Mage::dispatchEvent('payment_method_is_active', array(
'result' => $checkResult,
'method_instance' => $this,
'quote' => $quote,
));
現在,我明白了dispatchEvent名爲「payment_method_is_active」要求的情況下,問題是我無法找到此事件無處。我認爲它應該在法師 - >支付 - >模型 - >方法 - >中,但直到現在我都找不到。
你能幫我解答嗎?
感謝Simon爲您提供了一個解決方案,問題在於我實施了一種付款方式,並且破解了我一直在使用的這段代碼,不允許我的付款方式被結帳頁面看到。但是我在選項「是」中說過被客戶視爲付款方式。說實話,我有點爲此煩惱。 請如果你能幫我一把,這真的很緊急,我不會找到答案,無論我尋找。 問候, 梅爾文 – katmel98
你可以在這裏下載一些〔實施例代碼:[http://examples.oreilly.de/german_examples/magentopaiger/](http://examples.oreilly.de/german_examples/magentopaiger/)。 Webkochshop_Payment模塊是一個簡單的支付模塊。希望這可以幫助。您還可以在網上找到其他教程。例如。 [這裏](https://colourgray.wordpress.com/2009/11/11/magento-create-a-custom-payment-method/)或[here](http://inchoo.net/ecommerce/magento/如何對創建-的Magento支付模塊/)。 – Simon