Hi there,
I really would not edit a template file to add presentational code.
Adding it with CSS is much safer. Why don't you want to do that?
Whatever class sets the border, just add the WooCommerce image selector too. So E.G.
.bordered {
border:1px solid red;
}
becomes;
.bordered, ul.products li.product img, .single-product .images img {
border:1px solid red;
}
Thanks, Jay