// Stock : getStockId() copied in this new Class untill its implementation is done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9177 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This represents the physical stock
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class StockCore extends ObjectModel
|
||||
@@ -71,4 +72,17 @@ class StockCore extends ObjectModel
|
||||
$fields['price_te'] = (float)$this->price_te;
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* @TODO
|
||||
*/
|
||||
public static function getStockId($id_product, $id_product_attribute, $id_shop)
|
||||
{
|
||||
$sql = 'SELECT id_stock
|
||||
FROM '._DB_PREFIX_.'stock
|
||||
WHERE id_product = '.(int)$id_product.'
|
||||
AND id_product_attribute = '.(int)$id_product_attribute.'
|
||||
AND id_shop = '.(int)$id_shop;
|
||||
return (int)Db::getInstance()->getValue($sql);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user