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

Inserting serial numbers on specific products
 
spkelly86
Jr. Member
 
Total Posts:  2
Joined:  2012-10-22
 

I have created a table on my database with a series of serial numbers and a true/false value to tell me whether or not they have been issued. I would like to either insert these values into a transactional email or attach a text file with the serial number to the email. What would be my best approach for this and what files would I need to edit to accomplish this? (not quite familiar with the magento model yet)

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Store_Manager
Enthusiast
 
Avatar
Total Posts:  867
Joined:  2012-07-09
 

Hello,

As for additional table, I definitely would not recommend to create any as Magento uses EAV database model (Entity–attribute–value) and you won’t be able to link this newly created table and apply it to your products.

What I actually do recommend is to add those serial number as attribute and in this way you will be able to apply them to your products. For example, create attribute group - Serial Numbers and in it create 2 attributes - Number and verification. For number put values that you have for serial numbers, for verification - yes/no.

In case you need to add those attributes in bulk or mass create them, you can use Store Manager for Magento application. It has option to import attributes or clone them. In any case, there is 14-day free version of the application, so you can give it a try -
http://www.magentocommerce.com/magento-connect/store-manager-for-magento.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
ModifyMage
Sr. Member
 
Avatar
Total Posts:  84
Joined:  2008-10-15
 

It’s perfectly fine to create your own database table. In fact, there is a wiki post titled ”Custom Module with Custom Database Table” that shows how to do it.

It is not required to use EAV to apply data from this newly created table to your products and/or orders.

You can add variables from your module to existing email templates like this:

http://stackoverflow.com/questions/11393479/add-custom-attribute-in-order-email-templates-magento

Or you can create your own templates to send like this:

http://magentocookbook.wordpress.com/2009/06/26/magento-email/

It really depends on what you are ultimately trying to accomplish which files you may need to either modify or create. There are a lot of ways to skin this monster. But, I hope I’ve assisted by pointing you in the right direction to start.

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