PHPackages                             premekkoch/elms-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. premekkoch/elms-service

ActiveLibrary

premekkoch/elms-service
=======================

Nette service for comunication with ELMS distribution service (http://www.elmsservice.cz)

1.0.0(6y ago)0291MITPHPPHP &gt;=7.1

Since Jun 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/premekkoch/elms-service)[ Packagist](https://packagist.org/packages/premekkoch/elms-service)[ RSS](/packages/premekkoch-elms-service/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (3)Versions (8)Used By (0)

PremekKoch\\ElmsService
=======================

[](#premekkochelmsservice)

ELMS Servis API communication service. It serves to create an order for sending the stored goods to the end customer.

Instalation
-----------

[](#instalation)

```
composer require premekkoch/elms-service

```

Configuration
-------------

[](#configuration)

### 1. Register new extension in `config.neon`

[](#1-register-new-extension-in-configneon)

```
extensions:
	elms: PremekKoch\Elms\DI\ElmsExtension

```

### 2. Set-up extension in `config.neon`

[](#2-set-up-extension-in-configneon)

```
elms:
	orderSourceCode: 'yourClientCodeFromElmsServis'
	debugMode: false  # in debug mode no data are send

```

How to use
----------

[](#how-to-use)

### 1. Inject an service into presenter or somewhere you need

[](#1-inject-an-service-into-presenter-or-somewhere-you-need)

```
	/** @var PremekKoch\Elms\ElmsService @inject */
	public $elmsService;

```

### 2. Set a customer and order data

[](#2-set-a-customer-and-order-data)

Start with creating order and customer basic data:

```
	:
	$this->elmsService->createOrder('123', 'INV_123', false, ElmsService::CURRENCY_CZK);
	$this->elmsService->addCustomer('Jan', 'Novák', 'Dlouhá 5', 'Dlouhá Lhota', '12345', ElmsService::COUNTRY_CZE);
	:

```

You can set another customer properties:

```
	:
	$this->elmsService->setCustomerCompany('Firma s.r.o.', '123456789', 'CZ123456789');
	$this->elmsService->setCustomerContact('novak@firma.cz', '+420777666555');
	:

```

or even diferent delivery address. You can set any part of delivery address separately. If delivery address is not set, shipping will be provided to customer`s address.

```
	:
	$this->elmsService->setCustomerDeliveryName('Jana', 'Nováková');
	$this->elmsService->setCustomerDeliveryAddress('Krátká 8', 'Krátká Lhota', '54321', ElmsService::COUNTRY_SVK);
	$this->elmsService->setCustomerDeliveryCompany('Jana Nováková OSVČ');
	$this->elmsService->setCustomerDeliveryContact('novakova@novakova.sk', '+421777888999');
	:

```

Next you must specify products to delivery. You can add more products, minimaly you must set one product and shipping:

```
	:
	$this->elmsService->addProduct('Product PLU', 1234.56, 1, 21);
	$this->elmsService->addProduct(ElmsService::DELIVERY_CPOSTRR, 55, 1, 21);
	:

```

Alternatively, you can set products in bulk:

```
	:
	$this->elmsService->addProducts([
		[
			'plu' => 'Product PLU',
			'price' => 1234.56,
			'amount' => 1,
			'vat' => 21,
		],
		[
			'plu' => ElmsService::DELIVERY_CPOSTRR,
			'price' => 55,
			'amount' => 1,
			'vat' => 21,
		],
	]);
	:

```

You can add special product items:

```
	:
	// Discount 100 CZK (value or ammount must be negative)
	$this->elmsService->addDiscount(-100, 1, 21);
	:
	// Rounding (-0.99 to +0.99)
	$this->elmsService->addRounding(-0.56);
	:

```

**Remember:** when you use CZK and cashOnDelivery, you must round an order to integers. In order cases (EURs or not cashOnDelivery) use two decimals maximally.

### 3. Send an order

[](#3-send-an-order)

```
	:
	$this->elmsService->sendOrder();
	:
	catch (PremekKoch\Elms\ElmsException $exc){
		// something goes wrong...
	}

```

When send fails, API returns only brief error. Email with whole request and problems descriptions should arrive from ELMS Servis soon - they checks every failed request manually.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~164 days

Recently: every ~246 days

Total

7

Last Release

2256d ago

Major Versions

0.0.6 → 1.0.02020-03-10

PHP version history (2 changes)0.0.1PHP &gt;=7.1

0.0.3PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0124c7578878cd1f7e1987a73f731277f113af61a4f623d8a8266a2e40f87684?d=identicon)[premekkoch](/maintainers/premekkoch)

### Embed Badge

![Health badge](/badges/premekkoch-elms-service/health.svg)

```
[![Health](https://phpackages.com/badges/premekkoch-elms-service/health.svg)](https://phpackages.com/packages/premekkoch-elms-service)
```

###  Alternatives

[nette/nette

👪 Nette Framework - innovative framework for fast and easy development of secured web applications in PHP (metapackage)

1.6k2.8M335](/packages/nette-nette)[apigen/apigen

PHP source code API generator.

2.2k627.9k225](/packages/apigen-apigen)[nette/web-project

Nette: Standard Web Project

10991.8k](/packages/nette-web-project)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
