Associate-O-Matic v5 Documentation   Last Updated: 2013-11-26
 
 
   STORE
· Getting Started
· Amazon
· Categories
· Home Page
· Merchant
· Shopping Cart
· Site
· Subcategories
 
   CONTENT
· Built-In Boxes
· Custom Boxes
· Custom Pages
· Currency
· Display
· Meta Descriptions
· Meta Keywords
· Reviews
· RSS
· Search
· Titles
 
   APPEARANCE
· Background
· Buttons
· Colors
· CSS
· Images
· Layout
· Tabs
· Text
· Themes
 
   OPTIMIZE
· Advanced
· Cache
· Errors
· Filters
· Reports
· SEO
 
 
API  (Application Programming Interface)
 

The Associate-O-Matic API allows you to access dynamic page information for use in your own pages, scripts and applications. It does require basic PHP programming.

This dynamic information is found in the PHP array called: $page

NOTE: If you are accessing this information inside a template (.tpl) file, you would use the $this->aom->page) array.

Depending on where you're at in your store the $page array will contain different information that you can make use of.

Here are the main places where you can make use of the $page array:

  • Home Page (Format: HTML/PHP File)
  • Custom Boxes (Box Type: HTML/PHP File)
  • Custom Pages (Page Type: HTML/PHP File)
  • Site Header (Embedded PHP)
  • Site Footer (Embedded PHP)

To use the $page array you would reference it inside PHP tags inside an external PHP script
or HTML file. For example using the below you can get a dump of the array elements:




For example, on a Category page the $page array would contain information such as...

Array
(
    [c] => 1
    [x] => Books
    [s] => sr
    [Title] => Your Bookstore: Books
    [MetaDescription] => Books - Your Bookstore
    [MetaKeywords] => Books, Your Bookstore
    [Breadcrumbs] =>  Home � Books
    [Name] => Books
    [Categories] => Array
        (
            [1] => Array
                (
                    [Id] => 1
                    [Mode] => Books
                    [Name] => Books
                    [Node] => 1000
                    [Keyword] => %20
                    [Sub] => On
                )
        )
    [Location] => L
)

On an item page the $page array would contain information such as...

Array
(
    [c] => 1
    [n] => 1000
    [i] => 0545010225
    [x] => Harry_Potter_and_the_Deathly_Hallows_Book_7
    [ISBN] => 0545010225
    [EAN] => 9780545010221
    [Manufacturer] => Arthur A. Levine Books
    [Publisher] => Arthur A. Levine Books
    [Studio] => Arthur A. Levine Books
    [Label] => Arthur A. Levine Books
    [Name] => Harry Potter and the Deathly Hallows (Book 7)
    [Breadcrumbs] =>  Home» Books » Harry Potter and the Deathly Hallows (Book 7)
    [Title] => ambado.de: Books: Harry Potter and the Deathly Hallows (Book 7)
    [MetaDescription] => Harry Potter and the Deathly Hallows (Book 7)
    [MetaKeywords] => Harry Potter and the Deathly Hallows (Book 7)
    [Categories] => Array
        (
            [1] => Array
                (
                    [Id] => 1
                    [Mode] => Books
                    [Name] => Books
                    [Node] => 1000
                    [Keyword] => %20
                    [Sub] => On
                )
        )

    [Location] => L
)



To reference a specific piece of information in the $page array you would use PHP code such as


To reference a specific piece of information in the $page array you would use PHP code such as the following (e.g. displays the Title of the Book):




Here's another example where the ISBN will be displayed:




If you have ideas or suggestions on how we can improve the API please contact us.