I have a custom module that initiates on sales_order_invoice_register.
<events>
<sales_order_invoice_register>
<observers>
<make_sap>
<type>singleton</type>
<class>make_sap/observer</class>
<method>orderExport</method>
</make_sap>
</observers>
</sales_order_invoice_register>
</events>
In my Observer.php I want to retrieve the value of a custom variable from Magento:
class Make_Sap_Model_Observer {
private $_wsdlUrl = Mage::getModel('core/variable')->loadByCode('jgc_wsdlUrl')->getValue('text');
private $_user = Mage::getModel('core/variable')->loadByCode('jgc_wsdlUser')->getValue('text');
private $_pass = Mage::getModel('core/variable')->loadByCode('jgc_wsdlUser')->getValue('text');
With this, I get a server error