protected function postImage($id) { $ret = parent::postImage($id); if ($id_store = (int) Tools::getValue('id_store') and isset($_FILES) and sizeof($_FILES) and file_exists(_PS_STORE_IMG_DIR_ . $id_store . '.jpg')) { $imagesTypes = ImageType::getImagesTypes('stores'); foreach ($imagesTypes as $k => $imageType) { imageResize(_PS_STORE_IMG_DIR_ . $id_store . '.jpg', _PS_STORE_IMG_DIR_ . $id_store . '-' . stripslashes($imageType['name']) . '.jpg', (int) $imageType['width'], (int) $imageType['height']); } } return $ret; }
protected function postImage($id) { $ret = parent::postImage($id); if ($id_category = intval(Tools::getValue('id_category')) and isset($_FILES) and sizeof($_FILES) and file_exists(_PS_CAT_IMG_DIR_ . $id_category . '.jpg')) { $imagesTypes = ImageType::getImagesTypes('categories'); foreach ($imagesTypes as $k => $imageType) { imageResize(_PS_CAT_IMG_DIR_ . $id_category . '.jpg', _PS_CAT_IMG_DIR_ . $id_category . '-' . stripslashes($imageType['name']) . '.jpg', intval($imageType['width']), intval($imageType['height'])); } } return $ret; }