Well I would contact the module developer "Stock By Attributes add on" and ask for his expertise ...

The key is to use Winmerge and compare the core file of Zen Cart with the add on's files to munge the code into the core file..
If the module was written for an earlier version of Zen is where you get into trouble..