File

projects/storefrontlib/events/product/product-page.events.ts

Description

Indicates that a user visited a product details page.

Extends

PageEvent

Index

Properties

Properties

Optional categories
Type : Category[]
Optional code
Type : string
Optional name
Type : string
Optional price
Type : Price
Static Readonly type
Type : string
Default value : 'ProductDetailsPageEvent'
Inherited from CxEvent
Defined in CxEvent:9

event's type

navigation
Type : NavigationEvent
Inherited from PageEvent
Defined in PageEvent:11

NavigationEvent's payload

import { Category, Price } from '@spartacus/core';
import { PageEvent } from '../page/page.events';

/**
 * Indicates that a user visited a product details page.
 */
export class ProductDetailsPageEvent extends PageEvent {
  /** event's type */
  static readonly type = 'ProductDetailsPageEvent';
  categories?: Category[];
  code?: string;
  name?: string;
  price?: Price;
}

/**
 * Indicates that a user visited a category page.
 */
export class CategoryPageResultsEvent extends PageEvent {
  /** event's type */
  static readonly type = 'CategoryPageResultsEvent';
  categoryCode: string;
  categoryName?: string;
  numberOfResults: Number;
}

/**
 * Indicates that the a user visited the search results page,
 * and that the search results have been retrieved.
 */
export class SearchPageResultsEvent extends PageEvent {
  /** event's type */
  static readonly type = 'SearchPageResultsEvent';
  searchTerm: string;
  numberOfResults: Number;
}

result-matching ""

    No results matching ""