istage Posted December 16, 2009 Share Posted December 16, 2009 how to solved this problem? Link to comment Share on other sites More sharing options...
istage Posted December 16, 2009 Author Share Posted December 16, 2009 private static function copyImg($id_entity, $id_image = NULL, $url, $entity = 'products') { $tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'ps_import'); switch($entity) { default: case 'products': $path = _PS_PROD_IMG_DIR_.intval($id_entity).'-'.intval($id_image); break; case 'categories': $path = _PS_CAT_IMG_DIR_.intval($id_entity); break; } if (@copy($url, $tmpfile)) { imageResize($tmpfile, $path.'.jpg'); $imagesTypes = ImageType::getImagesTypes($entity); foreach ($imagesTypes AS $k => $imageType) imageResize($tmpfile, $path.'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height']); } else { unlink($tmpfile); return false; } return true; } Link to comment Share on other sites More sharing options...
istage Posted December 16, 2009 Author Share Posted December 16, 2009 case 'products': $path = _PS_PROD_IMG_DIR_.intval($id_entity).'-'.intval($id_image); break; '-',what is this?because i have problem with import cvs,without image showed. Link to comment Share on other sites More sharing options...
istage Posted December 16, 2009 Author Share Posted December 16, 2009 OMG,who can help me? Link to comment Share on other sites More sharing options...
Recommended Posts