Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:29:02+00:00 2026-05-29T17:29:02+00:00

If writing a module to add and modify some catalog logic. Is there anything

  • 0

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)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:29:08+00:00Added an answer on May 29, 2026 at 5:29 pm

    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:

    app/
    --code/
    ----local/
    ------CompanyName/
    --------NewGallery/
    ----------Block/Catalog/Product/Gallery.php
    ----------controllers/Catalog/
    ----------etc/
    

    In your config.xml you would set it up so that your Gallery.php would overwrite magento’s in the following way:

    <global>
            <blocks>
                <sales>
                    <rewrite>
                        <product_gallery>CompanyName_NewGallery_Block_Catalog_Product_Gallery</product_gallery>
                    </rewrite>
                </sales>
            </blocks>
    </global>
    

    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)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing new kernel module and I add implement new IOCTL's. Is there any
I am writing a add-on module which is integrated with an existing PHP application;
I am writing module which allows to quick add users only by providing First
I'm writing a small module that will add a product to the cart automatically
I'm writing a small game in java. There's a server and a client module.
I'm writing a module to add functionality to the FlagShihTzu gem. Basically it goes
I am writing a module in Drupal 7, that shows some data from database
I'm writing some object module in Perl using Moose. I use to store instances
I'm writing a module and want to have a unified exception hierarchy for the
I'm writing a module that has several methods. Let's consider this : package MyPackage;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.