// #PSTEST-1229 - remove virtual combinations

This commit is contained in:
tDidierjean
2012-04-24 13:23:02 +00:00
parent a7eb7256d8
commit 6d296b2613
8 changed files with 73 additions and 472 deletions
+1 -4
View File
@@ -568,10 +568,7 @@ class OrderCore extends ObjectModel
// Add information for virtual product
if ($row['download_hash'] && !empty($row['download_hash']))
{
if ($row['product_attribute_id'] && !empty($row['product_attribute_id']))
$row['filename'] = ProductDownload::getFilenameFromIdAttribute((int)$row['product_id'], (int)$row['product_attribute_id']);
else
$row['filename'] = ProductDownload::getFilenameFromIdProduct((int)$row['product_id']);
$row['filename'] = ProductDownload::getFilenameFromIdProduct((int)$row['product_id']);
// Get the display filename
$row['display_filename'] = ProductDownload::getFilenameFromFilename($row['filename']);
}
+1 -1
View File
@@ -321,7 +321,7 @@ class OrderHistoryCore extends ObjectModel
$assign = array();
foreach ($virtual_products as $key => $virtual_product)
{
$id_product_download = ProductDownload::getIdFromIdAttribute($virtual_product['product_id'], $virtual_product['product_attribute_id']);
$id_product_download = ProductDownload::getIdFromIdProduct($virtual_product['product_id']);
$product_download = new ProductDownload($id_product_download);
// If this virtual item has an associated file, we'll provide the link to download the file in the email
if ($product_download->display_filename != '')
+1 -4
View File
@@ -150,10 +150,7 @@ class OrderInvoiceCore extends ObjectModel
// Add information for virtual product
if ($row['download_hash'] && !empty($row['download_hash']))
{
if ($row['product_attribute_id'] && !empty($row['product_attribute_id']))
$row['filename'] = ProductDownload::getFilenameFromIdAttribute((int)$row['product_id'], (int)$row['product_attribute_id']);
else
$row['filename'] = ProductDownload::getFilenameFromIdProduct((int)$row['product_id']);
$row['filename'] = ProductDownload::getFilenameFromIdProduct((int)$row['product_id']);
// Get the display filename
$row['display_filename'] = ProductDownload::getFilenameFromFilename($row['filename']);
}