fix(invoice): detect pickup via DeliveryMethodType and show 'Abholort: <location>' meta row

- Use Order.fulfillmentOrders.deliveryMethod.methodType === 'PICK_UP' as the
  primary signal (Shopify Local Pickup app exposes this reliably; the
  shippingLine title is just the location name with no 'pickup' keyword).
  Keep the legacy shippingLine string heuristic as a fallback for custom
  shipping rates merchants name 'Abholung'/'Pickup'.
- Surface assignedLocation.name as pickupLocationName on the view model.
- Replace the 'Versandart: <location name>' row with 'Abholort: <location>'
  (DE) / 'Pick-up location: <location>' (EN); falls back to plain
  'Abholung'/'Pick-up' when the location name is unavailable.
This commit is contained in:
Gerhard Scheikl
2026-05-15 14:46:55 +02:00
parent 415a9dd462
commit d742e75419
7 changed files with 124 additions and 26 deletions
+5
View File
@@ -65,6 +65,9 @@ export interface InvoiceStrings {
shippingItemPrefix: string;
discountCodeLabel: string;
pickupLabel: string;
/** Used as the meta-row label when the order is a local pickup. The row
* value is then the pickup location name (e.g. "Lager Graz"). */
pickupLocationLabel: string;
}
/** Status displayed for the order's payment, derived from Shopify's
@@ -167,6 +170,7 @@ const de: InvoiceStrings = {
shippingItemPrefix: "Versand",
discountCodeLabel: "Rabattcode",
pickupLabel: "Abholung",
pickupLocationLabel: "Abholort",
};
const en: InvoiceStrings = {
@@ -236,6 +240,7 @@ const en: InvoiceStrings = {
shippingItemPrefix: "Shipping",
discountCodeLabel: "Discount code",
pickupLabel: "Pick-up",
pickupLocationLabel: "Pick-up location",
};
// Locale → invoice language. We only render in German (`de`) when the