Reputation: 258
What I doing wrong?
config.xml
...
<helpers>
<lacpaycs>
<class>OS_LacPayCS_Helper</class>
</lacpaycs>
</helpers>
</global>
<frontend>
<events>
<sales_model_service_quote_submit_before>
<observers>
<lacpaycs>
<type>singleton</type>
<class>OS_LacPayCS_Model_Observer</class>
<method>lacpaycs_payment_send</method>
</lacpaycs>
</observers>
</sales_model_service_quote_submit_before>
</events>
...
then in Observer Code:
public function lacpaycs_payment_send(Varien_Object $observer)
{
...
$helper = Mage::helper('laqpaycs');
and I getting error - magento tries to get helper from Mage/Laqpaycs/Helper/Data.php
How to say magento that it must get helper from OS/LaqPayCS/Helper/Data.php
Upvotes: 0
Views: 2941
Reputation: 23205
You have a typo.
Your helper class group is <lacpaycs>
but your helper factory argument is laqpaycs
. Change your argument to lacpaycs
and, provided that you have a class definition for OS_LacPayCS_Helper_Data
at OS/LacPayCS/Helper/Data.php`, your class will be instantiated.
Upvotes: 2