// small bugs in combinaitions of virtual products

This commit is contained in:
lLefevre
2011-12-19 13:20:30 +00:00
parent c97b48b394
commit cd80e68ae2
7 changed files with 57 additions and 43 deletions
+17
View File
@@ -228,6 +228,23 @@ class ProductDownloadCore extends ObjectModel
FROM `'._DB_PREFIX_.'product_download`
WHERE `id_product` = '.(int)$id_product.' AND `active` = 1');
}
/**
* Return the result from an id_product_attribute
*
* @param int $id_product Product the id
* @param int $id_product_attribute Attribute the id
* @return array result for this virtual product
*/
public static function getAttributeFromIdAttribute($id_product, $id_product_attribute)
{
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT *
FROM `'._DB_PREFIX_.'product_download`
WHERE `id_product` = '.(int)$id_product.'
AND `id_product_attribute` = '.(int)$id_product_attribute.'
AND `active` = 1');
}
/**
* Return the display filename from a physical filename