// Merge -> revision 8800

This commit is contained in:
rMalie
2011-09-27 14:30:06 +00:00
parent cde0690abc
commit 91083e190c
110 changed files with 1240 additions and 1066 deletions
+3 -2
View File
@@ -1543,7 +1543,7 @@ class ProductCore extends ObjectModel
'.$context->shop->sqlAsso('product', 'p').'
WHERE p.`active` = 1
AND p.`show_price` = 1
'.((!$beginning AND !$ending) ? ' AND p.`id_product` IN('.((is_array($ids_product) AND sizeof($ids_product)) ? implode(', ', $ids_product) : 0).')' : '').'
'.((!$beginning AND !$ending) ? ' AND p.`id_product` IN('.((is_array($ids_product) AND sizeof($ids_product)) ? implode(', ', array_map('intval', $ids_product)) : 0).')' : '').'
AND p.`id_product` IN (
SELECT cp.`id_product`
FROM `'._DB_PREFIX_.'category_group` cg
@@ -2809,6 +2809,7 @@ class ProductCore extends ObjectModel
public static function defineProductImage($row, $id_lang)
{
if (isset($row['id_image']))
if ($row['id_image'])
return $row['id_product'].'-'.$row['id_image'];
return Language::getIsoById((int)$id_lang).'-default';
@@ -3606,7 +3607,7 @@ class ProductCore extends ObjectModel
$row = Db::getInstance()->getRow('
SELECT `reference`
FROM `'._DB_PREFIX_.'product` p
WHERE p.reference = "'.$reference.'"');
WHERE p.reference = "'.pSQL($reference).'"');
return isset($row['reference']);
}