php shopping cart
free shopping cart   shopping cart software

Free Shopping Cart PHP Software


Back to Functions List
This Function Has Been Available Since:
(AFCommerce v 2.1,     Functions v 1.1)

Retrieves the product description from the database or file.


string = getproductdescription (prodid)

This function gets the product description from either the database or a file, depending on the settings in the admin area. By default, the software will always use the database. This option is a new feature for version 2, because if you have a large number of products, or use very long product descriptions, the size of your database can become very large. Now in theory, the size of your database should not matter too much, but in my experience, I have noticed that large databases can cause your website to load very slowly. Also, a large database can become corrupted easier, which will cause a big problem for you if this happens. A database is simply a series of directories and files for each table, but if your using a lot of html tags (which can make your descriptions much larger when using the web design add on). Html tags in your descriptions can make your descriptions look much better and allow you to have much more control over them. Another benefit to using files is that your descriptions will be able to be backed up easier, since the files for the descriptions will be in the same place as the software, so you can back them up with a simple ftp connection.

Changing your descriptions to be stored in files requires some work on your part, however it is not that hard. First you will need to create a directory (the default is a directory named "proddescripts"), and this directory needs to be created by you manually inside the main AFCommerce directory (in the same place as the "web" and "images" directories). You also must change the permissions (chmod) to 777, just like the images directory. Also, if you already have your descriptions inside of the database, you would have to manually create the files with the descriptions, which can be done by copying the description from the admin area (before you switch the setting to allow files). I have a program which does this automatically, but it is not stable enough to distribute yet, when it is, it will be a free download.


prodid (integer) - The product id number of the product you need the description of.

Return Values

Returns the description of the product id passed to this function.

Open Source: No

Paul's Examples

There are currently no examples for this function.

Back to Functions List


There are currently no posts for this topic.

AFCommerce Documentation

High End Website DevelopmentCompletely Free
Dating Service
Copyright 2004 - 2006
AFCommerce Website
And Cart Builder