AOM Developer API

Find addons/modules/scripts for AOM. Post your own.
Post Reply
associate-o-matic
Admin
Admin
Posts: 1879
Joined: Fri Oct 01, 2004 10:40 pm
Contact:

AOM Developer API

Post by associate-o-matic » Sun Feb 25, 2007 5:29 pm

In the coming days, we'll be posting more details on how to develop add-ons/modules for AOM.

Developers can build innovative add-ons/modules and offer them to the AOM user community for free or for a fee.

The user community will be able to further enhance their stores beyond the built-in functionality of the AOM Control Panel and associated AOM cfg files.

To give a quick technical overview... the AOM Developer API involves making use of the PHP $page array inside AOM store pages. This array contains details about a store page, be it a category or item page (e.g. ASIN, UPC, and much more). This array can be accessed in external PHP scripts you develop and in turn include inside Custom Boxes and Custom Pages (of the Type "HTML/PHP File").

Not only that, but your add-ons/modules could in turn pull additional information from a database such as MySQL and display that within a Custom Box or Custom Page.

To get a glimpse of the $page array contents, create a PHP script with the following code...
<?php
echo "<pre>";
print_r($page);
echo "</pre>";
?>
Then reference this PHP script inside a Custom Box. As you browse around your store, you'll see how the variables inside the array will change based on what kind of page your accessing.

Making use of this $page array opens up all kinds of neat possibilities for both developers and the AOM user community.

Some add-on ideas for the developers out there...
- Custom Reviews add-on (reviews maintained and pulled from a database)
- Menu/Tab generator (various styles controlled through CSS etc.)
- RSS feed viewer (external RSS displayed in your store)
- RSS feed generator (related to your AOM store pages)
- Store statistics (stored to Database)

Stay tuned as we post more details and tutorials to our documentation section and to the forum.

We welcome your ideas, feedback and suggestions.

Thank you,
Justin
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

User avatar
bmcaulif
Experience Level 3
Experience Level 3
Posts: 190
Joined: Tue Jun 27, 2006 11:06 pm
Location: USA
Contact:

Some requests...

Post by bmcaulif » Mon Mar 05, 2007 12:59 am

Hi, once again thanks for continuing to expand and improve AOM, the last few releases in particular have been fantastic for customizations.

I know that I can already approximate some of these requests with functionality you have provided (i.e. replace the search bar with one of my own by turning it off and adding a custom php routine in a custom box), but it would be nice to have the direct control.

In an API, I would like access to:

The search bar, ability to add items, customize the breadcrumb links, or to replace it with a php file routine of my own.

The session or cookies, I may need to get information for a user in the case of a wishlist, or party planner, if you are already establishing a session at some point, I might like to ride that.

A way to route a checkout request to a custom php file before it goes to amazon, with an array containing all of the shopping cart item data, the same data you are providing in the email will do nicely. This would allow me to do whatever I want with that data.

Ditto for invalid nodes or items, so I can log these to a file or table (can do with a javascript call in the error box now but that would be sooo much cleaner) or let me call a php file instead of the html box for the error conditions.

I don't know how much of the config xml you are carrying around at any given moment, but if the vars are available I'd lke to be able to access the array in any subroutine, or give me a API call to get any of the config vars.

That's all I can think of right at the moment, I'll put some more up as I think of them.

Thanks again...
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

User avatar
bmcaulif
Experience Level 3
Experience Level 3
Posts: 190
Joined: Tue Jun 27, 2006 11:06 pm
Location: USA
Contact:

API request to support custom home page/landing pages

Post by bmcaulif » Sun Mar 11, 2007 6:21 am

Hi, here are some api requests to support development of custom home page and landing page php scripts.

1. Search an individual item (ASIN) call
2. Search a search term call


Soooooo, maybe something like this for the search term call (pseudo code):

Basically ir rturns in an object or array, all of the data and urls (specific to my site) from a normal
category search.

Code: Select all

<?php
mySearch = new AOMsearch;
mySearch->search.Term='Glass Beads';
mySearch->search.category='<insert cat name from config here>';
mySearch->search.priceMax = '1000';
mySearch->search.priceMin = '100';
mySearch->search.brand = 'Chinaco';

// returns up to 10 matches
myAOMsearchResult = mySearch->search.execute(); 

//my responsibility to check total return or you can be nice and give me a 
//class var to do so
cnt_items = myAOMsearchResult->itemCount;

?>
<table class="sometableclass">

<?php

// give me some way to index the items in the array or object
// i.e. a descriptor or method to return the item data by index number


//for a loop of some sort to cnt_items - I'm a little shaky on the class index call syntax, sorry
for($i = 0; $i < cnt_items; $i++) { 
   echo '<tr>';
   echo '<td class="sometdclass">';
   echo '<a href="'. myAOMsearchResult->Href[$i] .'">' . myAOMsearchResult->Title[$i] . '</a>';
   echo '</td>';
   echo '</tr>'; 
} 

?>
</table>
I would want to be able to access each of the data elements (as properties?), and urls (formatted for my site per my setup for that site) that are in the current search return displays.

For individual ASIN calls, I would like 2 flavors. One short form which brings back the item data that is in the search results, but only for one item, and a long form which brings back the data and urls available in the item display.

Please include picture urls for both types of calls, if you can get all 3 size urls in the same call to Amazon, that would be great, otherwise I can pass you the size in the setup before the execute call.

Please let me know if you need clarification.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

User avatar
bmcaulif
Experience Level 3
Experience Level 3
Posts: 190
Joined: Tue Jun 27, 2006 11:06 pm
Location: USA
Contact:

Request Additional data in $page array

Post by bmcaulif » Fri Mar 30, 2007 12:31 am

Hi,

