I have this simple code, which tries to update the product's name
& description
like this:
$productID = Mage::getModel('catalog/product')
->getIdBySku($product->Sku);
if ($productID)
{
$p = Mage::getModel('catalog/product');
$p->load($productID);
$p->setName($product->Name);
$p->setDescription($product->Description);
$p->save();
$p = null;
}
This causes the following error to occur:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3596-0-1-0' for key 'CC12C83765B562314470A24F2BDD0F36', query was: INSERT INTO
catalog_product_entity_group_price
(entity_id
,all_groups
,customer_group_id
,value
,website_id
) VALUES (?, ?, ?, ?, ?)
I've noticed this error only occurs IF the product has group_price
set on it (even though I am not updating this).
Any ideas? I am on magento 1.9.x