File upload in Magento

Whan of the most enticipated and needed things in Magento is File upload Custom Option. As discussed last year at Magento Forum, it is not completed nor tested.

Now, Magento already have frontend and admin part of file upload option implemented in themes. Since backend part is still missing, understand that this still doesn’t work, however, if you’re interested how it looks, read on ..

Frontend html is found in:
app/design/frontend/default/default/template/catalog/product/view/options/type/file.phtml

Frontend javascript code in:
app/design/frontend/default/default/template/catalog/product/view/options.phtml
(optionFileUpload js object = asynchronous iframe upload)

You can enable file upload custom option if you add:

<file translate="label" module="adminhtml">
<label>File</label>
<render>adminhtml/catalog_product_edit_tab_options_type_file</render>
<types>
<file translate="label" module="adminhtml">
<label>File Upload</label>
</file>
</types>
</file>

inside node:
config->global->catalog->product->options->custom->groups

in:
app/code/core/Mage/Catalog/etc/config.xml

Now you have new File Upload option that you can add to product!

We are coding module of similar functionality for one of our clients as we speak, but we have our fingers crossed to see this option in next Magento version!