Skip to content

Magento 1.9 / OpenMage: Adding a static attribute to the customer table and forms that is a physical coumn in the customer_entity table

After reading this thread that is sort of what we need to achieve (and does it with a custom attribute), it’s not quite what I need and so I thought it would be good to ask the experts here.

We have a table, let’s call it “customer_segment” with the following basic structure:

customer_segment_id
name

Then we’ve added a foreign key to the customer_entity table customer_segment_id that references the customer_segment_id in the customer_segment table.

Instead of hacking/overriding classes to get this field into the customer form, it seems logical that we can create a “static” attribute almost exactly like the customer group_id as it would also need to be attributed to orders, again just like group_id.

There are some hints in this post and the author appears to do a similar thing with the order entity.