Skip to content

getSpecialOffers(int items_per_page)

The getSpecialOffers method is used to get a list of promotion products.

Input parameters

items_per_page

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

Returned value

List of Product object.

Example

source
{% set specialOffers = ObjectApi.getSpecialOffers() %}
{% if specialOffers is not empty %}
    {% for product in specialOffers %}
        <p>{{ product.name }}</p>
        <p>{{ product.price }}</p>
    {% endfor %}
{% endif %}
output
Product name example
99,00 zł