From 68291e98f21e5c6197a56758fae44405d22d5976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Tantau?= Date: Mon, 18 Jul 2016 14:43:30 +0200 Subject: [PATCH] Allow any type as configurable children Allowing or dissallowing product types as configurable children is handled in Magento through the configuration 'global/catalog/product/type/configurable/allow_product_types'. When it is hardcoded into Magmi this eliminates the possibility of using custom product types as children. Magento already checks for allowed types when displaying them so I think we can safely ommit the check from Magmi. --- .../configurables/magmi_configurableprocessor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php b/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php index eaaad0ee..0e6b1fce 100644 --- a/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php +++ b/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php @@ -64,12 +64,12 @@ public function dolink($pid, $cond, $conddata = array()) // recreate associations $sql = "INSERT INTO $cpsl (`parent_id`,`product_id`) SELECT cpec.entity_id as parent_id,cpes.entity_id as product_id FROM $cpe as cpec - JOIN $cpe as cpes ON cpes.type_id IN ('simple','virtual') AND cpes.sku $cond + JOIN $cpe as cpes ON cpes.sku $cond WHERE cpec.entity_id=?"; $this->insert($sql, array_merge($conddata, array($pid))); $sql = "INSERT INTO $cpr (`parent_id`,`child_id`) SELECT cpec.entity_id as parent_id,cpes.entity_id as child_id FROM $cpe as cpec - JOIN $cpe as cpes ON cpes.type_id IN ('simple','virtual') AND cpes.sku $cond + JOIN $cpe as cpes ON cpes.sku $cond WHERE cpec.entity_id=?"; $this->insert($sql, array_merge($conddata, array($pid))); unset($conddata);