Associate Engine : Configuration Variables | ||
Home> Associate Engine > Documentation > Configuration Variables |
|
Note: The following tables are only a partial list of the configuration variables. See the
ae-ini.txt configuration file for a complete list of all the configuration variables. Click here for sampleae-ini.txt file.
Click here for a sample ae-ini.txt configuration file.
Click here for information about the ae-ini.txt configuration file.
The following table shows configuration variables that do not fit into any particular group.
Configuration Variable | Default | Meaning (default shown in red) | ||||||
clickbankID | "" (empty) |
Your ClickBank.com affiliate ID. You can sell this script through your website and earn commission on each sale of the script. See the "Script Affiliate Program" section for details. |
||||||
copyrightAmazon | yes |
|
||||||
credit | yes |
Note: If you have a ClickBank ID you will receive commission if someone buys this script after clicking on the "Powered by... link, so we recommend that you leave this link showing. |
||||||
grid | "" (empty) |
Default for grid script parameter. Set this configuration variable if you want to format all results in a grid. Value can be either a grid style (e.g.: "xmytop10") or a grid format (e.g.: "c:3,r:4,p,m"). |
||||||
imageWH | no |
Note: It is strongly recommend that you set imageWH to "no" so that results are returned faster. If set to "yes", additional data must be fetched (and cached) from amazon.com's website thus slowing down results the first time they are returned. |
||||||
maxLoad | 20 |
|
||||||
newWindow | yes |
|
||||||
pageSize | 10 |
|
||||||
price | "" (empty) |
Specifies the price range to filter products with. Only products within the specified price range will be
displayed. The minimum and maximum prices are specified as |
||||||
refNoSim | yes |
|
||||||
showReviews | yes |
|
||||||
viewCart | yes |
|
||||||
xNAME | (none) |
User defined Page Template variable xNAME.
The NAME is one or more letters/numbers, such as "xtitle".
Uppercase/lowercase in the name does not matter. For example, if the configuration file contains " |
The configuration variables addto.* control the appearance of the "Buy from Amazon.com" buttons.
Quick-Click Buttons: By setting the configuration variable addto.quickclick to yes, "Buy from Amazon.com" buttons will become Quick-Click "Buy from Amazon.com" buttons. The style of the buttons is set with the configuration variable addto.quickclick.style
Configuration Variable | Default | Meaning (default shown in red) | ||||||||||||
addto.buy | yes |
|
||||||||||||
addto.buyfrom | yes |
|
||||||||||||
addto.graphics | yes |
|
||||||||||||
addto.newwindow | yes |
|
||||||||||||
addto.newwindow.target | _blank |
|
||||||||||||
addto.quickclick | no |
* addto.buy must be set to yes for buttons to appear. |
||||||||||||
addto.quickclick.style | 1 |
Sets the style of the Quick-Click buttons as follows:
* addto.graphics must be set to yes for graphical buttons to appear |
||||||||||||
addto.textstyle |
|
|||||||||||||
addto.textstyle.style |
Value of style attribute of the "Buy from" and "Add to" text buttons. <input>. The style attribute of the <input> is set to this value. See also addto.graphics and addto.textstyle. The default style is: background-color:#FFCF60; color:#000060; cursor:hand; width:120pt; |
Note: The variables addto.graphics, addto.newwindowand addto.newwindow.target also affect the "Add to Amazon.com Wish List", "Add to Amazon.com Wedding Registry", and "Add to Amazon.com Baby Registry" buttons generated by formatting codes {details.addto.wishList}, {details.addto.weddingRegistry} and {details.addto.babyRegistry}, respectively. Graphical buttons are: , , and .
The configuration variables amazonID.* set the associate ID's used with the international Amazon associate programs such as amazon.co.uk
Note: Your amazon.com associate ID is set via the
ae-key.txt file. See: Request Key.
Configuration Variable | Meaning |
amazonID.ca | www.amazon.ca associate ID |
amazonID.de | www.amazon.de associate ID |
amazonID.fr | www.amazon.fr associate ID |
amazonID.jp | www.amazon.co.jp associate ID |
amazonID.uk | www.amazon.co.uk associate ID |
If you are not signed up with any one of these programs, then leave the corresponding configuration variable unchanged in the
ae-ini.txt configuration file (default is NONE).NOTE: If you configure Associate Engine to use any of these international Amazon associate programs, we recommend that you examine the links in the results to ensure that they do in fact contain your correct associate ID's for those programs. Note: Each of Amazon's associate programs are separate from the U.S. based associate program at www.amazon.com, so if you want to use the amazon.co.uk associate program too you have to sign up with it separately.
See also: Using Associate Engine with amazon.co.uk if you want Associate Engine results to be based on amazon.co.uk rather than amazon.com.
The configuration variables asinsearch.* control the appearance of individual product details.
By setting asinsearch.format, a product's detail page can be shown locally using Associate Engine with the specified format template. Click here for example. If asinsearch.format is not set, then when a user clicks on a product link, the user will be brought to the product's detail page at the www.amazon.com website.
Very Important: asinsearch.format does not work in demo mode
asinsearch.format is ignored in demo mode. You must have a valid key to use asinsearch.format. While in demo mode, all product links go to the www.amazon.com home page.Set the configuration variable asinsearch.format to the format that you want to use. For example, setting it to "details" would cause
ae-format/details.fmt to be used. The default value of asinsearch.format is "" which causes links to go to amazon.com's product pages.See:
This configuration variable specifies the default format to use when doing an ASIN search with one ASIN. Note: This feature does not affect the international Amazon links.
Configuration Variable | Default | Meaning (default shown in red) | ||||||
asinsearch.format | "" (empty) |
This configuration variable supports Clock Codes. |
The configuration variables availability and availability.* control the display of product availability information (see {details.availability} formatting code).
Configuration Variable | Default | Meaning (default shown in red) | ||||||
availability | yes |
|
||||||
availability.notavailable | yes |
|
||||||
availability.notavailable.text |
|
|||||||
availability.marketplace | yes |
|
||||||
availability.marketplace.text |
|
|||||||
availability.notstocked | yes |
|
||||||
availability.notstocked.text |
|
The configuration variables browse.* control the appearance of browse index pages. A browse index page is a page that shows a list of product sub-categories. Example: Books.
Configuration Variable | Default | Meaning (default shown in red) | |||||||||
browse.grid | xgridB |
|
|||||||||
browse.more | yes |
|
|||||||||
browse.remote.STORE |
Note: ae.pl v4.11.17-beta or higher required. Selective browse stores can be redirected to Amazon. To make a particular browse store STORE (type=browse&mode=STORE) redirect to Amazon,
set configuration variable browse.remote.STORE to yes (e.g.: If the STORE appears in any of the navbar links, then redirection will also occurr. To turn off this navbar redirection feature, set the configuration variable browse.remote.navbar to no (default is yes). For example, if browse.remote.dvd is set to yes, then all pages (browse pages and product details pages) in the DVD store would redirect to Amazon. See list of STORE values. Note: If you want your website to have only one browse store (e.g.: only music), then you will have to set
browse.remote.STORE for every STORE other than
music. That means you will have to add several browse.remote.STORE lines to your |
||||||||||
browse.style | 1 |
|
|||||||||
browse.width | 3 |
|
The configuration variables cache.* control how the product data cache works. The product data cache stores product data fetched from Amazon.com Web Services (AWS). If the same search request occurs, product data is read from the product data cache rather than being fetched again from AWS. Reading data from the cache is faster than fetching data from AWS. Configuration variables let you specify the maximum size of the cache and how long it takes for cached data to become stale and be removed from the cache.
Configuration Variable | Default | Meaning (default shown in red) | |||||||||||||||||||||
cache.compress | yes |
|
|||||||||||||||||||||
cache.size | 10mb |
Number of bytes to limit the cache to (default is 10MB). If the total size of all the files in the cache exceeds this specified limit, then the oldest files are deleted until the total size is within the specified limit. Maximum allowed value is 10MB (i.e.: 10 MegaBytes). The value of this variable is a number followed an optional units specifier:
To turn off cache size checking, use 0 (zero); however, this is not recommended since the cache could potentially grow to fill the entire disk drive or the user's disk space allocated by the system administrator. See also cache.stale. Note: The calculation of how much space is currently in use by the cache is based on the assumption that the file allocation size is 4,096 bytes. Also note that the calculation does not take into account the space used by your other files -- it only looks at the cache. |
|||||||||||||||||||||
cache.stale | 1 |
Number of hours that an amazon.com data file remains in the cache before it is considered stale and either deleted or replaced. To turn off all caching, use 0 (zero). The units of this variable is hours since amazon.com typically does not change its pages any sooner than 1 hour. Maximum value is 24 hours; however, if showPrices is yes then the maximum is 1 hour. See also cache.size. The value of this variable is a number followed an optional units specifier:
|
If cache.stale is set to a higher number, then the longer it is that product data stays in the product data cache. Disadvantage: If amazon.com changes the details (e.g.: prices, description, reviews, etc.) of the products that are in the cache, then those changes will not appear until the relevant data in the cache has become stale and refetched (upon the next request for it). Advantage: The data is in the cache longer and thus repeat requests for that same data can be processed/displayed faster since the data is immediately available. Thus, you should set cache.stale to obtain a balance between freshness and speed that you are satisified with
See also: imgcache.*
To exclude products, set configuration variable exclude.list to a list of ASIN comma-separated ASIN numbers (e.g.: ASIN1,ASIN2,ASIN3). Or put the ASIN numbers (one per line) in a .txt text file in theae-exclude directory and set configuration variable exclude.file to the name of that .txt file (note: don't specify the extension; e.g.: " mylist" rather than "mylist.txt").
The configuration variables imgcache.* control how the image cache. The image cache stores product image data (width & height) fetched from the amazon.com website. Images are fetched and stored in the image cache if the grid parameter is used with the if (images first) option, or if the imageWH configuration variable is set to yes.
If the same search request occurs, image data is read from the image cache rather than being fetched again from amazon.com. Reading image data from the image cache is faster than fetching data from amazon.com. Configuration variables let you specify the maximum size of the image cache and how long it takes for cached image data to become stale and be removed from the image cache.
Configuration Variable | Default | Meaning (default shown in red) | |||||||||||||||||||||
imgcache.compress | yes |
|
|||||||||||||||||||||
imgcache.size | 1mb |
Number of bytes to limit the image cache to (default is 1MB). If the total size of all the files in the image cache exceeds this specified limit, then the oldest files are deleted until the total size is within the specified limit. Maximum allowed value is 1MB (i.e.: 1 MegaBytes). The value of this variable is a number followed an optional units specifier:
To turn off image cache size checking, use 0 (zero); however, this is not recommended since the image cache could potentially grow to fill the entire disk drive or the user's disk space allocated by the system administrator. See also imgcache.stale. Note: The calculation of how much space is currently in use by the image cache is based on the assumption that the file allocation size is 4,096 bytes. Also note that the calculation does not take into account the space used by your other files -- it only looks at the image cache. |
|||||||||||||||||||||
imgcache.stale | 90days |
Number of hours that an amazon.com image data file remains in the image cache before it is considered stale and either deleted or replaced. To turn off all image data caching, use 0 (zero). The units of this variable is hours since amazon.com typically does not change its pages any sooner than 1 hour. Maximum value is 2160 hours (i.e.: 90 days). See also imgcache.size. The value of this variable is a number followed an optional units specifier:
|
See also: cache.*
The configuration variables links.* control the formatting of links.
Configuration Variable | Default | Meaning (default shown in red) | ||||||
links.names | yes |
When set to yes, names in product details (such as artists, authors, directors, and actors) are linked to a search of that name. Example: the Sleepless in Seattle page would link the actors (i.e.: Tom Hanks, Meg Ryan) to search for those names. |
||||||
links.relurl | yes |
If links.relurl is set to yes (default
is yes), then links that refer back to Associate Engine use relative links
Note: If you are "calling" Associate Engine between two websites (e.g.: site A contains <SCRIPT> tags that refer to Associate Engine on site B), you will have to set links.relurl to no Available in: v4.05.31 (or higher). |
||||||
links.xml | no |
|
The configuration variables log.* control what information is written to the log. By reviewing the log file, you can see what searches were performed. The log file is a text file that can be opened in a plain text editor such as Notepad or Wordpad. The log filename is
ae-log.txt (note: the filename is based on the filename of the script; for example, if you rename ae.pl to shop.pl then the log file will be namedshop-log.txt ). The default log file location is the same directory where ae.pl is located. Logging stops if the log file reaches 1MB in size (see log.size configuration variable); delete the file to continue logging.Note: To selectively log only the current search request instead, use the log script parameter instead. Tip: To log only keyword search forms, add a hidden variable to your form instead:
<input type=hidden name="log" value="1">
Configuration Variable | Default | Meaning (default shown in red) | ||||||
log | 0 (zero) |
|
||||||
log.dir | . (period) |
|
||||||
log.size | 1MB |
|
||||||
log.include.script | no |
|
||||||
log.include.ssi | no |
|
||||||
log.include.iframe | no |
|
The configuration variables prevNext.* control how the "Previous Results" and "More Results" links are displays at the bottom of results.
Configuration Variable | Default | Meaning (default shown in red) | ||||||
prevNext | yes |
|
||||||
prevNext.graphics | yes |
|
||||||
prevNext.total | no |
|
The configuration variables prices.* and showPrices control the display of prices.
Configuration Variable | Default | Meaning (default shown in red) | ||||||
prices.color | "#990000" |
|
||||||
prices.color.grid | "#339900" |
|
||||||
showPrices | yes |
|
You may occasionally notice that some prices shown by Associate Engine may not exactly match the prices shown on the amazon.com website. There's probably 3 possible reasons why the prices might appear differently between Amazon.com's AWS (Amazon.com Web Services) and amazon.com's website:
AWS has the incorrect price. This has been reported on Amazon.com's discussion forum by some users of AWS.
The price recently changed and the old price is in your ae.pl data cache (ae-cache directory). In that case, either lower the cache stale time (cache.stale configuration variable) or purge that page from the cache so it is loaded fresh next time (add &purgefile parameter to the URL).
At the amazon.com website, you're looking at a "new & used" marketplace price. That marketplace price could be lower than the "Amazon.com price" returned by AWS.
So, the things you can do about the potential price difference are either:
- Turn off prices by setting configuration variable: showprices no
- Add a note to your page template such as "Prices subject to change. Click for current price."
- Lower the cache stale time; however, this means potentially more data traffic and some slower results (because of first fetch to fill cache).
The configuration variables script.* control the operation of the script.
Configuration Variable | Default | Meaning |
script | ae |
Name of the Associate Engine. The default value is based on the filename of the Associate Engine .pl file. If the .pl file is named ae.pl then the default value of script will be "ae". This name is used to build recursive links back to Associate Engine as well as to set the default value of the *.dir variables such as cache.dir |
script.url |
The URL of Associate Engine to be used for recursive links back to Associate Engine. The default value of script.url is based on the script variable, the webserver's domain name, and the path used to run Associate Engine. For
example, " Normally, Associate Engine can figure out what the URL to itself is. This variable is required because on some webservers, incorrect domain name information is provided by the webserver to Associate Engine. In that situation, it is necessary for you to tell Associate Engine what its URL is. You can use this variable in your templates when you want to link back to Associate Engine, such as the following: <A HREF="{cfg.script.url}?asinsearch={details.accessories}" >Accessories</A> |
The configuration variables search.* are used to pre-define searches.
Configuration Variable | Default | Meaning |
search.default | (empty) |
Parameters to use if no parameters are specified as part of the URL. For example, if you are using the store Page Templates, then setting search.default "template=stores" would cause the store index to be displayed when no parameters are specified as part of the URL (normally, if no parameters are specified, then best selling books are shown). |
search.NAME | (empty) |
Define a pre-defined search called search.NAME. To use this search, use the search parameter such as search=NAME |
search.default
If no parameters are specified
(i.e.: /cgi-bin/ae.pl) , then best selling books are shown. To change the default search, set search.default to the search parameters you want to use as the default. For example, to make the DVD browse index(type=browse&mode=dvd) the default search, set the following inae-ini.txt :
search.default "type=browse&mode=dvd"
search.NAME
Once you pre-define a search, you can refer to it by using its name with the search script parameter.
For example, if ae-ini.txt contains the following line to pre-define a search named arnold:
search.arnold "type=search&mode=dvd&keyword=Arnold+Schwarzenegger"
then this pre-defined search (searches for Arnold Schwarzenegger DVD's) can be accessed using the following shorter URL:
/cgi-bin/ae.pl?search=arnold
This would be equivalent to the following longer URL:
/cgi-bin/ae.pl?type=search&mode=dvd&keyword=Arnold+Schwarzenegger
Note: Other script parameters can be used with a pre-defined search, such as:
/cgi-bin/ae.pl?search=arnold&grid=c:3,r:2
Virtual Directory
Pre-defined searches can also be used in conjunction with Virtual Directory to create very short URL's. Assuming that search.arnold is defined as above, and that virtual directory /amazon/ has been set up, then the following three URL's would be equivalent and would display Arnold Schwarzenegger DVD's:
/cgi-bin/ae.pl?type=search&mode=dvd&keyword=Arnold+Schwarzenegger
/cgi-bin/ae.pl?search=arnold
/amazon/search_arnold
Configuration variable
site.domain is automatically set to the domain name of your website. To show your website's domain name, use{cfg.site.domain} in your Page Templates.
Configuration Variable | Default | Meaning (default shown in red) |
site.domain | domain name |
Automatically set to the domain name of your website. To show your website's domain name, use
|
The configuration variables store.include.* control the inclusion of custom headers/footers in the sample Page Templates provided.
Configuration Variable | Default | Meaning |
store.include.head | "" |
Include just before </HEAD> tag. |
store.include.body.header | "" |
Include just after <BODY> tag. |
store.include.results.before | "" |
Include just before {results} tag. |
store.include.results.after | "" |
Include just after {results} tag. |
store.include.body.footer | "" |
Include just before </BODY> tag. |
store.include.sidebar.before | "" |
Include just before sidebar. |
store.include.sidebar.after | "" |
Include just after sidebar (but before Amazon logo). |
store.include.sidebar.footer | "" |
Include at end of sidebar (after Amazon logo). |
You can set the store.include.* variables to any of the following type of values:
Empty Value:
i.e.: ""
The empty value "" menas do not include anything.HTML:
e.g.: "<H1>Welcome!</H1>"
The specified HTML is included.Associate Engine include statement:
e.g.: "{include header}"
The HTML to be included is read fromae-include/*.html such asae-include/header.html Server-Side-Include (SSI):
e.g.: "<!--#include virtual='someurl'-->"
The HTML to be included is read from the URL someurl. Notice the use of apostrophes ' around someurl since the entire value is delimited with " marks. The someurl can be relative to / such as /header.html or it can be absolute such as http://www.mydomain.com/header.html
The configuration variables store.navbar.* control the display of the navigation bar ("navbar" for short) in the sample Page Templates provided.
Configuration Variable | Default | Meaning (default shown in red) | ||||||
store.navbar.home.url | "/" |
|
||||||
store.navbar.home.text | "Home" |
|
||||||
store.navbar.here.text |
|
The configuration variables template.* control the use of Page Templates.
Configuration Variable | Default | Meaning (default shown in red) | ||||||
template | "" |
|
||||||
template.dir |
|
The configuration variables virtual.* control the use of Virtual Directory.
Configuration Variable | Default | Meaning | ||||||
virtual.dir | (empty) |
If you want to use Virtual Directory, then set virtual.dir to the initial part of the path. For example, you want to use a URL such as www.domain/amazon/type_best/mode_dvd then set virtual.dir to "/amazon" Note: To use Virtual Directory, you also have to add Rewrite commands to your /.htaccess file. |
||||||
virtual.ending | / |
Sets the ending that is added to the end of URL's that Associate Engine generates to refer back to itself to do subsequent searches (e.g.: the "More Results" button). See the table below for some possible values for the virtual.ending configuration variable. |
||||||
virtual.redir | yes |
If Associate Engine is accessed via a non-virtual URL, Associate Engine auto-redirects to the
equivalent virtual URL. For example, the non-virtual URL
|
The following table shows some possible values for the virtual.ending configuration variable.
virtual.ending | Example URL | Meaning |
/ | /amazon/type_search/mode_books/ | URL looks like a directory |
/index.html | /amazon/type_search/mode_books/index.html | URL looks like a index.html file |
.html | /amazon/type_search/mode_books.html | URL looks like a .html file |
.htm | /amazon/type_search/mode_books.htm | URL looks like a .htm file |
< Previous | Table of Contents | Next > |
E.&O.E.; © Cusimano.Com Corporation; www.c3scripts.com