Download the PHP package baraja-core/heureka-feed without Composer

On this page you can find all versions of the php package baraja-core/heureka-feed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package heureka-feed

Heureka Feed Adapter

Smart PHP library for generating valid Heureka.cz XML product feeds. The package provides automatic feed generation, category management, product validation, and seamless integration with Nette Framework.

🎯 Key Principles

🏗️ Architecture

The package follows a clean separation of concerns with the following main components:

📦 Components Overview

Component Description
HeurekaFeedExtension Nette DI extension that registers all services and sets up automatic feed endpoint
HeurekaManager Main orchestrator that triggers feed rendering
FeedRenderer Converts product data to valid Heureka XML format
ProductLoader Interface you implement to provide your products
CategoryManager Manages Heureka's official category tree with caching
HeurekaProduct Entity representing a single product with all Heureka attributes
Category Entity representing a Heureka category with parent hierarchy
Delivery Entity representing delivery options with predefined carrier constants
DescriptionRenderer Interface for custom product description formatting
Helpers Utility class with EAN-13 and ISBN-10/13 validation methods

📦 Installation

It's best to use Composer for installation, and you can also find the package on Packagist and GitHub.

To install, simply use the command:

You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.

Nette Framework Integration

Register the extension in your config.neon:

The extension automatically:

🚀 Basic Usage

1. Implement the ProductLoader Interface

Create a class that implements ProductLoader to provide your products:

2. Register Your ProductLoader

In your config.neon:

The FeedRenderer will automatically detect and use your ProductLoader implementation.

3. Access the Feed

Once configured, the XML feed is automatically available at:

📋 HeurekaProduct Entity

The HeurekaProduct entity supports all standard Heureka feed attributes:

Required Attributes (Constructor)

Attribute Type Description
itemId string Unique product identifier (max 36 chars, alphanumeric with - and _)
product string Product name for matching (max 200 chars)
productName string Exact product name displayed to users (max 200 chars)
url string Absolute URL to product detail page (max 300 chars)
priceVat float Price including VAT
category Category Heureka category entity
manufacturer string Manufacturer/brand name

Optional Attributes (Setters)

Image Requirements

Parameter Handling

Parameters are automatically converted:

🚚 Delivery Options

The Delivery entity supports all major Czech carriers:

Supported Carriers

Constant Carrier
CESKA_POSTA Ceska posta - Balik Do ruky
CESKA_POSTA_NAPOSTU_DEPOTAPI Ceska posta - Balik Na postu
CESKA_POSTA_DOPORUCENA_ZASILKA Ceska posta - Doporucena zasilka
PPL PPL
DPD DPD
DPD_PICKUP DPD Pickup
DHL DHL
GLS GLS
GEIS Geis
ZASILKOVNA Zasilkovna
BALIKOVNA_DEPOTAPI Balikovna
UPS UPS
FEDEX FedEx
TNT TNT
TOPTRANS TOPTRANS
WEDO WeDo (IN TIME & Ulozhenka)
VLASTNI_PREPRAVA Custom delivery
FOFR FOFR
DSV DSV
HDS HDS
GEBRUDER_WEISS Gebruder Weiss
SEEGMULLER Seegmuller
RABEN_LOGISTICS Raben Logistics
CSAD_LOGISTIK_OSTRAVA CSAD Logistik Ostrava

📁 Category Management

The CategoryManager provides access to Heureka's official category tree:

Category Entity

Custom Category Feed URL

By default, categories are fetched from https://www.heureka.cz/direct/xml-export/shops/heureka-sekce.xml. You can change this:

Caching

🎨 Custom Description Renderer

Implement DescriptionRenderer to customize how product descriptions are processed:

Register your implementation:

Then set it on the FeedRenderer:

Built-in Markdown Renderer

If baraja-core/markdown-latte-filter is installed, the BarajaMarkdownDescriptionRenderer is automatically registered. It converts Markdown to plain text (strips HTML tags after rendering).

🔧 Validation Helpers

The Helpers class provides validation utilities:

These validators are automatically used when setting EAN or ISBN on HeurekaProduct and will throw InvalidArgumentException for invalid values.

🔍 Generated XML Structure

The generated feed follows Heureka's XML specification:

⚠️ Error Handling

The package performs extensive validation and throws exceptions for invalid data:

All validation errors include descriptive messages to help identify the issue.

📝 Manual Usage (Without Nette)

👤 Author

Jan Barasek - https://baraja.cz

📄 License

baraja-core/heureka-feed is licensed under the MIT license. See the LICENSE file for more details.


All versions of heureka-feed with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
baraja-core/xml-to-php-array Version ^2.0
baraja-core/selectbox-tree Version ^2.1
spatie/array-to-xml Version ^3.0
nette/utils Version ^3.2
nette/http Version ^3.1
nette/di Version ^3.0
nette/caching Version ^3.1
nette/application Version ^3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package baraja-core/heureka-feed contains the following files

Loading the files please wait ...