Vinilizados Posted February 23, 2015 Share Posted February 23, 2015 (edited) hi, is there any way to attach zip or rar on the conctat form that people can send diferent kind of files, as i test, pictures are received on the mail delivery but not rar or zip, can someone helpo me? my site http://vinilizados.es/ Edited September 29, 2015 by Vinilizados (see edit history) Link to comment Share on other sites More sharing options...
Vinilizados Posted February 25, 2015 Author Share Posted February 25, 2015 so is it even posible? can you guys in your sites receive any kind of file from the contact form attachment? Link to comment Share on other sites More sharing options...
Vinilizados Posted March 10, 2015 Author Share Posted March 10, 2015 so is it even posible? can you guys in your sites receive any kind of file from the contact form attachment? Link to comment Share on other sites More sharing options...
fred-vinapresta Posted March 10, 2015 Share Posted March 10, 2015 Hi, you need to modify controllers/front/ContactController.php file, do a research on $extension term in postProcess function, you will find: $extension = array('.txt', '.rtf', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg'); if you want add .rar, add it in the array like that $extension = array('.txt', '.rtf', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg', '.rar'); Link to comment Share on other sites More sharing options...
Vinilizados Posted March 27, 2015 Author Share Posted March 27, 2015 Do you or any one know why it dont send .ai and .psd extensions wich are the adobe illustrator and photoshop extensions? In the case of .ai my site reset the contact form page and show the mesage that the extension is wrong but in the .psd case it send the mesage but no attachment on it.The rest of them that i setup did work fine as .rar, .tif, .eps and .svg Link to comment Share on other sites More sharing options...
ventura Posted March 29, 2015 Share Posted March 29, 2015 (edited) For add .ai files change in the same controller function this elseif (!empty($file_attachment['name']) && !in_array(Tools::strtolower(substr($file_attachment['name'], -4)), $extension) && !in_array(Tools::strtolower(substr($file_attachment['name'], -5)), $extension)) $this->errors[] = Tools::displayError('Bad file extension') for this elseif (!empty($file_attachment['name']) && !in_array(Tools::strtolower(substr($file_attachment['name'], -4)), $extension) && !in_array(Tools::strtolower(substr($file_attachment['name'], -5) && !in_array(Tools::strtolower(substr($file_attachment['name'], -3)), $extension)) $this->errors[] = Tools::displayError('Bad file extension'); Edited March 29, 2015 by ventura (see edit history) 1 Link to comment Share on other sites More sharing options...
Vinilizados Posted March 30, 2015 Author Share Posted March 30, 2015 (edited) but that is for the bad file message apears when someone send me a .ai file? or that makes me receive them? and do you know something about psd, it send the mesage like its correct but no file attached on it? Edited March 30, 2015 by ventura (see edit history) Link to comment Share on other sites More sharing options...
ventura Posted March 30, 2015 Share Posted March 30, 2015 but that is for the bad file message apears when someone send me a .ai file? Yes that is or that makes me receive them? and do you know something about psd, it send the mesage like its correct but no file atached on it?psd format it´s atached also Try with this code $extension = array('.txt', '.psd', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg', '.psd', '.ai'); and this else if (!empty($fileAttachment['name']) && !in_array( Tools::strtolower(substr($fileAttachment['name'], -3)), $extension) && !in_array( Tools::strtolower(substr($fileAttachment['name'], -4)), $extension) && !in_array( Tools::strtolower(substr($fileAttachment['name'], -5)), $extension)) $this->errors[] = Tools::displayError('Bad file extension'); 2 Link to comment Share on other sites More sharing options...
fandrionie Posted July 30, 2015 Share Posted July 30, 2015 (edited) Hi, i'm new with prestashop, and then i got this error appear when i send it THERE IS 1 ERROR Image Verification ERROR, Please try again this error happen on contact us page i used PS 1.6.0.13 can someone help me ? Edited July 30, 2015 by fandrionie (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now