Magento Forum

   
Adding a File upload for customers
 
Guru06
Jr. Member
 
Total Posts:  17
Joined:  2007-09-16
 

Hi my first project with Magento is a gangrun printer site and I am looking to add a file upload option as part of the checkout process but I have no idea where to begin with such a task. I would like to include it right before the final step of checkout but if thats not possible I can settle for doing a separate step after the order is placed but thats not the ideal solution. Any suggestions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ezoq
Jr. Member
 
Total Posts:  1
Joined:  2008-01-19
 

I would like to know the same thing.  I have search but cannot find an answer.  For instance, a shopper wants a custom t shirt, they can upload the image to be printed.  Is this possible?

 
Magento Community Magento Community
Magento Community
Magento Community
 
devx
Jr. Member
 
Total Posts:  20
Joined:  2007-08-31
 

I need the exact same thing! I have a custom sticker category and i would like to allow users to upload their own designs. Is this possible?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

magento standard distribution or version 1.0 dont have such a feature. You have to develop your own extension. I build an extension which
places two new checkboxes to the last step of checkout process, you can take a look at the code to get help how to develop such a extension. The extension is available in magento connect and is called Mage_Termsandconditions.

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
alanin
Member
 
Total Posts:  67
Joined:  2008-02-25
Nordhausen, Germany
 

i have developed a module for a registration into another table (we have to check our customers before they can use the shop and we need some business stuff) - including fileupload - dunno if its the nice way, but it works…

first i put all the needed data into a new table, after the $firma->save() i have the incremented_id in the object and finaly i can make an update to that row…

this is a quick and dirty way to do it - finaly i want to rethink about that and want to use zend functions - but atm i need to get the work done…

$firma Mage::getModel('bcregister/firma')
                 ->
setFirmaName($this->getRequest()->getPost('firma_name'))
                 ->
setFirmaAdresse($this->getRequest()->getPost('firma_adresse'))
                 ->
setFirmaPlz($this->getRequest()->getPost('firma_plz'))
                 ->
setFirmaOrt($this->getRequest()->getPost('firma_ort'))
                 ->
setFirmaLand($this->getRequest()->getPost('country_id'))
                 ->
setFirmaHrg($this->getRequest()->getPost('firma_hrgnr'))
                 ->
setFirmaUmsatznr($this->getRequest()->getPost('firma_umsatznr'))
                 
#->setDateiGewerbe($gewerbe)
                 #->setDateiHandel($handel)
                 #->setDateiBrief($brief)
                 
->setAprAnrede($this->getRequest()->getPost('apr_anrede'))
                 ->
setAprTitel($this->getRequest()->getPost('apr_titel'))
                 ->
setAprVorname($this->getRequest()->getPost('apr_vorname'))
                 ->
setAprNachname($this->getRequest()->getPost('apr_nachname'))
                 ->
setAprFunktion($this->getRequest()->getPost('apr_funktion'))
                 ->
setAprTelefon($this->getRequest()->getPost('apr_telefon'))
                 ->
setAprFax($this->getRequest()->getPost('apr_fax'))
                 ->
setAprEmail($this->getRequest()->getPost('apr_email'));
                 
             
$firma->save();
             
            
move_uploaded_file($_FILES['datei_gewerbe']['tmp_name']"/tmp/tempfile1.tmp");
            
move_uploaded_file($_FILES['datei_hrg']['tmp_name']"/tmp/tempfile2.tmp");
            
move_uploaded_file($_FILES['datei_brief']['tmp_name']"/tmp/tempfile3.tmp");
             
            
$query "UPDATE
                                bc_register_firma
                            SET
                                datei_gewerbe = LOAD_FILE('/tmp/tempfile1.tmp'),
                                datei_handel = LOAD_FILE('/tmp/tempfile2.tmp'),
                                datei_brief = LOAD_FILE('/tmp/tempfile3.tmp')
                            WHERE
                                lfd = '"
.$firma->lfd."'";
            
$write Mage::getSingleton('core/resource')->getConnection('core_write');
            
$write->query($query);

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top