this is a condition in canInvoice() of the order but I can’t find this function I used editplus to search in all kind files with “getLockedDoInvoice” and it wasn’t able to find it

any clues?


Note: The original question is from this link: http://www.magentocommerce.com/boards%20/viewthread/177372/

I just find this very useful to me, so I am reposting it here for the benefit of other people.

1 Answer 1


This is a general rule for almost every object in Magento.

If you cannot find a method that starts with ‘get’ (for example $obj->getSomeField()) this means is a substitute for getData() method with an array key. In the example above the key is some_field. So in conclusion $obj->getSomeField() translates into $obj->getData(’some_field’). In your case $this->getLockedDoInvoice() translates into $obj->getData(’locked_do_invoice’).

The rule of building the getData parameter is simple.

Remove ‘get’ from the method’s name and each uppercase letter except the first one turn it into underscore (_) followed by the same letter lower case. This method also applies to methods that don’t exist and start with ‘set’, ‘uns’ or ‘has’. This is possible for all the classes that extend Varien_Object. For a clearer understanding look for the method __call() in class Varien_Object (lib\Varien\Object.php)


  • @Marius : always rocks :) Aug 15, 2014 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.