I have made a custom module and according to my need, and i want to make it customized. I want to make it store based,just like we have in product section. Any idea how this can be achieved?

ON grid view

ON edit page


You need to create an EAV entity. Here is a nice article by Inchoo that explain what you need to do http://inchoo.net/ecommerce/magento/creating-an-eav-based-models-in-magento/.
The only think they are missing there is the _decimal table for storing attribute values.
You can also find valuable pointers in here: http://makandracards.com/magento/25199-creating-an-eav-entity.

And I recommend you to give this Ultimate Module Creator. It allows you to build multi entity modules and for each entity you can specify if it's a flat entity or an EAV one.
It will also create the code for "Manage attributes" section for your EAV entities.

If you don't want to rebuild your module from scratch, it also has a built in help section explaining what files you need to create for EAV entities.

If you don't like any of these approaches you can try to replicate the Product entity from Magento.

  • Thankyou Marius, but i like a store swither in custom module as in product add in admin panel , like we can add a product with different name as with different store by store swither. – Ami Kamboj Jun 6 '14 at 8:05
  • @AmitKamboj. Yep. I got that. This is what the module creator will do for you. It will create the module code needed to have your entity EAV. Including the store switcher. Give it a try. It's free. And if you don't like it, well...you lose a few minutes of your time. But I bet you will like it. You can create your entities in a similar way you create a table using phpmyadmin. – Marius Jun 6 '14 at 8:07
  • Thankyou Marius i like your module creator and used also but it give store switer as in tab but i need it above like in product page in admin area i am going to add a screenshot in my question may be you understand what i need. and your Ultimate Module Creator is awesome, like your performance on magneto. Thankyou please give me answer i need it very urgent. – Ami Kamboj Jun 6 '14 at 8:10
  • 1
    @AmitKamboj. Maybe you haven't used the module creator for some time. I just released a new version like a month an a half ago that supports EAV entities. It will create exactly what you need. A store switcher on the top right of the add/edit page of the EAV entities. Just make sure when you create you entity you set its type to EAV. It also has the feature of linking your entities to stores just like the cms pages are linked (in a separate tab) but that's for flat entities - a totally different topic. – Marius Jun 6 '14 at 8:18
  • Okay thankyou Let me try it first Please. :) – Ami Kamboj Jun 6 '14 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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