Hi!
I believe you don't need a custom module as you can create "extra fields" with the attributes feature built into X-Cart 5.
Just add a "global" attribute when editing a product, and it will appear for all products. Or you can create a "class" attribute that will show up for products having that class selected on the Attributes tab.
Here is an article on this feature:
http://kb.x-cart.com/display/XDD/Product+classes+and+attributes
Is it what you are looking for?