I would suggest the following approach
- Decide on the features that are generally available on all e commerce websites (Like a e cart).
- Decide a few functionalities that will be common across all e commerce websites.(Add and Delete from the cart).
- Define how will your application recognise how to perform those specific functions on the website - Deploy hooks.
- Write your application as generic as you can and concentrate on how the hooks should be designed.
Personal opinon - All e-commerce websites are very specific to their vision- My best guess is for all e-commerce websites - The ROI on such a project is questionable. The maximum coverage will come to 40% out of the box - And specific hook deployment will take up most of your time.