[-] BO - fixed bug #PSCFV-6248 don't delete product when delete category and choose option to delete products

This commit is contained in:
vAugagneur
2013-01-24 18:51:09 +01:00
parent fa3faf5369
commit 578139a462
@@ -619,10 +619,10 @@ class AdminCategoriesControllerCore extends AdminController
SELECT p.`id_product` FROM `'._DB_PREFIX_.'product` p
'.Shop::addSqlAssociation('product', 'p').'
WHERE p.`id_product` NOT IN (SELECT DISTINCT(cp.`id_product`) FROM `'._DB_PREFIX_.'category_product` cp)');
foreach ($fatherless_products as $id_poor_product)
{
$poor_product = new Product((int)$id_poor_product);
$poor_product = new Product((int)$id_poor_product['id_product']);
if (Validate::isLoadedObject($poor_product))
{
if ($this->remove_products || $id_parent == 0)