0

I'm new to Magento. I want to create an upload field on product view form just before the Add to Cart button for the end user to upload an image file before clicking Add to Cart button. How to show that field and how to upload the image in the file system. Please also mention what to add in which files to make it happen.

0

You can do this whole thing from your product edit page in admin panel.

Product Edit > Customizable Options > Add Option > Select "File" from option type dropdown

  • Thanks for a reply @Nahid. that thing worked but I'm getting following error Cannot read contents from file "C:/Users/Nausif/AppData/Local/Temp/C:/xampp/tmp/php2CCA.tmp" Warning!file_get_contents(C:/Users/Nausif/AppData/Local/Temp/C:/xampp/tmp/php2CCA.tmp): failed to open stream: Invalid argument. Also this solution will put file attachment field per product level, I want that on a particular attribute set, so that I can get it on multiple products having same attribute set. – Nausif Oct 8 '16 at 5:10
  • @Nausif Running Magento on Windows environment is not recommended at all. Magento has not event tested in windows environment. You may try Magento on virtual machine while you are using your favorite windows PC as host machine. Seems this error is some kind of permission related. You may try changing tmp directory in your php.ini file. As this is product custom option and not an product attribute so, you can not use this on a product attribute set. – Nahid Oct 10 '16 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.