If writing a module to add and modify some catalog logic. Is there anything wrong or against any standards/best practices in creating a module named “Catalog” that lives in the app/code/local directory?
example:
app/
--code/
----local/
------Catalog/
--------controllers/
--------etc/
-or should it be prefixed, something like: Foo_Catalog
I’m specifically looking if best practices/standards for Magento exist for this. (not just opinion)
Best practices would be to in essence extend Catalog via your Module and its specific purpose. So if you are adding/modifying Product’s image gallery functionality within the Catalog module your module might be named CompanyName_NewGallery, thereafter you could have a folder structure like the such:
In your config.xml you would set it up so that your Gallery.php would overwrite magento’s in the following way:
Then declare your class and you can either totally overwrite the class and extend the original class’ parent (Mage_Core_Block_Template) or the original class (Mage_Catalog_Block_Product_Gallery)