diff --git a/dashproducts.php b/dashproducts.php index 8f43848..0d11b29 100755 --- a/dashproducts.php +++ b/dashproducts.php @@ -231,7 +231,7 @@ public function getTableBestSellers($date_from, $date_to) $img = ''; if (($row_image = Product::getCover($product_obj->id)) && $row_image['id_image']) { $image = new Image((int) $row_image['id_image']); - $path_to_image = _PS_PROD_IMG_DIR_ . $image->getExistingImgPath() . '.' . $this->context->controller->imageType; + $path_to_image = (defined('_PS_PRODUCT_IMG_DIR_') ? _PS_PRODUCT_IMG_DIR_ : _PS_PROD_IMG_DIR_) . $image->getExistingImgPath() . '.' . $this->context->controller->imageType; $img = ImageManager::thumbnail($path_to_image, 'product_mini_' . $row_image['id_image'] . '.' . $this->context->controller->imageType, 45, $this->context->controller->imageType); } @@ -326,7 +326,7 @@ public function getTableMostViewed($date_from, $date_to) $img = ''; if (($row_image = Product::getCover($product_obj->id)) && $row_image['id_image']) { $image = new Image((int) $row_image['id_image']); - $path_to_image = _PS_PROD_IMG_DIR_ . $image->getExistingImgPath() . '.' . $this->context->controller->imageType; + $path_to_image = (defined('_PS_PRODUCT_IMG_DIR_') ? _PS_PRODUCT_IMG_DIR_ : _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,