Home arrow Web Authoring arrow Page 3 - Basic configuration of osCommerce, concluded
WEB AUTHORING

Basic configuration of osCommerce, concluded


If you're setting up your site to handle online sales, you could do worse than to use osCommerce. This article, the third of three parts, explains how to configure the software to get you up and running. It is excerpted from Building Online Stores with osCommerce: Professional Edition, written by David Mercer (PACKT, 2005; ISBN: 1904811140).

Author Info:
By: PACKT Publishing
Rating: 4 stars4 stars4 stars4 stars4 stars / 7
April 06, 2006
TABLE OF CONTENTS:
  1. · Basic configuration of osCommerce, concluded
  2. · Email Options
  3. · Download
  4. · GZip Compression
  5. · Summary

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

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.


blog comments powered by Disqus
WEB AUTHORING ARTICLES

- Top WordPress Plugins for Social Media
- How to Install WordPress on WAMPP
- More of the Best Wordpress Plugins for Comme...
- Top Wordpress Plugins to Fight Spam
- More of the top Drupal modules for SEO
- Top Drupal Modules for SEO
- More Top Wordpress Plugins for SEO
- Website Optimization Tips
- Backup and Restore a Drupal Website and Data...
- 5 Best Web Font Services
- Web Font Embedding Services
- Joomla Site Administration
- Create PHP Pages that Use WordPress Templates
- Top Joomla Extensions for Social Networking
- Drupal Modules for Site Navigation

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials