It is strange! I just copy your logic and test it, not worked after that I start to debug model load flow, edited and review logs. So finally it worked! But my code same as yours:
Customweb_Saferpay module:
<models>
<saferpay>
<class>Customweb_Saferpay_Model</class>
<resourceModel>saferpay_mysql4</resourceModel>
</saferpay>
</models>
Etagen_SaferpayGuestOrderFix module:
<models>
<etagen_saferpayguestorderfix>
<class>Etagen_SaferpayGuestOrderFix_Model</class>
</etagen_saferpayguestorderfix>
<saferpay>
<rewrite>
<method>Etagen_SaferpayGuestOrderFix_Model_Method</method>
</rewrite>
</saferpay>
</models>
Method.php:
class Customweb_Saferpay_Model_Method
{
public function getPaymentPageLink()
{
return get_class($this);
}
}
Second one:
class Etagen_SaferpayGuestOrderFix_Model_Method extends Customweb_Saferpay_Model_Method{
}
Testing code:
$model = Mage::getModel('saferpay/method');
echo $model->getPaymentPageLink();
But result sometimes correct, sometimes incorrect (incorrect after cleaning of cache).
Finally I found such xml config and it gives correct result alltime:
<models>
<etagen_saferpayguestorderfix>
<class>Etagen_SaferpayGuestOrderFix_Model</class>
</etagen_saferpayguestorderfix>
<saferpay>
<deprecatedNode>etagen_saferpay</deprecatedNode>
</saferpay>
<etagen_saferpay>
<rewrite>
<method>Etagen_SaferpayGuestOrderFix_Model_Method</method>
</rewrite>
</etagen_saferpay>
</models>
Who reads this question, please, test it and I can't find reason of such behavior of Magento. Location of models are located in same code pool and maybe this is reason of such understandable situation.
This is the part that makes problem here.
<Mycompany_OrderExport>
<active>false</active>
<codePool>local</codePool>
<depends>
<Xtento_OrderExport />
</depends>
</Mycompany_OrderExport>
You have disabled your module by setting the active
node as false
. Turn it on. Means put true
for active. Make sure module is enabled through admin side. You can do this by go to
System > Configuration > Advanced
Clear all cache and then try again.
Best Answer
You are facing the error because your package file is missing package.xml file.
package.xml is automatically created when you package a Magento 1 extension from
The file will contain details about the extension like,
It will also contain details for your modules content/files and folders structure, which will be used when you install a package from your admin panel
So this file is essential for your Magento 1 packages.
How to Create package.xml
var/connect/
folderReference