You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The connector presently makes a call to retrieve all order states using this call in Openlabs_OpenERPConnector_Model_Sales_Order_Api:
/* Retrieve order states */publicfunctiongetOrderStates() {
return Mage::getSingleton("sales/order_config")->getStates();
}
The getStates() method was private until Magento 1.5, and will fail for any versions prior to that. In 1.4 and earlier, two separate methods exist instead, the results of which could be combined to achieve the same result, for example:
/* Retrieve order states - new version */publicfunctiongetOrderStates() {
$states = array();
try {
$states = Mage::getSingleton("sales/order_config")->getStates();
}
catch (Exception$e) {
/* getStates() not found - early Magento version */$visibleStates = Mage::getSingleton("sales/order_config")->getVisibleOnFrontStates();
$invisibleStates = Mage::getSingleton("sales/order_config")->getInvisibleOnFrontStates();
$states = $visibleStates + $invisibleStates;
}
return$states;
}
The text was updated successfully, but these errors were encountered:
The connector presently makes a call to retrieve all order states using this call in Openlabs_OpenERPConnector_Model_Sales_Order_Api:
The getStates() method was private until Magento 1.5, and will fail for any versions prior to that. In 1.4 and earlier, two separate methods exist instead, the results of which could be combined to achieve the same result, for example:
The text was updated successfully, but these errors were encountered: