---
title: "CalculatorEntity: CDEK shipping calculation in Joomla | WT CDEK - WebTolk websites development, Joomla Extensions"
description: "CalculatorEntity for Joomla: shipping rates and delivery price calculation. WT CDEK documentation with CDEK API parameters and PHP integration examples."
url: "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-entities-calculator"
date: "2026-11-02T12:19:55+00:00"
language: "en-GB"
---

## Breadcrumbs

[Home](https://web-tolk.ru/en) > [Joomla extensions](https://web-tolk.ru/en/dev) > [Libraries](/en/dev/biblioteki) > [WT CDEK library](/en/dev/biblioteki/wt-cdek-library-for-joomla-developers) > [Documentation](/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation) > CalculatorEntity: CDEK shipping calculation in Joomla

# CalculatorEntity: CDEK shipping calculation in Joomla

WT CDEK library - Documentation

**Category:** [Libraries](https://web-tolk.ru/en/dev/biblioteki)

[Project](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers)[Versions](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/versions)[Documentation](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation)[GitHub](https://github.com/WebTolk/WT-CDEK-Joomla-PHP-library)

CalculatorEntity in WT CDEK for Joomla covers shipping rates and delivery price calculation. This reference explains its purpose, parameters and PHP examples for Joomla extensions.

CalculatorEntity calculates shipping prices and delivery times before an order is created.

Access the entity through the Cdek facade:

```
$calculator = $cdek->calculator();
```

## `getAllTariffs()`

### Signature

```
public function getAllTariffs(): array
```

### REST API

- `GET /v2/calculator/alltariffs`

### Purpose

Returns tariff codes available under your CDEK contract. Joomla caches the result.

### Parameters

No parameters.

### Returns

The API response's `tariff_codes` array, or an empty array on an API error.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();
$tariffs = $cdek->calculator()->getAllTariffs();
```

## `calculateTariff()`

### Signature

```
public function calculateTariff(array $request_options = []): array
```

### REST API

- `POST /v2/calculator/tariff`

### Purpose

Calculates the price and delivery time for one tariff.

### Parameters

Required: `tariff_code`, `from_location`, `to_location`, `packages`, and `packages[].weight`. Optional `services` contains additional services.

### Returns

API response, typically including `delivery_sum`, `period_min`, `period_max`, `total_sum`, `services` and `currency`.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->calculator()->calculateTariff([
    'tariff_code'   => 136,
    'from_location' => ['code' => 44],
    'to_location'   => ['code' => 270],
    'packages'      => [
        [
            'weight' => 1000,
            'length' => 10,
            'width'  => 10,
            'height' => 10,
        ],
    ],
]);
```

## `calculateTariffList()`

### Signature

```
public function calculateTariffList(array $request_options = []): array
```

### REST API

- `POST /v2/calculator/tarifflist`

### Purpose

Calculates available tariffs for a route and package parameters.

### Parameters

Required: `from_location`, `to_location`, `packages`, `packages[].weight`. Do not supply a tariff_code to select a single tariff.

### Returns

An array of tariffs matching the request.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->calculator()->calculateTariffList([
    'from_location' => ['code' => 44],
    'to_location'   => ['code' => 270],
    'packages'      => [
        [
            'weight' => 1500,
            'length' => 20,
            'width'  => 15,
            'height' => 10,
        ],
    ],
]);
```

## `tariffAndService()`

### Signature

```
public function tariffAndService(array $request_options = []): array
```

### REST API

- `POST /v2/calculator/tariffAndService`

### Purpose

Calculates tariffs including additional services such as insurance or packaging.

### Parameters

Required route and packages with weight. Optional `services` is an array, e.g. `['code' => 'INSURANCE', 'parameter' => 1000]`.

### Returns

API response with tariffs and services included in the calculation.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->calculator()->tariffAndService([
    'from_location' => ['code' => 44],
    'to_location'   => ['code' => 270],
    'packages'      => [
        [
            'weight' => 1000,
            'length' => 20,
            'width'  => 20,
            'height' => 20,
        ],
    ],
    'services'      => [
        [
            'code'      => 'INSURANCE',
            'parameter' => 5000,
        ],
    ],
]);
```

[Overview and getting started](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-library-joomla-form-fields)

[WT CDEK 1.4.0 source code on GitHub](https://github.com/WebTolk/WT-CDEK-Joomla-PHP-library/blob/v.1.4.0/lib_webtolk_wtcdek/src/Entities/CalculatorEntity.php)

## JSON-LD Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://web-tolk.ru/en",
                "name": "Home"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://web-tolk.ru/en/dev",
                "name": "Joomla extensions"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "/en/dev/biblioteki",
                "name": "Libraries"
            }
        },
        {
            "@type": "ListItem",
            "position": 4,
            "item": {
                "@id": "/en/dev/biblioteki/wt-cdek-library-for-joomla-developers",
                "name": "WT CDEK library "
            }
        },
        {
            "@type": "ListItem",
            "position": 5,
            "item": {
                "@id": "/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation",
                "name": "Documentation"
            }
        },
        {
            "@type": "ListItem",
            "position": 6,
            "item": {
                "name": "CalculatorEntity: CDEK shipping calculation in Joomla"
            }
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Organization",
            "@id": "https://web-tolk.ru/#/schema/Organization/base",
            "name": "WebTolk",
            "url": "https://web-tolk.ru/",
            "logo": {
                "@type": "ImageObject",
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo",
                "url": "https://web-tolk.ru/images/webtolk-1080p.jpg",
                "contentUrl": "https://web-tolk.ru/images/webtolk-1080p.jpg",
                "width": 1920,
                "height": 1080
            },
            "image": {
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo"
            },
            "sameAs": [
                "https://github.com/WebTolk",
                "https://github.com/sergeytolkachyov",
                "https://vk.com/web_tolk",
                "https://vk.com/webtolkru",
                "https://tenchat.ru/sergeytolkachyov",
                "https://t.me/sergeytolkachyov",
                "https://t.me/webtolkru"
            ]
        },
        {
            "@type": "WebSite",
            "@id": "https://web-tolk.ru/#/schema/WebSite/base",
            "url": "https://web-tolk.ru/",
            "name": "WebTolk websites development, Joomla Extensions",
            "publisher": {
                "@id": "https://web-tolk.ru/#/schema/Organization/base"
            }
        },
        {
            "@type": "WebPage",
            "@id": "https://web-tolk.ru/#/schema/WebPage/base",
            "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-entities-calculator",
            "name": "CalculatorEntity: CDEK shipping calculation in Joomla | WT CDEK - WebTolk websites development, Joomla Extensions",
            "description": "CalculatorEntity for Joomla: shipping rates and delivery price calculation. WT CDEK documentation with CDEK API parameters and PHP integration examples.",
            "isPartOf": {
                "@id": "https://web-tolk.ru/#/schema/WebSite/base"
            },
            "about": {
                "@id": "https://web-tolk.ru/#/schema/TechArticle/base"
            },
            "inLanguage": "en-GB",
            "breadcrumb": {
                "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17"
            }
        },
        {
            "@type": "TechArticle",
            "headline": "CalculatorEntity: CDEK shipping calculation in Joomla",
            "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-entities-calculator",
            "description": "CalculatorEntity in WT CDEK for Joomla covers shipping rates and delivery price calculation. This reference explains its purpose, parameters and PHP examples for Joomla extensions.",
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-entities-calculator"
            },
            "keywords": [
                "Joomla",
                " PHP",
                " CDEK API",
                " WT CDEK",
                " CalculatorEntity",
                " shipping rates and delivery price calculation"
            ]
        }
    ]
}
```
