Web Authoring
  Home arrow Web Authoring arrow Page 3 - Basic configuration of osCommerce, conclud...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB AUTHORING

Basic configuration of osCommerce, concluded
By: PACKT Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2006-04-06

    Table of Contents:
  • Basic configuration of osCommerce, concluded
  • Email Options
  • Download
  • GZip Compression
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Basic configuration of osCommerce, concluded - Download


    (Page 3 of 5 )

    Now we come to my personal favorite—the downloads section! One of the true wonders of the world is that we can now generate money by simply transferring information without the need for a physical medium. To this end, the demo site has a section where e-books and articles are available for purchase and download from the site. Obviously, if you are going to be retailing products that are available for download, such as software or ebooks, then this section is of particular interest to you. If not, then feel free to leave the settings as they are and continue.

    To begin with, Enable Downloads should be set to true. The rest of the other settings can be left as they are for the time being. In order to demonstrate how this now works, we will need to add a product to our product database quickly. Go to the Catalog heading option and then navigate through Categories/Products till you get to the Strategy category of the Software products—it doesn't really matter where you add a product; if you feel like adding one somewhere else, go ahead—it will make no difference.

    Here you should click on the new product button, and fill out the form for a new product. For this example, the new product is called My Download in order to distinguish it from the other products, as shown here:

    Notice the properties of My Download in the box on the right of the screen—these are arbitrary settings, and you can put in whatever you like. There is no need to hunt for an image here; this is just a quick and nasty demonstration.

    Now, downloadable products in osCommerce are held in the download folder under the catalog directory, so we will need to place a file in here so that osCommerce is able to provide customers with something to download. It doesn't matter what we use for this example, but obviously when it comes to real downloads you will most likely have a zipped file with the same name as your product. In other words, if a customer downloads a computer game called unreal tournament, you will probably name your zipped download file unreal_tournament.zip to make it easy to track which files are supposed to be downloaded.

    For our purposes we simply need to show that a file can be downloaded, so in this case we are going to copy account.php from the catalog folder into download. You can place any file you like in download folder, and we will attach that file to the product in the Products Attributes section in a moment. Now that the product is registered in the database, and the product file is present in the download folder, we need to set some of its attributes. For this, click on the Products Attributes link in the left-hand box of the admin tool.

    At the bottom of the screen under the section Products Attributes, you will notice a drop-down list from which to select products. Find My Download from that list, add in the settings that are appropriate to the file you have placed in the download folder, and insert the product. For this example, the page looks like this:

    Once the product has been inserted, we can shop for it as normal on the site. If you haven't already created a customer account on the website, you will need to do so in order to be able to purchase this product. However, if you navigate to the product category in which you added the My Download product, you will notice that it is now available for purchase just like any other product. Go ahead and buy it as you would on any other site. You should end up with a page like this:

    Clicking on the My Download link will allow you to begin the product download. That's all there is to it. If you are unable to download the file, then the first thing to do is check the permission settings on the pub and download folders. For Linux users, pub and download permissions should be set to 777 and 755 respectively, for Windows users, simply ensure there is no Read-Only setting in the folder properties.

    At the moment, of course, you could navigate directly to the catalog/download folder in your browser and download whatever products are in there without having to pay for it. Just as bad, you may or may not have noticed that since we have not dealt with how to set up proper payments, osCommerce has made these downloads available to use while our purchase orders are still pending. Since we haven't used a credit card, this means that the download came before the payment. Not a very satisfactory state of affairs at the moment, but this will all be rectified a little later on in Chapter 10 on Tools, Tips, and Tricks, when we use a community contribution to sort things out properly. For now, though, we are able to download products if needs be.

    More Web Authoring Articles
    More By PACKT Publishing


       · This article is an excerpt from the book "Building Online Stores with osCommerce:...
     

    Buy this book now. This article is excerpted from Building Online Stores with osCommerce: Professional Edition, written by David Mercer (PACKT, 2005; ISBN: 1904811140). Check it out today at your favorite bookstore. Buy this book now.

    WEB AUTHORING ARTICLES

    - Yahoo Pipes: Worth a Look
    - Completing an EAR
    - Building and Deploying an EAR
    - New Nuke Security Sentinel: Worth Taking a C...
    - Administering Your CMS-Based Web Site
    - What You Need to Know Before Using a CMS
    - Introducing the Google Maps API
    - An Overview of the Yahoo User Interface Libr...
    - Basic configuration of osCommerce, concluded
    - Basic configuration of osCommerce, continued
    - Basic configuration of osCommerce
    - Deploying your Site with PHPEclipse, continu...
    - Deploying your Site with phpEclipse
    - Macromedia Captivate Review
    - Macromedia and Adobe Planning to Tie the Knot







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek