New Zenner
- Join Date:
- Dec 2014
- Location:
- uruguay
- Posts:
- 65
- Plugin Contributions:
- 0
upload file excel
I want to upload an Excel file and when i ll click in Catalog I download the file
I do not know how to do it
Views: 1,113
New Zenner
I want to upload an Excel file and when i ll click in Catalog I download the file
I do not know how to do it
Black Belt
zip it and upload via FTP to your /downloads folder
add it as a download to a product or create a standard html link to it in the product description
New Zenner
kobra:
zip it and upload via FTP to your /downloads folder
add it as a download to a product or create a standard html link to it in the product description
thanks :
upload via ftp understand, but as I do the rest for example Catalog by clicking the user automatically download it
Black Belt
as I do the rest for example Catalog by clicking the user automatically download it
A link to this rest
Totally Zenned
Do you know how to construct basic HTML? This is what is being inferred. If you don't know how to construct a basic hyperlink then it would be a good idea to learn, as a knowledge of basic HTML can help solve many issues. W3Schools has some good tutorials.
Administrator
pixel1987:
thanks :
upload via ftp understand, but as I do the rest for example Catalog by clicking the user automatically download it
Where on your website will the customer/user click to download the Excel file? Is the file a product (that is, the customer must pay before they download) or does the file contain additional information that the customer might want?
New Zenner
the user should not pay anything is just an excel my website to download
Administrator
You'll start out by storing (via FTP upload) your Excel files in your store's /media folder.
To be able to successfully download those files, you'll need to edit the file /media/.htaccess to allow those file types to be accessed (see the changes in red):
#
# @copyright Copyright 2003-2010 Zen Cart Development Team
# @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
# @version $Id: .htaccess 16954 2010-07-21 22:55:30Z drbyte $
#
# This is used with Apache WebServers
#
# The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
# It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
# Will also prevent people from seeing what is in the dir. and any sub-directories
#
# For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
# Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.
# Example:
#<Directory "/usr/local/apache/htdocs">
# AllowOverride Limit Options Indexes
#</Directory>
###############################
# deny *everything*
<FilesMatch ".*">
Order Allow,Deny
Deny from all
</FilesMatch>
# but now allow just *certain* necessary files:
<FilesMatch ".*\.(mp3|mp4|swf|avi|mpg|wma|rm|ra|ram|wmv|epub[B]|xls|xlsx[/B])$" >
Order Allow,Deny
Allow from all
# tell all downloads to automatically be treated as "save as" instead of launching in an application directly
# (just uncomment the next 2 lines by removing the '#'):
# ForceType application/octet-stream
# Header set Content-Disposition attachment
</FilesMatch>
IndexIgnore */*
## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
# OPTIONS -Indexes -ExecCGI
Once that change has been made and the file is present in the /media folder, you'll add the following HTML code wherever you want the customer to download a file:
<a href="media/yourexcelfile.xls" target="_blank">Some Text Describing the File</a>
Tell staff why this post should be reviewed.