Saltar al contenido principal

getFrequentlyOrderedProducts

Getting frequently ordered products by block marker and product id.

Description

This method returns frequently ordered products associated with a specific block marker and product id. It returns a Promise that resolves to an array of IProductsEntity objects.

Blocks.getFrequentlyOrderedProducts(

productId*, marker*, langCode, signPrice

);

Parameters schema

Schema

productId(required): number
Product id
example: 1

marker(required): string
Block marker
example: "frequently_ordered_block"

langCode: string
Language code. Default: "en_US"
example: "en_US"

signPrice: string
Sign price

Examples

Minimal example

const response = await Blocks.getFrequentlyOrderedProducts(1, 'my-block');

Example with attributes

const response = await Blocks.getFrequentlyOrderedProducts(1, 'my-block', 'en_US');

Example response

[]

Response schema

Schema: IProductsEntity[]