Search by

silvershop-suite / shipping-labels

RVXD

Carrier-connected shipping label generation for SilverShop: a pluggable provider layer (Manual, MyParcel, …) with single-label creation and printing from the CMS.

Package info

github.com/silvershop-suite/silvershop-shipping-labels

Type:silverstripe-vendormodule

pkg:composer/silvershop-suite/shipping-labels

Statistics

Installs: 0

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.1 2026-10-19 18:06 UTC

This package is auto-updated.

Last update: 2026-10-19 19:54:57 UTC


README

Carrier-connected shipping label generation for SilverShop, with a pluggable provider layer so multiple shipping services can be connected.

SilverShop can calculate shipping cost (silvershop/shipping) but has no way to create the label you stick on the parcel. This module adds that: a ShippingLabel record per order (carrier, tracking, status, and the label PDF), a provider interface that carriers/aggregators implement, and CMS actions to create and print labels.

What it adds

  • A ShippingLabelProvider interface + a config-driven ProviderRegistry, so providers plug in without code changes and are selectable per order.
  • A Manual provider (built in): record a tracking number / upload a label PDF for a shipment created out-of-band.
  • A ShippingLabel model (immutable; stores the PDF as a File) — Order has_many ShippingLabels.
  • Settings → Shop → Shipping labels: the default provider + the shop's sender / return address.
  • CMS actions to create and print a label (single label per order; bulk/batch printing is planned).

Carrier adapters ship as separate packages, e.g. silvershop-suite/shipping-myparcel (MyParcel → PostNL/DHL). Add more by implementing ShippingLabelProvider and registering it:

SilverShop\ShippingLabels\Provider\ProviderRegistry:
  providers:
    myparcel: 'SilverShop\ShippingMyParcel\MyParcelProvider'

Installation

composer require silvershop-suite/shipping-labels

Then run dev/build?flush=all. Provider API keys come from the environment (.env), never from config/SiteConfig.

Usage

// Create a label for an order with the default provider (or pass a provider name).
$label = $order->createShippingLabel();                     // default provider
$label = $order->createShippingLabel('manual', ['TrackingNumber' => '3STBJG...']);

$order->getTrackingNumber();      // '' or the primary label's tracking number
$order->ShippingLabels();         // all labels for the order

Licence

BSD-3-Clause.

Credits

Built and maintained by Remy Vaartjes (remy@xd.nl) — part of the SilverShop-Suite.