// Fixed #PSCFI-5259 #PSCFI-3869 on PS 1.5

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14423 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2012-04-03 13:20:45 +00:00
parent 361dbcbb38
commit 50ed231470
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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.'));
+1 -1
View File
@@ -266,7 +266,7 @@
<td><label for="cb_{$product.id_order_detail|intval}">{if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}</label></td>
<td class="bold">
<label for="cb_{$product.id_order_detail|intval}">
{if $product.download_hash && $invoice && $product.display_filename != ''}
{if $product.download_hash && $invoice && $product.display_filename != '' && $product.product_quantity_refunded == 0 && $product.product_quantity_return == 0}
{if isset($is_guest) && $is_guest}
<a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}&amp;id_order={$order->id}&secure_key={$order->secure_key}")}" title="{l s='download this product'}">
{else}