Integrated Product System Version 1.1    

<<< Contents

Using Includes

You can include search results or products in a particular category using a number of methods:

  1. By far the easiest method is to use a few lines of php in an existing page (more below)
  2. You can also use SSI or javascript though this is more complicated than the above
  3. You can use your own scripting language (eg php, jsp, asp) to include whatever information you require and/or build your own SOAP client. All you need for this is an affiliate id and password
USING PHP
We have provided a number of php functions to enable you to include 'chunks' of information in your pages, formatted exactly as you wish. These are:
 
Function Parameters Description
awtoplevelcategories string template - optional (overrides default template) Displays top level categories
awsearchform string template - optional (overrides default template) Displays pre-populated search form
awshowproducts string template - optional (overrides default template) Displays products either by category for browsing, or as search results if a search was made


USING SSI
The exact instructions for how to do server-side includes will depend on the web server that you use and how it is configured. Many web servers are configured to only process server-side includes for certain types of files. These are usually identified by their file suffix eg .shtml or .phtml are commonly used. Please check with your ISP or system administrator to find out which files are SSI-enabled.

Below are examples of how to use SSI for the most common web servers, Apache and IIS (Internet Information Server).

For Apache and IIS please use the include virtual directive, which takes the form of:
<!--#include virtual="awsoapclient.php?action=someaction&catid=somecatid"-->

Common examples:

<!--#include virtual="awsoapclient.php?action=awBrowseProducts&catid=2296"-->
This would show all products in category 2296.

<!--#include virtual="awsoapclient.php?action=awSearchProducts&keywords=special offer"-->
This would show all products that result from a keyword search of "special offer".

For full information on how to use SSI with apache, please see http://httpd.apache.org/docs/howto/ssi.html

For full information on how to use SSI with IIS, please visit the msdn guide to includes.

 

Using Javascript
To include results using javascript you will first need to change the soap client configuration by editing awsoapclientconfig file and replacing SSI with javascript.

Once you have done this, you can include results into your pages using something similar to the following:

<script src="awsoapclient.php?action=awBrowseProducts&catid=2296"></script>
This would display all products in category id 2296. You can change the results produced by changing the parameters you pass to the soap client ie, catid=2100 to show different categories or "action=awSearchProducts&keywords=special offer" to search for products containing the words 'special offer' in their description or name. If you are using catid please ensure that you check that your product data set actually does contain products in that category as there are around 1000 categories in the master list.


Introduction | Upgrade Instructions | Quick Start | Installation & Usage | Including results in existing pages | Template Examples | Template Reference | Functions | API | Version History