From 7362ccc19fc42dbdd967ff9f6cf2bd4adb5145ec Mon Sep 17 00:00:00 2001 From: bMancone Date: Tue, 3 Apr 2012 13:20:45 +0000 Subject: [PATCH] // Fixed #PSCFI-5259 #PSCFI-3869 on PS 1.5 --- controllers/front/GetFileController.php | 5 +++++ themes/default/order-detail.tpl | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/controllers/front/GetFileController.php b/controllers/front/GetFileController.php index b71da6c56..e8e1ba2cf 100644 --- a/controllers/front/GetFileController.php +++ b/controllers/front/GetFileController.php @@ -87,6 +87,10 @@ class GetFileControllerCore extends FrontController if (!file_exists(_PS_DOWNLOAD_DIR_.$filename)) $this->displayCustomError('This file no longer exists.'); + if (isset($info['product_quantity_refunded']) && isset($info['product_quantity_return']) && + ($info['product_quantity_refunded'] > 0 || $info['product_quantity_return'])) + $this->displayCustomError('This product has been refunded.'); + $now = time(); $product_deadline = strtotime($info['download_deadline']); @@ -291,6 +295,7 @@ class GetFileControllerCore extends FrontController 'This product does not exist in our store.' => Tools::displayError('This product does not exist in our store.'), 'This product has been deleted.' => Tools::displayError('This product has been deleted.'), 'This file no longer exists.' => Tools::displayError('This file no longer exists.'), + 'This product has been refunded.' => Tools::displayError('This product has been refunded.'), 'The product deadline is in the past.' => Tools::displayError('The product deadline is in the past.'), 'Expiration date exceeded' => Tools::displayError('Expiration date exceeded'), 'You have reached the maximum number of allowed downloads.' => Tools::displayError('You have reached the maximum number of allowed downloads.')); diff --git a/themes/default/order-detail.tpl b/themes/default/order-detail.tpl index 762697b89..a90b2ff0e 100644 --- a/themes/default/order-detail.tpl +++ b/themes/default/order-detail.tpl @@ -266,7 +266,7 @@