Offer 4x6 label downloads alongside A4
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 1m48s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Hickmeister
2026-10-11 20:39:34 +01:00
co-authored by Claude Sonnet 5.5
parent 51c6748894
commit dff81caaea
4 changed files with 22 additions and 5 deletions
+3 -2
View File
@@ -227,11 +227,12 @@ class ShippingController extends Controller
$order = collect($orders)->first(fn ($order) => (string) ($order['OrderLineId'] ?? '') === $orderLineId);
$hash = $order ? $parcel2Go->labelHash($order) : null;
abort_unless($hash, 404);
$pdf = $parcel2Go->labelPdf($orderLineId, $hash);
$size = $request->query('size') === '4x6' ? '4x6' : 'a4';
$pdf = $parcel2Go->labelPdf($orderLineId, $hash, $size === '4x6' ? 'Label4x6' : 'A4');
return response($pdf, 200, [
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="parcel2go-'.$orderLineId.'.pdf"',
'Content-Disposition' => 'attachment; filename="parcel2go-'.$orderLineId.'-'.$size.'.pdf"',
'Cache-Control' => 'private, no-store',
]);
}