diff --git a/admin-dev/tabs/AdminProducts.php b/admin-dev/tabs/AdminProducts.php
index f5640693b..f6bd01920 100644
--- a/admin-dev/tabs/AdminProducts.php
+++ b/admin-dev/tabs/AdminProducts.php
@@ -2643,15 +2643,26 @@ class AdminProducts extends AdminTab
if ($productDownload->id && file_exists($exists_file) || !empty($productDownload->display_filename))
{
- echo ''. $this->l('Yes').'
- '.$this->l('No').'
';
+ $check_yes = 'checked="checked"';
+ $check_no = '';
}
else
{
- echo ''. $this->l('Yes').'
- '.$this->l('No').'
';
+ if ($productDownload->id && !empty($cache_default_attribute))
+ {
+ $check_yes = 'checked="checked"';
+ $check_no = '';
+ }
+ else
+ {
+ $check_yes = '';
+ $check_no = 'checked="checked"';
+ }
}
+ echo ''. $this->l('Yes').'
+ '.$this->l('No').'
';
+
if (!file_exists($exists_file) && !empty($productDownload->display_filename) && empty($cache_default_attribute))
{
$msg = sprintf(Tools::displayError('This file "%s" is missing'), $productDownload->display_filename);
@@ -2752,7 +2763,7 @@ class AdminProducts extends AdminTab
{
$productDownloadAttribute = new ProductDownload($product['id_product_download']);
$exists_file2 = realpath(_PS_DOWNLOAD_DIR_).'/'.$productDownloadAttribute->filename;
- if (!file_exists($exists_file2))
+ if (!file_exists($exists_file2) && !empty($productDownloadAttribute->id_product_attribute))
{
$msg = sprintf(Tools::displayError('This file "%s" is missing'), $productDownloadAttribute->display_filename);
$error .= '
@@ -3702,7 +3713,7 @@ class AdminProducts extends AdminTab $id_product_download = (int) $productDownload->getIdFromIdProduct($this->getFieldValue($obj, 'id')); if (!empty($id_product_download)) $productDownload = new ProductDownload($id_product_download); - + $images = Image::getImages($this->context->language->id, $obj->id); if ($obj->id) { @@ -3988,13 +3999,13 @@ class AdminProducts extends AdminTab