gtgt/sylius-foxpost-shipping

Sylius Foxpost shipping plugin.

Maintainers

Package info

github.com/gtgt/sylius-foxpost-shipping

Type:sylius-plugin

pkg:composer/gtgt/sylius-foxpost-shipping

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master / 1.0.x-dev 2026-08-05 16:49 UTC

This package is auto-updated.

Last update: 2026-08-05 16:52:40 UTC


README

Sylius 2.x shipping plugin for the Hungarian Foxpost parcel-locker and home-delivery service using the FoxWeb API.

Features

  • Custom Sylius shipping calculator (foxpost) with flat-rate pricing.
  • Supports both parcel-locker (APM) and home-delivery (HD) shipping methods.
  • Hourly-synced parcel-locker list from https://cdn.foxpost.hu/foxplus.json.
  • Checkout APM selector (search by city/name/ZIP).
  • Admin parcel creation, label download and tracking refresh.
  • Admin grid of all shipments using a Foxpost method.
  • COD is disabled in v1 (always sent as 0).

Requirements

  • PHP ^8.3
  • Sylius ^2.1
  • Symfony HTTP Client ^6.4 || ^7.2

Installation

composer require gtgt/sylius-foxpost-shipping

Enable the bundle

// config/bundles.php
SyliusFoxpostShippingPlugin\SyliusFoxpostShippingPlugin::class => ['all' => true],

Add routes

# config/routes/sylius_foxpost.yaml
sylius_foxpost:
    resource: '@SyliusFoxpostShippingPlugin/config/routes.yaml'

Extend the Shipment entity

The plugin stores Foxpost-specific data on the Sylius Shipment entity. Make your application Shipment entity extend the plugin's mapped superclass:

// src/Entity/Shipping/Shipment.php
namespace App\Entity\Shipping;

use Doctrine\ORM\Mapping as ORM;
use SyliusFoxpostShippingPlugin\Entity\Shipment as BaseShipment;

#[ORM\Entity]
#[ORM\Table(name: 'sylius_shipment')]
class Shipment extends BaseShipment
{
}

Then generate and run a migration:

bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate

Configuration

Create one or two Sylius shipping methods using the Foxpost calculator:

  • one with Send type = APM for parcel-locker delivery
  • one with Send type = HD for home delivery

Each shipping method requires:

  • Environment (test / prod)
  • Basic auth username
  • Basic auth password
  • API key
  • Default parcel size (XS / S / M / L / XL)
  • Flat rate amount

Sender details are resolved from the channel (contactEmail, contactPhoneNumber and shopBillingData).

Usage

Sync parcel lockers

bin/console foxpost:apm:sync

The list is cached for one hour and refreshed automatically on checkout usage.

Admin actions

Open a shipment that uses a Foxpost shipping method. The Foxpost card lets you:

  • Create the parcel in Foxpost.
  • Download the PDF label.
  • Refresh the tracking status.

Creating a parcel automatically generates and stores the label timestamp.

Development

Run tests:

vendor/bin/phpunit

License

LGPL-3