Prestashop – Bigger Products Images on Order

Publié par David Sprang le

I case someone it’s interested to do this on PS1.7.7… you have to look at file:
/src/Adapter/Order/QueryHandler/GetOrderProductsForViewingHandler.php

Search for ImageManager::thumbnail and replace with the desidered value (the value it’s the size of the thumbnail in pixel).

This should be these two lines:

  • $product[‘image_tag’] = ImageManager::thumbnail(_PS_IMG_DIR_ . ‘p/’ . $product[‘image’]->getExistingImgPath() . ‘.jpg’, $name, 45, ‘jpg’);
  • $pack_item[‘image_tag’] = ImageManager::thumbnail(_PS_IMG_DIR_ . ‘p/’ . $pack_item[‘image’]->getExistingImgPath() . ‘.jpg’, $name, 45, ‘jpg’);

300 pixels is a good size to print your order.

  • $product[‘image_tag’] = ImageManager::thumbnail(_PS_IMG_DIR_ . ‘p/’ . $product[‘image’]->getExistingImgPath() . ‘.jpg’, $name, 300, ‘jpg’);
  • $pack_item[‘image_tag’] = ImageManager::thumbnail(_PS_IMG_DIR_ . ‘p/’ . $pack_item[‘image’]->getExistingImgPath() . ‘.jpg’, $name, 300, ‘jpg’);

After this modify probably you should delete all the images that start with « product_mini_ » into /img/tmp folder, in this way PS will regenerate them with the new size.

Source: https://www.prestashop.com/forums/topic/305254-bigger-image-in-bo-order-details-product-line/

Catégories : Prestashop

0 commentaire

Laisser un commentaire

Emplacement de l’avatar

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *