< Prev |
Up |
Next > |
Advanced Settings |
Advanced Settings |
amazOOP Categories |
Advanced configuration
Customize amazOOP to fit your exact needs...
Mauricio Diaz Orlich
Copyright 2004, Mauricio Diaz
(amazOOP 0.2)
SummaryAs the title suggests, this documents deals with the more advanced section of amazOOP.
You should only modify the section described in this document if you fall into one
of the following categories
- You have fair knowledge and understanding of PHP and AWS.
- You don't mind getting your hands dirty as long as you get to understand
how the script works and you can customize it to fit your needs
It's a good idea to keep a backup copy of config.inc.php just in case you don't like
the modifications you make after all.
Advanced configurationThis part basically contains a few tables that specify synonyms and shortcuts to be used in amazOOP
for paramters sent to AWS.
If you don't understand what I'm saying, keep reading. Hopefully the examples will
give you a better idea of what I'm talking about
Basic InformationThe first two values that are defined are normally never modified.
$cacheRefreshTime defines values that can be used as time
units to store information in the cache.
- $cacheRefreshTime = array('hour' => 3600,
- 'day' => 86400,
- 'week' => 604800,
- 'month' => 18144000
- );
$sites holds the address to the AWS server that should be used
for each locale, as well as some parameters that are always sent to the server.
- $sites = array( "us" => "http://xml.amazon.com/onca/xml3?f=xml",
- "uk" => "http://xml-eu.amazon.com/onca/xml3?f=xml&locale=uk",
- "fr" => "",
- "ca" => "",
- "de" => "http://xml-eu.amazon.com/onca/xml3?f=xml&locale=de",
- "jp" => "http://xml.amazon.co.jp/onca/xml3?f=xml&locale=jp"
- );
Search TypesThis array associates amazOOP "synonyms" with the corresponding AWS search type.
Currently the supported types and their "synonyms" are:
amazOOP synonym |
AWS search type |
Actor |
ActorSearch |
Artist |
ArtistSearch |
ASIN |
AsinSearch |
ISBN |
AsinSearch |
Author |
AuthorSearch |
Blended |
BlendedSearch |
BrowseNode |
BrowseNodeSearch |
Director |
DirectorSearch |
Keywords |
KeywordSearch |
Manufacturer |
ManufacturerSearch |
Power |
PowerSearch |
Similarity |
SimilaritySearch |
UPC |
UpcSearch |
You can add/modify your own "synonyms" by assigning them to valid AWS search types.
- $searches = array( "Actor" => "ActorSearch",
- "Artist" => "ArtistSearch",
- "ASIN" => "AsinSearch",
- "ISBN" => "AsinSearch",
- "Author" => "AuthorSearch",
- "Blended" => "BlendedSearch",
- "BrowseNode" => "BrowseNodeSearch",
- "Director" => "DirectorSearch",
- "Keywords" => "KeywordSearch",
- "Manufacturer" => "ManufacturerSearch",
- "Power" => "PowerSearch",
- "Similarity" => "SimilaritySearch",
- "UPC" => "UpcSearch",
- );
Product ModesAs with search types, amazOOP also includes "synonyms" for product modes. Most of
the time, amazOOP modes match directly AWS modes, but keeping a list of "synonyms" lets
you map additional customized modes to the corresponding AWS mode.
According to the AWS SDK, the following are the officially supported product modes:
Product Line |
US mode parameter |
UK mode parameter |
DE mode parameter |
JP mode parameter |
Books |
books |
books-uk |
books-de |
books-jp |
Popular Music |
music |
music |
pop-music-de |
music-jp |
Classical Music |
classical |
classical |
classical-de |
classical-jp |
DVD |
dvd |
dvd-uk |
dvd-de |
dvd-jp |
Video |
vhs |
vhs-uk |
vhs-de |
vhs-jp |
Electronics |
electronics |
electronics-uk |
ce-de |
electronics-jp |
Kitchen & Housewares |
kitchen |
kitchen-uk |
kitchen-de |
NA |
Software |
software |
sw-vg-uk |
software-de |
software-jp |
Computer & Video Games |
videogames |
video-games-uk |
video-games-de |
videogames-jp |
Magazines |
magazines |
NA |
magazines-de |
NA |
Toys & Games |
toys |
toys-uk |
NA |
NA |
Camera & Photo |
photo |
NA |
NA |
NA |
Baby |
baby |
NA |
NA |
NA |
Outdoor Living |
garden |
NA |
NA |
NA |
Computers |
pc-hardware |
NA |
NA |
NA |
Tools & Hardware |
tools |
NA |
NA |
NA |
English/Foreign Books |
NA |
NA |
books-de-intl-us |
books-us |
You will see in the following example how I use synonyms to remove the trailing
"dash locale" in international modes and to map several amazOOP modes to a single AWS
mode.
You may also notice how amazOOP is enabled to use some non-official AWS modes such
as apparel, gourmet, etc. Use them at your own risk
- $modes = array( "us" => array( "books" => "books",
- "music" => "music",
- "classical" => "classical",
- "dvd" => "dvd",
- "vhs" => "vhs",
- "electronics" => "electronics",
- "kitchen" => "kitchen",
- "software" => "software",
- "videogames" => "videogames",
- "magazines" => "magazines",
- "toys" => "toys",
- "photo" => "photo",
- "apparel" => "apparel",
- "baby" => "baby",
- "garden" => "garden",
- "computers" => "pc-hardware",
- "universal" => "universal",
- "all" => "all",
- "books_es" => "books",
- "sports" => "sporting",
- "gourmet" => "food",
- "jewelry" => "jewelry",
- "music_es" => "music",
- "software_es" => "software",
- "food" => "gourmet"
- ),
- "uk" => array( "books" => "books-uk",
- "music" => "music",
- "classical" => "classical",
- "dvd" => "dvd-uk",
- "vhs" => "vhs-uk",
- "electronics" => "electronics-uk",
- "kitchen" => "kitchen-uk",
- "software" => "software-uk",
- "videogames" => "video-games-uk",
- "toys" => "toys-uk",
- "all" => "all"
- ),
- "de" => array( "books" => "books-de",
- "books_en" => "books-de-intl-us",
- "books_fr" => "books-de-intl-us",
- "books_es" => "books-de-intl-us",
- "books_it" => "books-de-intl-us",
- "music" => "pop-music-de",
- "classical" => "classical-de",
- "dvd" => "dvd-de",
- "vhs" => "vhs-de",
- "electronics" => "ce-de",
- "kitchen" => "kitchen-de",
- "software" => "software-de",
- "videogames" => "video-games-de",
- "magazines" => "magazines-de",
- "all" => "all",
- "computers" => "pc-de",
- "photo" => "photo-de",
- "kitchen" => "kitchen-de-all",
- "universal" => "tools-de",
- "garden" => "garden-de",
- "health" => "hpc-de"
- ),
- "fr" => array(),
- "ca" => array(),
- "jp" => array( "books" => "books-jp",
- "books_en" => "books-us",
- "music" => "music-jp",
- "dvd" => "dvd-jp",
- "electronics" => "electronics-jp",
- "vhs" => "vhs-jp",
- "software" => "software-jp",
- "videogames" => "videogames-jp",
- "all" => "all"
- )
- );
Once this is configured, you are ready to start using amazOOP. AmazOOP can be further
customized to fit your specific needs, however, you have to be confortable with PHP, and
be armed with a lot of patience to understand the code. AmazOOP's advanced configuration is
documented in the next section.
< Prev |
Up |
Next > |
Advanced Settings |
Advanced Settings |
amazOOP Categories |
|
|