Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do I implement a parent-children relationship? 
 
Fibo
Sr. Member
 
Avatar
Total Posts:  107
Joined:  2008-06-25
Marseille, France
 

Background:
- For one category of customer groups, I want to implement many groups, each of which might have several members
- although I could conceptually create these groups directly, I don’t feel totally comfortable with that, because form what I read here or there it seems that the group number might be used in a more restrictive way
- so I plan to create a new module which will create a “Groups” table and its management (using the wiki on module creation as a sound starting point), and to add in the customer table another field (using the wiki on additional customer fields) that would point to the correct id in the Groups table.
- the problem is to implement this parent-children relationship, so that in the customer form I get an option list with the names of Groups

Typical Groups table would be:
- group_id (primary key), group name, group address, group representative name etc

And the customers data table would have an additional field groups_id as a foreign key

I am sure that by trial and error, I will succeed in doing it… but if someone could give me or point me to some “howto” document or checklist… I (and others) would benefit from previous discoveries…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Fibo
Sr. Member
 
Avatar
Total Posts:  107
Joined:  2008-06-25
Marseille, France
 

B-(
Exploring Zend Framework…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top