site form - add image upload

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
khizar
Posts: 99
Joined: 19 Jan 2021, 09:51

site form - add image upload

Post by khizar » 02 Feb 2021, 07:39

hey aimeos,

i want to add an image picker in my site form just like in product form.how can i implement in my custom form.
note: i have overwritten the site form and added custom field which is working perfectly now i want user to upload
logo for site so please guide me how can i achive this

can you tell me which method should i use to upload picture on server in my manager class

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: site form - add image upload

Post by aimeos » 04 Feb 2021, 20:32

That's a bit more work to do because the media subpart in the product panel can't be used out of the box for that (it requires a mshop_*_list table for storing the relationship). For a single image, the easiest option is to use a file upload field in the template you have added and implement the handling of the file in the corresponding admin class (https://github.com/aimeos/ai-admin-jqad ... #L440-L472) that should contain code like this one:
https://github.com/aimeos/ai-admin-jqad ... #L378-L381
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply