Added: - Weight field (weightGrams) to Product model for storing item weights - Shipping fields to Order model (shippingCost, shippingCountry, shippingService) - Royal Mail shipping service (royalmail-shipping.ts) with: * Domestic and international postage calculations * Integration ready for Royal Mail API (currently uses estimated rates) * Support for multiple shipping services * Clear international delivery time warnings - Shipping quotes API endpoint (/api/checkout/shipping-quotes) - Checkout integration to calculate and include shipping cost Weight is stored in grams, displayed to users in kilograms. Shipping cost is calculated based on total cart weight and destination country.
6 lines
219 B
SQL
6 lines
219 B
SQL
-- AlterTable
|
|
ALTER TABLE "Order" ADD COLUMN "shippingCost" INTEGER NOT NULL DEFAULT 0,
|
|
ADD COLUMN "shippingCountry" TEXT,
|
|
ADD COLUMN "shippingService" TEXT,
|
|
ALTER COLUMN "carrier" SET DEFAULT 'Royal Mail';
|