Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development

This commit is contained in:
vAugagneur
2013-01-24 18:26:33 +01:00
2 changed files with 14 additions and 7 deletions
+13 -6
View File
@@ -244,7 +244,7 @@ class ProductCore extends ObjectModel
'multilang' => true,
'multilang_shop' => true,
'fields' => array(
/* Classic fields */
// Classic fields
'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
@@ -3722,14 +3722,21 @@ class ProductCore extends ObjectModel
$row['specific_prices'] = $specific_prices;
$row['quantity'] = Product::getQuantity(
(int)$row['id_product'],
0,
isset($row['cache_is_pack']) ? $row['cache_is_pack'] : null
);
if ($row['id_product_attribute'])
$row['quantity_all_versions'] = Product::getQuantity(
{
$row['quantity_all_versions'] = $row['quantity'];
$row['quantity'] = Product::getQuantity(
(int)$row['id_product'],
0,
isset($row['cache_is_pack']) ? $row['cache_is_pack'] : null
$row['id_product_attribute'],
isset($row['cache_is_pack']) ? $row['cache_is_pack'] : null
);
else
$row['quantity'] = Product::getQuantity((int)$row['id_product']);
}
$row['id_image'] = Product::defineProductImage($row, $id_lang);
$row['features'] = Product::getFrontFeaturesStatic((int)$id_lang, $row['id_product']);
+1 -1
View File
@@ -2525,7 +2525,7 @@ class BlockLayered extends Module
LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category)
LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = cp.`id_product`
'.$join.'
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product)
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').')
LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image AND il.id_lang = '.(int)($cookie->id_lang).')
LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer)