Fix variant thumbnails not showing on frontend

The thumbnails for variant would not show on variant click. And the
product page opened without any visible thumbnails.

Fixes #3130