Jump to content
thirty bees forum
  • 0

Fails to download images after update to 1.6


Question

Posted (edited)

Hello,

while trying to import new products (csv import) I get the following:

None of the new products gets imported with images.

image.thumb.png.f610a87b7e9e5cd397359451e713b7a6.png

Edited by Marta

4 answers to this question

Recommended Posts

  • 0
Posted

There is:

 // Ensure the directory exists, or create it dynamically
            if (!is_dir($path)) {
                if (!mkdir($path, 0755, true) || !is_dir($path)) {
                    $errors[] = sprintf(Tools::displayError("Failed to create directory '%s'"), $path);
                    return false;
                }
            }

            // Create the new source image file
            $imageExtension = ImageManager::getDefaultImageExtension();

            $targetFile = $path . $filename . '.' . $imageExtension;
            if (! ImageManager::convertImageToExtension($tmpfile, $imageExtension, $targetFile)) {
                $error = sprintf(Tools::displayError("Failed to convert uploaded file to '%s' image format"), $imageExtension);
                $errors[] = $error;
                return false;
            }

            if ($regenerate) {
                // Generate all image types for source image
                ImageManager::generateImageTypesByEntity($entityType, $idEntity);
            }

            return true;
        } finally {
            if (file_exists($tmpfile)) {
                unlink($tmpfile);
            }
        }
    }

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...