================================================================================ meBUY PRE-ORDER SYSTEM TUTORIAL ================================================================================ Pre-orders allow customers to reserve China-warehouse products before they arrive in Ghana. A logistics shipment is automatically created for each pre-order. ================================================================================ 1. FOR CUSTOMERS — PLACING A PRE-ORDER ================================================================================ 1.1 Finding Pre-Order Products ─────────────────────────────── • Browse the store for products • Look for the "China warehouse" badge on product pages • These products are shipped from China via our logistics network 1.2 Placing a Pre-Order ──────────────────────── • On a China-warehouse product page, click "Pre-Order from China" • Fill in the pre-order form: - Quantity — How many units you want - Shipping Mark — Your logistics identifier (MEB-XXXXX...) If you don't have one, the system will generate one for you • Submit the pre-order • You'll see a confirmation with your pre-order details 1.3 What Happens Next (Automatic) ────────────────────────────────── • A PreOrder record is created in the system • A Logistics Shipment is automatically created: - Tracking number is generated - Initial status: "Goods at China Warehouse" - Sender defaults to "China Vendor / China Warehouse" • The shipment enters the logistics pipeline • You can track it using the Tracking Number or Shipping Mark 1.4 Viewing Your Pre-Orders ───────────────────────────── • Login to your account • Navigate to: My Account → Pre-Orders • See all your pre-orders with status • Click any pre-order to view details 1.5 Cancelling a Pre-Order ──────────────────────────── • On the pre-order detail page, click "Cancel Pre-Order" • The pre-order status will be updated to "cancelled" • Note: Cancellation policies may apply ================================================================================ 2. FOR ADMINS — MANAGING PRE-ORDERS ================================================================================ 2.1 Viewing Pre-Orders ──────────────────────── • Pre-orders are visible in the Logistics > Shipments section • Filter by Source = "pre_order" to see pre-order shipments • Each shipment links back to the original pre-order 2.2 Pre-Order vs Regular Order ──────────────────────────────── Pre-Orders are for China warehouse products only. They create logistics shipments with source = "pre_order". Regular Orders with China items also create logistics shipments, but with source = "order". ================================================================================ 3. SYSTEM FLOW (Technical) ================================================================================ When a pre-order is placed: 1. PreOrderController@store validates: - Product exists and warehouse === 'china' - Customer is authenticated with role 'customer' 2. PreOrder record is created 3. PreOrderPlaced event is dispatched 4. CreateLogisticsShipmentForPreOrder listener runs: - Checks if pre-order warehouse === 'china' - Finds or creates a logistics Customer by shipping mark - Creates Shipment with: - tracking_number (generated) - shipping_mark (from pre-order) - source = 'pre_order' - sender: China Vendor / China Warehouse - receiver: customer's details - status_history: at_china_warehouse - items: from pre-order product - Links pre_order_id to the shipment 5. The shipment is now in the logistics pipeline 6. Admin updates status through the normal workflow ================================================================================ 4. DIFFERENCES: Pre-Order vs Checkout Order with China Items ================================================================================ Pre-Order: • Accessed via "Pre-Order from China" button on product page • Creates ONLY a logistics shipment (no marketplace order) • Source = "pre_order" • No payment collected at time of pre-order Checkout Order with China Items: • Accessed via normal cart → checkout flow • Creates a marketplace Order AND a logistics shipment • Source = "order" • Payment collected at checkout • Both Ghana and China items can be in the same cart