Skip to content

getWarehouses(int items_per_page)

The getWarehouses method is used to get a WarehousesList object that represents warehouses available in the storefront.

Input parameters

items_per_page

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

Returned value

The WarehousesList object.

Example

source
{% set warehouses = ObjectApi.getWarehouses(3) %}
{% for warehouse in warehouses %}
    {{ warehouse.id }}: {{ warehouse.name }}<br>
{% endfor %}
output
12: Kraków<br>
13: Szczecin<br>
14: Warszawa<br>