OrderNotificationEmail.blade.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5. <meta charset="UTF-8">
  6. <meta name="viewport"
  7. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  8. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  9. <title>Order Invoice</title>
  10. <link rel="stylesheet" href="{{asset('https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css')}}">
  11. <style type="text/css">
  12. table { border-collapse: collapse;}
  13. </style>
  14. </head>
  15. <body>
  16. <section class="container">
  17. <div class="col-md-12">
  18. <h2>Hi {{config('app.name')}}! <br />An order has been created! </h2>
  19. <p>Here are the details of the order below: </p>
  20. <table class="table table-striped" width="100%" border="0" cellspacing="0" cellpadding="0">
  21. <thead>
  22. <tr>
  23. <th class="col-md-2">SKU</th>
  24. <th class="col-md-2">Name</th>
  25. <th class="col-md-3">Description</th>
  26. <th class="col-md-1">Quantity</th>
  27. <th class="col-md-4 text-right">Price</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. @foreach($products as $product)
  32. <tr>
  33. <td>{{$product->sku}}</td>
  34. <td>{{$product->name}}</td>
  35. <td>
  36. {{$product->description}}
  37. @php($pattr = \App\Shop\ProductAttributes\ProductAttribute::find($product->pivot->product_attribute_id))
  38. @if(!is_null($pattr))<br>
  39. @foreach($pattr->attributesValues as $it)
  40. <p class="label label-primary">{{ $it->attribute->name }} : {{ $it->value }}</p>
  41. @endforeach
  42. @endif
  43. </td>
  44. <td>{{$product->pivot->quantity}}</td>
  45. <td class="text-right">{{config('cart.currency')}} {{number_format($product->price * $product->pivot->quantity, 2)}}</td>
  46. </tr>
  47. @endforeach
  48. </tbody>
  49. <tfoot>
  50. <tr>
  51. <td></td>
  52. <td></td>
  53. <td></td>
  54. <td>Subtotal:</td>
  55. <td class="text-right">{{config('cart.currency')}} {{number_format($order->total_products, 2)}}</td>
  56. </tr>
  57. <tr>
  58. <td></td>
  59. <td></td>
  60. <td></td>
  61. <td>Shipping:</td>
  62. <td class="text-right">{{config('cart.currency')}} {{number_format($order->total_shipping, 2)}}</td>
  63. </tr>
  64. <tr>
  65. <td></td>
  66. <td></td>
  67. <td></td>
  68. <td>Discounts:</td>
  69. <td class="text-right">({{config('cart.currency')}} {{number_format($order->discounts, 2)}})</td>
  70. </tr>
  71. <tr>
  72. <td></td>
  73. <td></td>
  74. <td></td>
  75. <td>Tax:</td>
  76. <td class="text-right">{{config('cart.currency')}} {{number_format($order->tax, 2)}}</td>
  77. </tr>
  78. <tr class="bg-warning">
  79. <td></td>
  80. <td></td>
  81. <td></td>
  82. <td><strong>Total:</strong></td>
  83. <td class="text-right"><strong>{{config('cart.currency')}} {{number_format($order->total, 2)}}</strong></td>
  84. </tr>
  85. </tfoot>
  86. </table>
  87. </div>
  88. </section>
  89. </body>
  90. </html>