// Fix download file
This commit is contained in:
@@ -200,6 +200,7 @@ class OrderDetailCore extends ObjectModel
|
|||||||
FROM `'._DB_PREFIX_.'order_detail` od
|
FROM `'._DB_PREFIX_.'order_detail` od
|
||||||
LEFT JOIN `'._DB_PREFIX_.'product_download` pd ON (od.`product_id`=pd.`id_product`)
|
LEFT JOIN `'._DB_PREFIX_.'product_download` pd ON (od.`product_id`=pd.`id_product`)
|
||||||
WHERE od.`download_hash` = \''.pSQL(strval($hash)).'\'
|
WHERE od.`download_hash` = \''.pSQL(strval($hash)).'\'
|
||||||
|
AND od.`product_attribute_id` = pd.`id_product_attribute`
|
||||||
AND pd.`active` = 1';
|
AND pd.`active` = 1';
|
||||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,7 +267,6 @@ class GetFileControllerCore extends FrontController
|
|||||||
$mimeType = 'application/octet-stream';
|
$mimeType = 'application/octet-stream';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Set headers for download */
|
/* Set headers for download */
|
||||||
header('Content-Transfer-Encoding: binary');
|
header('Content-Transfer-Encoding: binary');
|
||||||
header('Content-Type: '.$mimeType);
|
header('Content-Type: '.$mimeType);
|
||||||
|
|||||||
Reference in New Issue
Block a user