This is not a bug, as you have done something to the either the button template or the product template to cause this error. Moving to template editing forum.
Try restoring the files you have edited and start over to make sure you code it correctly.
Also, while it is good of you to post your version, you really need to add it to your signature. Edit profile, enter version, enter password, hit save.
For future reference, if you want to report a bug, first verify that the problem exists on the X-Cart demo site. If it does not, you will need to post in a different forum. Thanks!
