Grouper - Documentation
All Posters Affiliates Plugin
See a live demonstration of this plugin on an multi-affiliates search page.
The All Posters
plugin can be used by All Posters affiliates to search AllPosters.com and convert the affiliates XML to RSS,
with their affiliates IDs in the links.
It works with two helper scripts:
fetch-all-posters.php (which performs the search, unwraps the XML from its SOAP wrapper, and caches a copy of it),
and all-posters2rss.php (which pulls all the necessary parts together to drive the whole process).
To use the All Posters plugin, xml-allposters.php must be located in the "plugins" folder inside the folder containing grouper.php.
This is the default location when Grouper Evolution is installed.
The helper scripts, fetch-all-posters.php and all-posters2rss.php,
must be installed somewhere on your webserver where they are accessible by a web browser
(thought they won't actually be loaded directly by a web browser).
The necessary configuration is performed by making changes to the "********* CONFIGURATION **********" sections of
fetch-all-posters.php and all-posters2rss.php.
The necessary configuration changes should be clear from the notes appearing in those files.
Additional optional configuration may be performed by altering the plugin's configuration variables.
This should be done in the section of all-posters2rss.php marked "// Add any desired All Posters plugin configuration code here" like this:
Available configuration options are:
- show-list-price: 1 to display the list price for each item, 0 (the default) to not display it.
- show-dimensions: 1 (the default) to display the height and width of each item, 0 to not display them.
- list-price-format: A printf style format string for formatting the list price of each item.
The default setting formats the price like this: "List Price: $15.99".
- all-posters-price-format: A printf style format string for formatting the list price of each item.
The default setting formats the price like this: "All Posters Price: $15.99".
Once you have configured fetch-all-posters.php and all-posters2rss.php and uploaded them to your server,
you may access the RSS feed generated by the All Posters plugin by entering the URL of all-posters2rss.php into
or whatever application you will be using to consume the feed,
with your search terms and product category ID* added to the end of the URL like this:
Notice how the space between "auto" and "racing" was changed to a plus sign.
This is necessary because URLs cannot contain spaces.
The only required argument to all-posters2rss.php is "q" (short for "query string", meaning the terms you're searching for).
The following arguments are optional:
- sort: The sort order for the search results.
Valid values as of this writing are 'PD'=popularity (the default); 'RD'=relevancy; 'CA'=price ascending; 'CD'=price descending; 'TD'=title descending; 'TA'=title ascending; 'DD'=date descending; 'DA'=date ascending; 'AD'=artist descending; 'AA'=artist ascending.
- minprice: Minimum price
- maxprice: Maximum price
- minwidth: Minimum width in inches
- maxwidth: Maximum width in inches
- minheight: Minimum height in inches
- maxheight: Maximum height in inches
- language: The language for the product titles.
Valid values as of this writing are '1'=English (the default); '2'=French; '3'=German; '4'=Spanish.
- currency: The currency to use for pricing information.
Vald values as of this writing are USD (the default), AUD, CAD, CHF, DKK, EUR, GBP, HKD, JPY, NOK, NZD, SEK, SGD, ZAR.
If you change the currency, you may need to change the 'list-price-format' and/or 'all-posters-price-format' configuration settings in the All Posters plugin.
* For a list of Category IDs, find the "Datafeed generator" link on AllPosters' LinkBuilder page, and use it to generate a "Category Information" feed.
Unfortunately, there does not appear to be an "All categories" category.
Here are a few of the more general category IDs as of this writing (the list is humongous and very detailed):
- 1483: Africa
- 1093: Airplanes
- 622: Animals
- 58262: Antarctica
- 630: Asia
- 6644: Astronomy
- 7720: Australia
- 20770: Biology
- 7140: Canada
- 1089: Cars
- 10784: Central America
- 10550: Europe
- 7808: Middle East
- 1023: Mountains
- 101: Movies
- 19123: Mythology (Greek/Roman)
- 7168: Oceania
- 17115: Oceanography
- 1570: South America
- 629: United States