diff --git a/magmi/plugins/extra/itemprocessors/imageprocessor/imageitattributeemprocessor.php b/magmi/plugins/extra/itemprocessors/imageprocessor/imageitattributeemprocessor.php index cdda8164..433e9daa 100644 --- a/magmi/plugins/extra/itemprocessors/imageprocessor/imageitattributeemprocessor.php +++ b/magmi/plugins/extra/itemprocessors/imageprocessor/imageitattributeemprocessor.php @@ -484,10 +484,13 @@ public function copyImageFile($imgfile, &$item, $extra) $impath = "/$i1/$i2/$bimgfile"; // target directory; - if(!strstr(getcwd(), "pub")) + if(!strstr(getcwd(), "pub")) { $l2d = "pub/media/catalog/product/$i1/$i2"; - else + } + else { $l2d = "media/catalog/product/$i1/$i2"; + } + // test for existence $targetpath = "$l2d/$bimgfile"; diff --git a/magmi/plugins/utilities/clearproducts/clearproduct.php b/magmi/plugins/utilities/clearproducts/clearproduct.php index 428707b5..a04a322a 100644 --- a/magmi/plugins/utilities/clearproducts/clearproduct.php +++ b/magmi/plugins/utilities/clearproducts/clearproduct.php @@ -58,7 +58,6 @@ public function runUtility() } //clean url rewrites for products - //$sql = "DELETE FROM ".$this->tablename("core_url_rewrite")." WHERE product_id IS NOT NULL AND is_system=1"; $sql = "DELETE FROM ".$this->tablename("url_rewrite")." WHERE entity_id IS NOT NULL AND is_autogenerated=1"; $this->delete($sql);