V1.6 Problem in images display on Product pages in Prestashop 1.6.1.2RC3

rimas06

Member
XNullUser
Joined
Feb 22, 2022
Messages
187
Reaction score
4
Points
18
NullCash
3
Dear all,


I've just installed Prestashop 1.6.1.2RC3 and I am having the following problem.


On a product page, if a product has variants, images display ok and zoom functions correctly. See example here :





If a product does not have variants, images display but the zoom function does not work. See example of the following page:





On the js console I am getting the following error :


ReferenceError: combinationsHashSet is not defined product.js:949:7





I traced down what is different between the page with variants and the one without.


In product.js the test on line 78 is true in case of variants but false if there is no variant.





if (typeof combinations !== 'undefined' && combinations)
{
combinationsJS = [];
combinationsHashSet = {};
var k = 0;



it appears that combinations contains the list of variants but is undefined if there is no variant. Hence the variable combinationsHashSet gets initialized if there are variants but stays uninitialized if there is no variants.



If there are no variant, the zoom function does not work either with JqZoom or Fancybox.

I already tried to deactivate all options of concatenation, compression and caching of CSS and JavaScript but that does not change the behavior described above.



If anybody has any idea how I could fix the problem I would be very much thankful.

Lionel
 
Top