Integrating "Similar Products" via XML
The interface can be accessed using the following URL format:
$stringEscapeUtils.escapeHtml($body)
The format parameter containing the value xml
causes FACT-Finder to return XML. Therefore it should be provided each time the interface is accessed.
The product for which similar products are requested is specified using its ID. This ID is supplied using the parameter called id
. The parameter maxRecordCount
can be used to define the maximum number of products to be returned. An optional parameter idsOnly
allows you to specify that only the product ID should be returned for similar products, thus improving performance.
Below is an example of what Similar Products returns when responding to a query for similar products through the XML interface:
<ff xsi:noNamespaceSchemaLocation="schema/7.2/ffsimilarrecords.xsd">
<similarAttributes>
<attribute name="category0">..Bikes..</attribute>
<attribute name="category1">..Mountainbikes..</attribute>
...
</similarAttributes>
<similarRecords>
<record nr="0" id="223494">
<field name="ArtNr">223494</field>
...
</record>
...
</similarRecords>
</ff>
The first part of the return value (the
SimilarAttributes
tag) contains all of the names and values of the categories used to determine the similarity level. The second part (the SimilarRecords
tag) contains all information concerning the similar products.