prepare the code for sharing the product registration

to use the same code for base product and addons