change gitignore + class product
This commit is contained in:
parent
06d5d227c8
commit
1426efaff2
4
.gitignore
vendored
4
.gitignore
vendored
@ -110,4 +110,6 @@ modules/privatesales_logistique/files/*
|
||||
modules/emarsys_rss/flux.xml
|
||||
modules/emarsys_rss/*.xml
|
||||
modules/bulkupdate/*.csv
|
||||
modules/logistics/carriers/laposte/summaries/*.pdf
|
||||
modules/logistics/carriers/laposte/summaries/*.pdf
|
||||
modules/labelgenerate/img/
|
||||
modules/labelgenerate/img/*
|
@ -32,7 +32,7 @@ class Product extends ProductCore
|
||||
if ($cached) {
|
||||
$cacheKey = $row['id_product'].'-'.$row['id_product_attribute'].'-'.$id_lang.'-'.(int)($usetax);
|
||||
if (array_key_exists($cacheKey, self::$producPropertiesCache))
|
||||
return self::$producPropertiesCache[$cacheKey];
|
||||
return self::$producPropertiesCache[$cacheKey];
|
||||
}
|
||||
|
||||
// Datas
|
||||
@ -74,7 +74,7 @@ class Product extends ProductCore
|
||||
|
||||
if ($cached) {
|
||||
self::$producPropertiesCache[$cacheKey] = $row;
|
||||
return self::$producPropertiesCache[$cacheKey];
|
||||
return self::$producPropertiesCache[$cacheKey];
|
||||
} else {
|
||||
return $row;
|
||||
}
|
||||
@ -90,4 +90,16 @@ class Product extends ProductCore
|
||||
}
|
||||
}
|
||||
|
||||
public static function getDetailsCombination($id_product_attribute, $id_lang) {
|
||||
return Db::getInstance()->ExecuteS('
|
||||
SELECT pa.*, ag.`id_attribute_group`, ag.`is_color_group`, agl.`name` AS group_name, al.`name` AS attribute_name, a.`id_attribute`, pa.`unit_price_impact`
|
||||
FROM `'._DB_PREFIX_.'product_attribute` pa
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON pac.`id_product_attribute` = pa.`id_product_attribute`
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a ON a.`id_attribute` = pac.`id_attribute`
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON ag.`id_attribute_group` = a.`id_attribute_group`
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)($id_lang).')
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)($id_lang).')
|
||||
WHERE pa.`id_product_attribute` = '.(int)($id_product_attribute).'
|
||||
ORDER BY pa.`id_product_attribute`');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user