I have previously made a module which would allow a user to sign up for newsletters and decide on which type of newsletters they would receive e.g. promotion, new lines etc. This module was my first one and only one so far.
It took no consideration of the magento database. Basically I created two tables one for the users names and one for the users preferences. customer_entity_varchar was not used as the user did not have to be a member of the site (so no password is needed) to receive a newsletter.
I would like to try and bring my module more into line with the Magento standard now so I have completed the Alan Storm tutorial, to see how the tables can be created in an EAV style and read this article to get a better understanding of how to extend it properly but i'm really confused as to what tables i should add and even if I should use the customer_entity_varchar table to enter a users name who is not a site member as one column requires a password.
AIM OF MODULE
- allow users to sign up for newsletters without becoming a site member
- allow users to decide on which newsletters they want to receive
- allow admin to add new newsletter options on the frontend
- allow admin to see what a user is wanting to receive
After downloading the database chart I can see newsletter_subscriber and customer_entity are linked. I have come up with this
(the top two are current magento tables)
and would be interested in
- advice on how to improve it
- what considerations need to be taken into account when expanding the magento database?
- can/should tables always follow the EAV structure when using Magento?