From 4b8ae2693c5b94a137db7a3f1bd38362461aad1c Mon Sep 17 00:00:00 2001 From: lBrieu Date: Wed, 5 Oct 2011 14:28:47 +0000 Subject: [PATCH] [*] FO : Hide the download link and download icon if the virtual product do not have files associated with it git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9063 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Order.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/Order.php b/classes/Order.php index 9b6a49ffe..deaac8a20 100644 --- a/classes/Order.php +++ b/classes/Order.php @@ -505,6 +505,8 @@ class OrderCore extends ObjectModel { $row['filename'] = ProductDownload::getFilenameFromIdProduct((int)$row['product_id']); } + // Get the display filename + $row['display_filename'] = ProductDownload::getFilenameFromFilename($row['filename']); } /* Stock product */ $resultArray[(int)$row['id_order_detail']] = $row; @@ -547,7 +549,7 @@ class OrderCore extends ObjectModel foreach ($products AS $product) { $pd = ProductDownload::getIdFromIdProduct((int)($product['product_id'])); - if ($pd AND Validate::isUnsignedInt($pd) AND $product['download_hash']) + if ($pd AND Validate::isUnsignedInt($pd) AND $product['download_hash'] AND $product['display_filename'] != '') { if ($strict === false) return true;