// Fixed #PSCFI-5259 #PSCFI-3869 on PS 1.5
This commit is contained in:
@@ -87,6 +87,10 @@ class GetFileControllerCore extends FrontController
|
|||||||
if (!file_exists(_PS_DOWNLOAD_DIR_.$filename))
|
if (!file_exists(_PS_DOWNLOAD_DIR_.$filename))
|
||||||
$this->displayCustomError('This file no longer exists.');
|
$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();
|
$now = time();
|
||||||
|
|
||||||
$product_deadline = strtotime($info['download_deadline']);
|
$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 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 product has been deleted.' => Tools::displayError('This product has been deleted.'),
|
||||||
'This file no longer exists.' => Tools::displayError('This file no longer exists.'),
|
'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.'),
|
'The product deadline is in the past.' => Tools::displayError('The product deadline is in the past.'),
|
||||||
'Expiration date exceeded' => Tools::displayError('Expiration date exceeded'),
|
'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.'));
|
'You have reached the maximum number of allowed downloads.' => Tools::displayError('You have reached the maximum number of allowed downloads.'));
|
||||||
|
|||||||
@@ -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><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">
|
<td class="bold">
|
||||||
<label for="cb_{$product.id_order_detail|intval}">
|
<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}
|
{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'}&id_order={$order->id}&secure_key={$order->secure_key}")}" title="{l s='download this product'}">
|
<a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}&id_order={$order->id}&secure_key={$order->secure_key}")}" title="{l s='download this product'}">
|
||||||
{else}
|
{else}
|
||||||
|
|||||||
Reference in New Issue
Block a user