William K. Posted May 10, 2018 Share Posted May 10, 2018 I am trying to allow users to upload an image of the product at the same time they post a comment on it via the module ProductComment. My modifications are heavily inspired by this post => https://www.prestashop.com/forums/topic/402368-how-to-add-an-input-file-uploader-in-customer-registration-form-v16/?do=findComment&comment=1981006 The thing is, I am stuck because I can't seem to access $_FILES datas from the controller (default.php) and I realy don't see why. My setup works if I do a simple <input> but when it's the type="file" I just can't and it is driving me crazy. If you have any kind of clue, please help Link to comment Share on other sites More sharing options...
phinq1910 Posted May 14, 2018 Share Posted May 14, 2018 the ProductComment module using ajax to post data. You can refer themes\*\js\modules\productcomments\js\productcomments.js and file modules\productcomments\js\productcomments.js, find "action=add_comment". You need update the ajax function for post input with type is file. 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