To view order status for guest customers I used Order GUID. Please see instructions below:
NopCommerce V3.7
Source Code required
1: Nop.Web\Models\OrderDetailsModel.cs
Create new property in class OrderDetailsModel
public Guid OrderGuid { get; set; }
2: Nop.Web\Models\CustomerOrderListModel.cs
Create new property in class OrderDetailsModel
public Guid OrderGuid { get; set; }
3: Nop.Web\Controllers\OrderController.cs
3A: Insert this at line 143
OrderGuid = order.OrderGuid
3B: Modify ActionResult Details, around line 612
public ActionResult Details(int orderId, Guid? orderGuid)
{
var order = _orderService.GetOrderById(orderId);
if (order == null || order.Deleted || orderGuid != order.OrderGuid )
return new HttpUnauthorizedResult();
var model = PrepareOrderDetailsModel(order);
return View(model);
}
4: Nop.Web\Views\Order\CustomerOrders.cshtml
Modify the button to include OrderGuid
onclick="window.open('@Url.RouteUrl("OrderDetails", new { orderId = order.Id, orderGuid = order.OrderGuid })')"
Finally, you will have to edit order confirmation email template so that when guest customers receive their email it will have the link with the OrderGuid. I have not done this yet but you will have to create OrderGuid token in Nop.Services\Messages and go from there.