Magento Varien Files – How to Patch or Rewrite Files in lib/Varien

adminformform-validationpatchesvarienvarien-file-uploader

I would like to know people's thoughts on the best way to patch/rewrite Varien lib files. Specifically whey looking into a couple of issues one with checkboxes and one with image type inputs I found that both these Varien elements have what I would deem as bugs.

So my What is the upgrade safe way of updating the following files?

  1. Varien_Data_Form_Element_Image
  2. Varien_Data_Form_Element_Checkboxes

Best Answer

Unfortunately there is no way to override these classes.
What you can do is treat them as abstract core classes.
Copy them to the local folder and make your changes there.
There is also the long and painful option of creating your own classes and changing the code that uses them to use your classes.
But that may end badly. It may not even be possible.

Related Topic