Prestashop 1.7 bug of the product gallery. When opening the quick view of the product on the product page, the quick view
Come back
25

Prestashop 1.7 bug of the product gallery. When opening the quick view of the product on the product page, the quick view

Perhaps you change the main image on the product page using a quick view of the product from the list of products that are displayed on the product page. I will give an example in the form of a video example of how this can happen.

[info about files]

When the quick view of the product opens and you decide to switch the option there, for example, change the color of the shirt from black to white, then the image on the top of the product will change. There is a solution to how you can remove this (but only this is temporary, because you may update Prestashop and lose the changes), but this serves as a Prestashop bug. We edit the main theme prestashop file itself "core.js" along the way themes/core.js (I know that it cannot be edited, but Alas, for now I have to edit it).

Below I am writing the code that will need to be added to the core.js file. Displayed an additional image with detailed file editing.

I will give the actions that I did in the code:

  • We add an additional class "js-quickview-modal" into a modal window that displays a quick view of the product
  • This class is added with a check if it worked quick look
  • Further we rely on this class and update the quick view content if it is displayed

Here is an image with an example in code (highlighted what will be needed):

Prestashop product gallery edit code

After adding the code, you may continue to change the image in the product, but you solved the problem with the attributes!, Then you will need to go to the file of the current theme theme.js and set the check for the class that was added earlier this "js-quickview-modal" when changing the image in the gallery.

If there is an idea how it can be done differently, then I will update the post.

created:
26.12.2020
updated:
15.11.2022
author:
admin
Tags
yandex metrika