Campaigns get their own template, stored in the shop configuration
shop.config in the ExternalSearch section under the FACTFinderCampaignTemplate parameter. This allows them to be included on the product detail and basket pages via WS-ExternInclude.
Guide: Integrating FACT-Finder campaigns · Guide: FACT-Finder at a glance · Reference: E-Search_ (basics and result list)
The basic structure
E-Search_Campaign is both the check for existing campaigns and the loop over them. Within the loop, three ranges determine which type it is.
A search can trigger several campaigns at the same time, including of different types. That is why the type check is inside the loop and not before it.
Distinguishing campaigns
For permanent special displays, the ID from
E-Search_Campaign_Id() is the most reliable choice. Names and categories are more easily renamed in the Management, and a renamed name silently makes the range come to nothing.Advisor campaigns
An advisor campaign consists of questions, and each question has answers. In the template, two loops are therefore nested inside each other.You need the IDs from
_Id() if a particular question or answer should look different from the others, for example with an image instead of text.Feedback campaigns
A feedback campaign returns texts plus a product selection. Both are separate loops.The texts
E-Search_CampaignFeedbackText_HTML tells you whether the stored text already contains markup. Plain text needs a paragraph around it in the template; HTML text brings its own structure and would end up incorrectly nested inside a paragraph.The products
As with the result list, FACT-Finder only returns product indexes.
PR-AdvData() fetches the actual product data from the shop so that prices and availability are correct.The loop accepts two parameters: the first entry to display and the number of entries.
{@E-Search_CampaignFeedbackResult(1,4)} shows the first four products, which is usually enough for a teaser next to the hit list.Redirect campaigns
A redirect campaign returns a target address to which the visitor should be sent.If you still want to redirect, a visible notice about it belongs on the page, together with a link to the unfiltered hit list.
Links for SEO addresses
As everywhere, there is a Params variant for the answers of an advisor campaign.The tags at a glance
All tags on this page apply in the campaign template and in the search template. The Advisor tags only within
E-Search_CampaignType_Advisor, the Feedback tags only within E-Search_CampaignType_Feedback, and the Target tags only within E-Search_CampaignType_Target.
E-Search_CampaignResult() and E-Search_CampaignResultIndex still appear in the old documentation. They have been replaced by E-Search_CampaignFeedbackResult and E-Search_CampaignFeedbackResult_Index and are therefore not listed here.Related topics
- Guide: Integrating FACT-Finder campaigns
- Guide: FACT-Finder at a glance
- Reference: E-Search_ (basics and result list)
- Reference: E-Search_ (filters)
