/themes/default-bootstrap/js/product.js
найдите код
if (typeof(contentOnly) != 'undefined' && contentOnly)
{
$(document).on('click', '.fancybox', function(e){
e.preventDefault();
});
/* вот этот код отвечает за подстановку ссылки
* Begin
*/
$(document).on('click', '#image-block', function(e){
e.preventDefault();
var productUrl = window.document.location.href + '';
var data = productUrl.replace(/[\?|&]content_only=1/, '');
if (window.parent.page_name == 'search')
data += ((data.indexOf('?') < 0) ? '?' : '&') + 'HTTP_REFERER=' + encodeURIComponent(window.parent.document.location.href);
window.parent.document.location.href = data;
return;
});
/*
* end
*/
}
удалите или закоментируйте.