Options
All
  • Public
  • Public/Protected
  • All
Menu

Recommendation module

The recommendation module is responsible for generating recommendation frames for user.

A customer account configuration is required for use. Before using the module, make sure that you have configured recommendation frames in the client's panel. To use the module, you will need the placement ID to which the configured recommendation frames are attached

Hierarchy

  • RecommendationInterface

Implemented by

Index

Methods

  • The purpose of the method is to indicate recommended products.

    The method returns recommended products that meet the set criteria. Please note that some restrictions on the recommendation frame are configured in the panel.

    const recommendationEngine = new Recommendation(customerConfig)

    const categoryWidget: RecommendationParams = {
    placementId: '_placement_Id_',
    filters: [FilterApi.category('_product_category_id')],
    }

    await recommendationEngine.getRecommendation(categoryWidget)
    .then(response => {
    console.log(response.map(el => {return el.title + ' ' + el.price}))
    })
    .catch(reason => {
    console.log(reason)
    })
    throw

    RecommendationError

    Parameters

    Returns Promise<Product[]>

Generated using TypeDoc