Jump to content

Add image to product in module


Recommended Posts



I have a little problem. So I have created part of script which add new product, but I have problem with adding images to product. I would like to add product using url. So far I found in AdminImportController :

	 * copyImg copy an image located in $url and save it in a path
	 * according to $entity->$id_entity .
	 * $id_image is used if we need to add a watermark
	 * @param int $id_entity id of product or category (set in entity)
	 * @param int $id_image (default null) id of the image if watermark enabled.
	 * @param string $url path or url to use
	 * @param string entity 'products' or 'categories'
	 * @return void
	protected static function copyImg($id_entity, $id_image = null, $url, $entity = 'products', $regenerate = true)

but I have no idea what to do next. I was looking in few admin controllers and nothing...


If anyone have some suggestion, please let me know. Any kind of informations are very welcome.

Link to comment
Share on other sites

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...