From 34aaeee0b54468160e04399ce890dc1462996bf9 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Tue, 29 Oct 2013 16:17:40 +0100 Subject: [PATCH] // Fixed product images on the dashboard --- modules/dashproducts/dashproducts.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/dashproducts/dashproducts.php b/modules/dashproducts/dashproducts.php index 85eb8a509..e20e9e596 100644 --- a/modules/dashproducts/dashproducts.php +++ b/modules/dashproducts/dashproducts.php @@ -183,10 +183,18 @@ class Dashproducts extends Module continue; $category = new Category($product_obj->getDefaultCategory(), $this->context->language->id); + $img = ''; + if (($row_image = Product::getCover($product_obj->id)) && $row_image['id_image']) + { + $image = new Image($row_image['id_image']); + $path_to_image = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$this->context->controller->imageType; + $img = ImageManager::thumbnail($path_to_image, 'product_mini_'.$product_obj->id.'.'.$this->context->controller->imageType, 45, $this->context->controller->imageType); + } + $body[] = array( array( 'id' => 'product', - 'value' => '', + 'value' => $img, 'class' => 'text-center' ), array(