// 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:
1 parent
9658d81762
commit
251dd966b7
1 file changed
+14
@@ -26,6 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* This represents the physical stock
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
class StockCore extends ObjectModel
|
class StockCore extends ObjectModel
|
||||||
@@ -71,4 +72,17 @@ class StockCore extends ObjectModel
|
|||||||
$fields['price_te'] = (float)$this->price_te;
|
$fields['price_te'] = (float)$this->price_te;
|
||||||
return $fields;
|
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