Concept - Integration of Sparque into the Responsive Starter Store

Introduction

This concept describes the changes required in an existing project to integrate Sparque into a slightly modified Responsive Starter Store to replace the Solr search.

Although Sparque is an API-based solution and therefore best suited for the Intershop PWA, there may be Intershop customers who still use the Responsive Starter Store but would also like to benefit from the flexibility and versatility of Sparque.

This document was written by our implementation partner Fenego. You can reach out to info@fenego.be for any kind of detail questions.

References

Concept

The result of ViewStandardCatalog still shows in the same viewcontextpage. Also for the other pipelines, the end notes have not changed.

Most of the data that is used in the ISML templates comes from the ListNavigationVO object. By providing this object with Sparque data instead of Solr data or query data, changes to the ISML can be avoided altogether.

Enabling and disabling Sparque can be implemented with the help of a managed service. This allows business users (and developers) to turn Sparque on and off, with Solr serving as the default fallback in the system.
The ISML template only needs to be changed for displaying data if Sparque returns completely different data elements.

The concept assumes that only category IDs (only those with online products) and SKUs are retrieved. The display of elements outside of Intershop is therefore not taken into account.

This document is based on a customer project where the filter function was removed. As it was not a requirement to create filters when using Sparque, this document does not cover how to integrate the Sparque filter logic into the Starter Storefront.

Generic Remark

For all Sparque requests, the following query parameter must be added to retrieve an object that can be managed by a normal object mapper:

  • homogeneousArrays=true

Intershop Default Pipelines

ViewStandardCatalog.pipeline

  • Browse

  • Refresh

  • ProductPaging

A check is implemented for all three elements to determine if Sparque is being used.

The pipeline for this check:

  • ViewStandardCatalogBySparque.pipeline

RenderPagelet.pipeline

  • GetCategoriesTree

A check is implemented to determine whether Sparque is used.

To enable this, the category overview object has already been created including the information for MainNavigationFull.isml. With this information, it is possible to create a different approach for the Sparque template than the default (Solr) template. In the default setup, Solr returns a list of all categories. The logic loops through the different levels of categorization to show all subcategories. This logic is included in the new pipelet to keep the ISML as simple as possible. By using a different include based on Sparque or Solr in the template, it was possible to keep the existing Responsive Starter Store Solr templates while creating a more streamlined template for the Sparque data.

ViewParametricSearch.pipeline

  • OfferPaging

  • ProductPaging

  • Browse

  • SimpleOfferSearch

  • ChangePageSize

A check is implemented for all elements to determine whether Sparque is used.

The pipeline for this check:

  • ViewParametricSearchBySparque.pipeline

ViewSuggest.pipeline

The default pipeline was already modified in this project. It was pointing to a pipeline specific for a searchindex. This assignment was changed to a SimpleOfferSearch, but within a not modified Responsive Starter Store, the change will be a bit different.

Custom Sparque Pipelines

Logic such as fireEvents can be maintained in the custom Sparque pipelines as usual. A custom CreateSearchResultNavigationList pipeline can be used to create a ListNavigationVO object. The object itself is standard, but the standard pipelines for Solr or queries are too limited for this use case.

As mentioned, filters are out of scope for this document. If filters are required, they should be handled in the ListNavigationVO object.

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.