Damodaran
Damodaran

Reputation: 11047

Add a custom attribute with magento store

Hi I need to add a custom attribute with the store in magento. Now when we are adding a new store to website it just ask 1) Website 2) Name 3) Root Category. Along with these i need to add an extra info about the store for example description about the store etc..

ie I need to add zip code with the store to inform the store is actually placed in the particular region.So that i can query the stores in a particular region using the zip code. Thanks in advance.....

Upvotes: 0

Views: 1905

Answers (1)

Andrey Tserkus
Andrey Tserkus

Reputation: 3634

It's hard to describe Magento novice how to add new attribute to a store :( Although for an experienced developer it's not hard:

  • show one more input field in templates
  • create mysql upgrade to add one more field for a store
  • overload standard store model and save this attribute along with store saving process

But there are good news! :) I think, that your problem can be solved much more easier - every store has Shipping origin address, that is set up in System -> Configuration -> Sales -> Shipping section section. So you can setup it for each of your stores and show zip code by that value.

The only case when this solution doesn't work - it's when shipping origin doesn't match your store's office location. In such a case you really need to add office address as store's attribute. If this is your case - I recommend you to hire some Magento developer at oDesk or somewhere else to describe and show you the process of adding, storing and retrieving these attributes. It really cannot be described in one text message at StackOverflow.

Upvotes: 2

Related Questions