Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

New Varien_Data_Form_Element File, how to deliver with own extension
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

i developed a extension to provide approval of german terms and conditons within onepage checkout. I needed to provide a download in pdf for these terms. Therefore i created needed form for backend with file upload for the document. I customized Varien_Data_Form_Element_Image to Varien_Data_Form_Element_File to get needed functionality. Now i can create file upload form by using this code in system.xml, i also created own backend model. It works fine, i could upload pdf and its saved

<pdf_terms translate="label">
                            <
label>PDF Terms and conditions</label>
                            <
frontend_type>file</frontend_type>
                            <
backend_model>termsandconditions/system_config_backend_pdf</backend_model>
                            <
upload_dir config="system/filesystem/media" scope_info="1">checkout/terms/pdf_terms</upload_dir>
                            <
base_url type="media" scope_info="1">checkout/terms/pdf_terms</base_url>
                            <
sort_order>2</sort_order>
                            <
show_in_default>1</show_in_default>
                            <
show_in_website>1</show_in_website>
                            <
show_in_store>1</show_in_store>
                        </
pdf_terms>

in config.xml i added:

<default>
        <
checkout>
            <
terms>                
                <
pdf_terms></pdf_terms>                
            </
terms>
        </
checkout>
    </default>

So my question. Is it the right way to distribute my new fontend type in folder lib/Varien/Data/Form/Element/File.php or is there a pos. to create such a model in my module folders? If yes, where can i configure that?

cheers

Stefan

 
Magento Community Magento Community
Magento Community
Magento Community
 
cycore
Jr. Member
 
Total Posts:  10
Joined:  2008-09-20
 

Hi,

I have a similar problem concerning a custom Varien_Data_Form_Element-Type. Did you ever find the right answer to your question? Is there a way to put that class into the code/local folder?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jara
Member
 
Total Posts:  38
Joined:  2009-06-03
 

Hi
I want to upload a file in admin panel (system->configuration->General->upload)when i click upload in from General Tab,The file downloadable template should come,and then if i upload a file ,the path should be saved in database.If the user clicks the ‘press’ menu in frontend the link should appear from the table.then if the user click the link it should be downloadable.... I have done this in php… how to proceed in magento…

need help.

Jara.

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