// Fix ObjectModel::updateMultishopTable() for Combination
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14690 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
456ea2a191
commit
e7b7ab9371
2 files changed
+5
-5
No files matched your search
+4
-4
@@ -1099,7 +1099,7 @@ class ProductCore extends ObjectModel
|
|||||||
$reference, $ean13, $default, $location, $upc, $minimal_quantity);
|
$reference, $ean13, $default, $location, $upc, $minimal_quantity);
|
||||||
|
|
||||||
$this->addSupplierReference($supplier_reference, $id_product_attribute);
|
$this->addSupplierReference($supplier_reference, $id_product_attribute);
|
||||||
$result = ObjectModel::updateMultishopTable('product_attribute', array(
|
$result = ObjectModel::updateMultishopTable('Combination', array(
|
||||||
'wholesale_price' => (float)$wholesale_price,
|
'wholesale_price' => (float)$wholesale_price,
|
||||||
), 'id_product_attribute = '.(int)$id_product_attribute);
|
), 'id_product_attribute = '.(int)$id_product_attribute);
|
||||||
|
|
||||||
@@ -1135,14 +1135,14 @@ class ProductCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public function deleteDefaultAttributes()
|
public function deleteDefaultAttributes()
|
||||||
{
|
{
|
||||||
return ObjectModel::updateMultishopTable('product_attribute', array(
|
return ObjectModel::updateMultishopTable('Combination', array(
|
||||||
'default_on' => 0,
|
'default_on' => 0,
|
||||||
), 'id_product = '.(int)$this->id);
|
), 'id_product = '.(int)$this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDefaultAttribute($id_product_attribute)
|
public function setDefaultAttribute($id_product_attribute)
|
||||||
{
|
{
|
||||||
$result = ObjectModel::updateMultishopTable('product_attribute', array(
|
$result = ObjectModel::updateMultishopTable('Combination', array(
|
||||||
'default_on' => 1
|
'default_on' => 1
|
||||||
), '`id_product` = '.(int)$this->id.' AND `id_product_attribute` = '.(int)$id_product_attribute);
|
), '`id_product` = '.(int)$this->id.' AND `id_product_attribute` = '.(int)$id_product_attribute);
|
||||||
|
|
||||||
@@ -2762,7 +2762,7 @@ class ProductCore extends ObjectModel
|
|||||||
if (!$mini)
|
if (!$mini)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!ObjectModel::updateMultishopTable('product_attribute', array('default_on' => 1), 'id_product_attribute = '.(int)$mini['id_attr']))
|
if (!ObjectModel::updateMultishopTable('Combination', array('default_on' => 1), 'id_product_attribute = '.(int)$mini['id_attr']))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2482,7 +2482,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$where = '
|
$where = '
|
||||||
id_product = '.(int)$product->id.'
|
id_product = '.(int)$product->id.'
|
||||||
AND id_product_attribute = '.(int)$attribute['id_product_attribute'];
|
AND id_product_attribute = '.(int)$attribute['id_product_attribute'];
|
||||||
ObjectModel::updateMultishopTable('product_attribute', $data, $where);
|
ObjectModel::updateMultishopTable('Combination', $data, $where);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user