WordPress e-commerce get list of product’s images

I wanted to customize e-commerce product default view.
One of the aspect was to list all the gallery images on the page.

See the following PHP code to get this information from DataBase.

This will show the list of clickable thumbnails.

Note: this method works for e-Commerce v. 3.8.7.4