I could really use the following information to be added to the $page array:

1. Category link url's:

Formatted per the mod-rewrite and other settings, just like you pop them out in the category menu, but no table data, just the url and the anchor text, maybe add an element to the current categories array. Also please include the text that the user has set for the category box title.

i.e.

Code: Select all

[Categories] => Array ( 
   [books] => 
      Array ( 
         [Id] => books 
         [Mode] => Books 
         [Name] => Books 
         [Node] => 1000 
         [Keyword] => %20 
         [FormattedURL] => "http://www.yacw.com/books-Books.html") 
   [bkartphoto] => 
      Array ( 
         [Id] => bkartphoto 
         [Mode] => Books 
         [Name] => Arts & Photography 
         [Node] => 1 
         [Keyword] => %20 
         [FormattedURL] => "http://www.yacw.com/bkartphoto-Arts_Photography.html") 
[CategoriesTitleText] => "Book Shelves"
 )

If you add it to the existing array, I can grab the anchor text from it, if you put it in it's own seperate array, I will need the anchor text.

2. Subcategory link url's

An array that as a minimum has the formatted url to the current page subcategory list and the anchor text. Maybe as close to the structure and content as the categories array as you can, the other info i.e. node would be handy to have. Maybe just use the node for the top level element on each sub category:

i.e.

Code: Select all

[SubCategories] => Array ( 
   [173508] => 
      Array ( 
         [Category] => bkartphoto 
         [Name] => Architecture
         [Keyword] => %20 
         [FormattedURL] => "http://www.yacw.com/bkartphoto-173508-Architecture.html") 
   [1104] => 
      Array ( 
         [Category] => bkartphoto 
         [Name] => Artists, A-Z 
         [Keyword] => %20 
         [FormattedURL] => "http://www.yacw.com/bkartphoto-1104-Artists_A_Z.html") 
[SubCategoriesTitleText] => "Current Book Shelf"
 )

3. & 4. Ditto for the best sellers and just released data elements

It would probably be a good idea to set a flag to turn on or off the extended array population, so users who do not want this functionality can save a little memory.

Again, I would like the formatted URL to be derived from the current store setting, i.e. with or without mod-rewrite, any custom stuff. I'm pretty sure I can get the colors and such I need from the current css settings.

I'd kind of like the category and subcategory links in the array sooner rather than later if at all possible, so please take a look at this and tell me if it is the type of request you are looking for...

You can pass me a test version if you want and I'll load it on yacw.com (my test site).
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

superaff
Experience Level 1
Experience Level 1
Posts: 13
Joined: Wed Jul 25, 2007 12:54 am

Re: AOM Developer API

Post by superaff » Sun Jul 29, 2007 3:00 am

associate-o-matic wrote:In the coming days, we'll be posting more details on how to develop add-ons/modules for AOM.
...

Stay tuned as we post more details and tutorials to our documentation section and to the forum.
Where can I find API and documentation please?

Thanks.

Jason

associate-o-matic
Admin
Admin
Posts: 1879
Joined: Fri Oct 01, 2004 10:40 pm
Contact:

Re: AOM Developer API

Post by associate-o-matic » Fri Jun 04, 2010 3:21 pm

Here's the latest version of the API documentation:
http://www.associate-o-matic.com/docs/doc_api.html
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

sarenawest
Experience Level 1
Experience Level 1
Posts: 13
Joined: Mon Oct 19, 2009 4:36 pm
Contact:

Re: AOM Developer API

Post by sarenawest » Tue Jun 15, 2010 11:11 am

is the api working in the current version?
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

associate-o-matic
Admin
Admin
Posts: 1879
Joined: Fri Oct 01, 2004 10:40 pm
Contact:

Re: AOM Developer API

Post by associate-o-matic » Fri Jun 18, 2010 12:14 pm

Yes. Are you experiencing any problems?
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

User avatar
NiTe
Experience Level 3
Experience Level 3
Posts: 105
Joined: Tue Jan 23, 2007 6:36 pm
Location: 127.0.0.1
Contact:

Re: AOM Developer API

Post by NiTe » Sat Jan 29, 2011 4:57 pm

I'm trying to pull the current category name and the current subcategory name (if available) using this. I cannot figure out how to pull this information from the $page array ... mainly because the category name is in another array within the $page array, and I'm an idiot and cannot pull the value. :-)

Code: Select all

echo $page['Name'];
How do I echo the category name from the $page array?

(PS: I'm also trying to do a robots="noindex, follow" on my AOM store as the default, and on individual items, I'm trying to do robots="index, follow", I'm sure I could do it by relying on true/false things in the $page array, but not sure how to do this too.)

[Edit ..]

Nailed it.

Code: Select all

<meta name="robots" content="<?php if (is_null($page['EAN'])) { echo 'noindex,follow'; } else { echo 'index,follow'; }?>">
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

appliancereview
Posts: 5
Joined: Thu Mar 03, 2011 8:08 am

Re: AOM Developer API

Post by appliancereview » Fri Mar 11, 2011 9:27 pm

Hi, I am having a problem following the custom pages procedures, I have tried creating a new custom page and a php script on my other server, how am I suppose to call that script in the custom page script? i tried the php code given:

<?php
echo "<pre>";
print_r($page);
echo "</pre>";
?>


It will only show me a blank page, also I use 'HTML/PHP File' as a age type.

Pls. help. Thank you.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

mcarp555
Admin
Admin
Posts: 4088
Joined: Thu Sep 14, 2006 5:19 pm
Location: United Kingdom
Contact:

Re: AOM Developer API

Post by mcarp555 » Sat Mar 12, 2011 12:38 am

If the PHP script is on another server, you would probably need to put the URL to that script in the Page Content box.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest