//unlink carrier from product fix bug

This commit is contained in:
vAugagneur
2012-09-05 15:20:13 +00:00
parent 4acec40fbf
commit 46d38a8ac9
2 changed files with 8 additions and 9 deletions
@@ -3396,13 +3396,13 @@ class AdminProductsControllerCore extends AdminController
protected function addCarriers()
{
if (Tools::getValue('carriers'))
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
{
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
{
if (Tools::getValue('carriers'))
$product->setCarriers(Tools::getValue('carriers'));
}
$carriers = array();
if (Tools::getValue('carriers'))
$carriers = Tools::getValue('carriers');
$product->setCarriers($carriers);
}
}