Skip to main content
Version: 2.0.0

Examples

These examples are based on DPD plugin release v0.6.0. They describe the workflows the plugin supports in a live yStore project: making DPD available at checkout, letting customers choose a ParcelShop, and creating labels from the Craft control panel. See Settings for the full field reference and Use Cases for a workflow-by-workflow summary.

Example: Flat-rate DPD home delivery

Use this setup when DPD should appear as a standard delivery method and every eligible order uses the same shipping price.

  1. Open Settings -> Plugins -> DPD (or DPD -> Settings in the plugin's own CP section).
  2. On the General tab, enable the shipping method and set Display Name to the customer-facing name, for example DPD courier.
  3. On the Pricing tab, set Shipping Fee to the delivery fee.
  4. Leave the Table Rates tab empty if the flat price should always apply.
  5. On the Restrictions tab, select the countries and payment methods where DPD is available.
  6. On the API & Credentials tab, enter the DPD API URL, username, and password (and the sandbox equivalents if you are testing), then click Test Credentials.
  7. On the Shipping tab, fill in the sender/pickup address DPD needs on every shipment.

After saving, place a test order with an allowed country and payment method. DPD should appear in checkout with the configured price. If it does not appear, check that the method is enabled and that the order is inside the configured date, weight, country, and payment restrictions.

Example: Free shipping over an order value

Use Free Shipping Threshold (Pricing tab) when DPD should become free above a specific cart total.

For example, with a Shipping Fee of 4.90 and a free shipping threshold of 80, checkout shows the paid DPD price below 80 and a free DPD option at or above 80. Set the threshold to 0 when no free-shipping rule is needed.

Table rates still take priority over the flat fee. If table rates are assigned to the method, verify the final checkout price with at least one lightweight and one heavier test order.

Example: ParcelShop pickup

Use this setup when customers should pick a DPD ParcelShop instead of relying only on a delivery address.

  1. Configure the normal DPD shipping method and API credentials first.
  2. On the Shipping tab, turn on Enable pickup points.
  3. Save the settings.
  4. In checkout, choose the DPD method and search with a ZIP code.

The checkout widget calls the public pickup-points endpoint and stores the selected point as shipping option data on the order. Staff should verify the selected ParcelShop before creating the shipment, especially on the first project setup.

The Default country for pickup points setting currently has no effect on the storefront: the checkout widget always requests points for the plugin handle (dpd) rather than this setting's value. Results only narrow down once the customer enters a ZIP code, so test the exact pickup-point flow used by the storefront theme before launch — see Developer / API for the underlying request.

Example: Manual shipment creation

Use manual creation when staff review orders before registering parcels with DPD.

  1. Open the order in the Craft control panel.
  2. Confirm the order used the DPD shipping method.
  3. Confirm the order has shipping weight, or configure Default parcel weight (Shipping tab) so the plugin can build a parcel payload.
  4. Open the DPD menu on the order edit page and choose Create DPD shipment.
  5. Open the created shipment and download or preview the PDF label.

The plugin stores the DPD parcel number, API request/response data, current status, and cached label reference. Labels are limited by Max labels per order (Shipping tab). If the limit is reached, new create/resync actions are blocked instead of silently creating extra parcels.

Example: Automatic shipment creation by order status

Use automatic creation only after manual testing succeeds.

  1. Create a dedicated fulfilment status, for example Ready for DPD.
  2. On the Shipping tab, choose that status under Auto-create shipment on status.
  3. Move one test order with DPD shipping into that status.
  4. Check DPD -> Shipments and the Craft logs.

The plugin listens for yStore order status changes. When the target status UID matches the configured setting, it runs the same shipment sync used by the manual order action. If the order was paid, the shipment payload does not include a cash-on-delivery amount. If the order is unpaid, the plugin sends the order grand total as the COD amount.

Example: Shipment review and reconciliation

Use DPD -> Shipments as the control-panel view for operational checks.

The list can be filtered by status or searched by parcel number, parcel ID, or status. Export the current list to CSV when the warehouse or finance team needs to compare yStore shipment data with DPD back-office data.

On an individual shipment page, use Refresh to pull the latest tracking status. Use Resync only when a new DPD shipment should be created for the same order, such as after a cancelled or returned parcel. Resync still respects the configured per-order label limit.