News:

Support the VirtueMart project and become a member

Main Menu

Vendor form in front end cant upload image

Started by danissch, September 23, 2020, 09:12:52 AM

Previous topic - Next topic

danissch

Hi guys!, Im trying to upload one image from the vendor form (Front-end, vendor tab), but I can't. 
The response is Error: Recieved no data for upload.

I am using an 20Kb image .jpeg, for the vendor logo, from the front-end with SuperAdministrator but I can't upload the debug response is:
19 vmdebug no data in uploadFile Var1:
Array
(
)

I gave all permission to the folder and permissions in the backend for users to media (create, edit, etc...), with registrated users and Superadministrator but no results, always the same message.  I don't know what to do.
Could you help me please!

jenkinhill

Why upload Vendor info from the frontend?

What Joomla/VM/PHP versions?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

danissch

#2
Hi jenkinhill, thank you for your response!

I am interested in the user can be a vendor (Multi-vendor configuration enabled) and when I enable a user as vendor he can see 2 Tabs in the logged frontend (1: shopper info, 2: Vendor info), in Vendor Tab, he can edit his vendor info so, when he try to upload the image of the store in the vendor tab the system result with the message mentioned. Other fields in vendor tab when are edited works fine, but with the image seems that it can't be readed.
I want to offer an experience where the user can edit his vendor data from the front-end, shopper fields and vendor fields can be edited in this way, a more simplified experience for the user from the frontend.

My configuration is:
VirtueMart 3.8.4 10335
PHP Version   7.2.31-1+ubuntu18.04.1+deb.sury.org+1
Web Server   nginx/1.14.0
WebServer to PHP Interface   fpm-fcgi
Joomla! Version   Joomla! 3.9.21 Stable [ Amani ] 25-August-2020 15:00 GMT
Joomla! Platform Version   Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

Thanks a lot for your help!



danissch

#3
Solved!
If you get this error, maybe is good idea to check the file in components/com_virtuemart/views/user/tmpl/edit.php or if you override through your template check it out.

The solution is to replace this:
Quote
<form method="post" id="adminForm" name="userForm" action="<?php echo JRoute::_($url) ?>" class="form-validate">
for this:
Quote
<form method="post" id="adminForm" name="userForm" action="<?php echo JRoute::_($url) ?>" class="form-validate" enctype="multipart/form-data">