amazOOP amazOOP
[ class tree: amazOOP ] [ index: amazOOP ] [ all elements ]

INSTALL

INSTALLATION

1.  Decompress the file you downloaded (normally amazoop_vX.zip, where X is the
    version number) to your site directory.

2.  Open the file config.inc.php. You have to modify this file first in order
    for AmazOOP to work correctly.
    NOTE: Given the international nature of the program, all files are UTF-8
    encoded and several contain Japanese characters.

3.  config.inc.php can be tweaked to customize AmazOOP in great detail, but for
    know you only need to modify a couple of values to start using AmazOOP.

4.  First you need to set the $testServer and $defServer values to the
    addresses of your testing server and the definitive server. Configuration
    examples:
        $testServer = "test.madd0.com";
        $defServer = "www.madd0.com";
    or
        $testServer = "www.madd0.com/testing";
        $defServer = "www.madd0.com";

5.  Next you should specify whether your pages are UTF-8 encoded or not if they
    are set:
        $UTF_8 = true;
    Otherwise set:
        $UTF_8 = false;
    Encoding your pages in UTF-8 is recommended, since AWS responses are UTF-8
    encoded and it can be useful if you wish to use Japanese results.

6.  If you are an Amazon Associate, you should now enter your respective
    Associates Ids for each locale, if you don’t have an ID, leave the default
    value “webservices-20”. For example, you could set your array to look like
    this:
        $assocIDs = array( "us" => "amazon_com-ID",
                           "uk" => "amazon_co_uk-ID",
                           "fr" => "amazon_fr-ID",
                           "de" => "amazon_de-ID",
                           "jp" => "webservices-20",
                           "ca" => "webservices-20"
                          );

7.  You now need to set the paths to the default images AmazOOP should use in
    case Amazon doesn’t supply an image. You need three images: a small one, a
    medium one, and a large one. The images can be any size you want, and can
    be located anywhere in your server. Paths should have this form:
        /relative/URI/with/absolute/path/to/image.gif
    This means that if your image’s URL is:
        http://your.server.com/images/defaultSmall.gif
    The path you should write is:
        /images/defaultSmall.gif
    Watch the initial slash!
    A configuration example:
        $defaultImages = array( "small"  => "/images/ Small.gif",
                                "medium" => "/images/ Medium.gif",
                                "large"  => "/images/ Large.gif"
                               );

8.  Now you must indicate what character should be used as a file separator in
    file paths. For example in Windows you use the backslash "\", in Linux you
    use a slash "/". Since your test server may be running a different OS than
    your definitive server, you must set a value for each one.
    Set this to "\\" if your server runs on Windows, or to "/" if it runs on a
    UNIX flavour.
    For a test server running Windows and a definitive server running Linux,
    configuration would look like this:
        if($_SERVER['SERVER_NAME'] == $testServer)
            $fileSeparator = "\\";
        else
            $fileSeparator = "/";

9.  Next you must indicate the full physical path to the temporary directory.
    In this directory the information downloaded from Amazon is stored while it
    is being parsed. Usually this is set to /path/to/amazoop/tmp, but you can
    set it to any directory your server has permission to write. Once again you
    have to set one up for your test server and another for your definitive
    server.
    This is what it would look like if you are running  Windows on your test
    server and Unix on your definitive server:
        if($_SERVER['SERVER_NAME'] == $testServer)
             $tmpDir = "c:\\path\\to\\amazoop\\tmp";
        else
             $tmpDir = "/path/to/amazoop/tmp";

10. Now you must set up the directory for the cache, following the same
    instructions as above.
        if($_SERVER['SERVER_NAME'] == $testServer)
            $cacheDir = "c:\\path\\to\\amazoop\\cache";
        else
            $cacheDir = "/path/to/amazoop/cache";

11. This step if optional if you do not wish to use images to show the products
    platform or medium (i.e. DVD, VHS, PS2, Windows, Linux, etc.
    If you do wish to use these images, you should set their paths like
    described on the previous step. If you don’t have these images, you can
    download them at the same location where you downloaded AmazOOP.
    This is an example of a configuration:
        $media = array( "dvd"       => "/images/platforms/dvd.gif",
                        "vhs"       => "/images/platforms/vhs.gif",
                        "dreamcast" => "/images/platforms/dreamcast.gif",
                        "gamecube"  => "/images/platforms/gcube.gif",
                        "linux"     => "/images/platforms/linux.gif",
                        "ps2"       => "/images/platforms/ps2.gif",
                        "windows"   => "/images/platforms/windows.gif",
                        "xbox"      => "/images/platforms/xbox.gif"
                       );

12. This step is also optional and is only needed if you wish to use images
    instead of buttons in “Add to Cart” forms. You should set the paths as
    above, for each locale.
    For example:
        $buyNowImg = array ( "us" => "/images/buyNowUS.gif",
                             "uk" => "/images/buyNowUK.gif",
                             "de" => "/images/buyNowDE.gif",
                             "jp" => "/images/buyNowJP.gif"
                           );

THAT'S ALL! You may now take a look at the EXAMPLE document for a short example
on how to use AmazOOP.

 
Documentation generated on Sat, 21 Aug 2004 17:40:13 +0200 by phpDocumentor 1.3.0RC3
hosted by
SourceForge.net Logo