// add check stock value for color list if needed

This commit is contained in:
Rémi Gaillard
2013-10-11 14:11:12 +02:00
parent 809eac6308
commit 1316bd7e1f
4 changed files with 64 additions and 6 deletions
+11
View File
@@ -268,6 +268,17 @@ class CombinationCore extends ObjectModel
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
}
public function getColorsAttributes()
{
return Db::getInstance()->executeS('
SELECT a.id_attribute
FROM '._DB_PREFIX_.'product_attribute_combination pac
JOIN '._DB_PREFIX_.'attribute a ON (pac.id_attribute = a.id_attribute)
JOIN '._DB_PREFIX_.'attribute_group ag ON (ag.id_attribute_group = a.id_attribute_group)
WHERE pac.id_product_attribute='.(int)$this->id.' AND ag.is_color_group = 1
');
}
/**
* Retrive the price of combination