Jump to content

Edit History

idnovate.com

idnovate.com

On 1/26/2023 at 11:19 PM, Shin_P said:

Hello everyone

Is there a way to show all the combination images on the product page, instead of only the image of the currently selected combination?

 

The new (1.7) behavior is to show only the image associated to the selected combination, hiding all the other pictures.

 

On 1.6 and earlier, all images were shown. And that made sense, as it was engaging for the user to see that there were other colors, other sizes, multiple pictures for multiple attribute combinations.

 

I know there's a workaround  (to assign all the images to every combination),  but that just doesn't make sense.

Is there a way to revert to the previous behavior?

 

All these changes in 1.7 really dont make any sense.

 

Thank you for any help you could give me.

And please don't point me to a paid module, because it would really look like that developers have stripped the base CMS just to push more module sales..

 

 

Edit function filterImagesForCombination() from class ProductLazyArray (src/Adapter/Presenter/Product/ProductLazyArray.php) :

private function filterImagesForCombination(array $images, int $productAttributeId)
{
    return $images;

    ...
}

https://github.com/PrestaShop/PrestaShop/blob/2e5e9c6720f562e73f005ff3c9d21ea98da9389b/src/Adapter/Presenter/Product/ProductLazyArray.php#L736

idnovate.com

idnovate.com

On 1/26/2023 at 11:19 PM, Shin_P said:

Hello everyone

Is there a way to show all the combination images on the product page, instead of only the image of the currently selected combination?

 

The new (1.7) behavior is to show only the image associated to the selected combination, hiding all the other pictures.

 

On 1.6 and earlier, all images were shown. And that made sense, as it was engaging for the user to see that there were other colors, other sizes, multiple pictures for multiple attribute combinations.

 

I know there's a workaround  (to assign all the images to every combination),  but that just doesn't make sense.

Is there a way to revert to the previous behavior?

 

All these changes in 1.7 really dont make any sense.

 

Thank you for any help you could give me.

And please don't point me to a paid module, because it would really look like that developers have stripped the base CMS just to push more module sales..

 

 

Edit function filterImagesForCombination() from class ProductLazyArray (src/Adapter/Presenter/Product/ProductLazyArray.php😞

private function filterImagesForCombination(array $images, int $productAttributeId)
{
    return $images;

    ...
}

https://github.com/PrestaShop/PrestaShop/blob/2e5e9c6720f562e73f005ff3c9d21ea98da9389b/src/Adapter/Presenter/Product/ProductLazyArray.php#L736

×
×
  • Create New...