Skip to content

getProductsOfTheDay(int items_per_page)

The getProductsOfTheDay method is used to get the ProductsList object that represents a list of all products marked as product of the day in the storefront.

Input parameters

items_per_page

int Number of items in a page of internal paginator. Parameter is optional. Default value is 16.

Returned value

The ProductsList object.

Example

source
{% set productsOfTheDay = ObjectApi.getProductsOfTheDay() %}
{% for product in productsOfTheDay %}
    <p>{{ product.name }}</p>
{% endfor %}
output
<p>Samsung S10</p>
<p>Corn Flakes 500g</p>