// Improve StockAvailable requests + code refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10855 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+5
-3
@@ -4212,10 +4212,12 @@ class ProductCore extends ObjectModel
|
||||
public function setCoverWs($id_image)
|
||||
{
|
||||
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'image`
|
||||
SET `cover` = 0 WHERE `id_product` = '.(int)$this->id.'
|
||||
');
|
||||
SET `cover` = 0 WHERE `id_product` = '.(int)$this->id.'
|
||||
');
|
||||
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'image`
|
||||
SET `cover` = 1 WHERE `id_product` = '.(int)$this->id.' AND `id_image` = '.(int)$id_image);
|
||||
SET `cover` = 1 WHERE `id_product` = '.(int)$this->id.' AND `id_image` = '.(int)$id_image
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user