sendOrderDetailsToCustomer.blade.php 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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>Hello {{$customer->name}}!</h2>
  19. @php($country = \App\Shop\Countries\Country::find($address->country_id))
  20. <p>This order is for deliver to your: <strong>{{ ucfirst($address->alias) }} <br /></strong></p>
  21. <p>Address: {{$address->address_1}} {{$address->address_2}} {{$address->city}} {{$address->state_code}}, {{$country->name}}</p>
  22. <table class="table table-striped" width="100%" border="0" cellspacing="0" cellpadding="0">
  23. <thead>
  24. <tr>
  25. <th class="col-md-2">SKU</th>
  26. <th class="col-md-2">Name</th>
  27. <th class="col-md-3">Description</th>
  28. <th class="col-md-1">Quantity</th>
  29. <th class="col-md-4 text-right">Price</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. @foreach($products as $product)
  34. <tr>
  35. <td>{{$product->sku}}</td>
  36. <td>{{$product->name}}</td>
  37. <td>
  38. {{$product->description}}
  39. @php($pattr = \App\Shop\ProductAttributes\ProductAttribute::find($product->pivot->product_attribute_id))
  40. @if(!is_null($pattr))<br>
  41. @foreach($pattr->attributesValues as $it)
  42. <p class="label label-primary">{{ $it->attribute->name }} : {{ $it->value }}</p>
  43. @endforeach
  44. @endif
  45. </td>
  46. <td>{{$product->pivot->quantity}}</td>
  47. <td class="text-right">{{config('cart.currency')}} {{number_format($product->price * $product->pivot->quantity, 2)}}</td>
  48. </tr>
  49. @endforeach
  50. </tbody>
  51. <tfoot>
  52. <tr>
  53. <td></td>
  54. <td></td>
  55. <td></td>
  56. <td>Subtotal:</td>
  57. <td class="text-right">{{config('cart.currency')}} {{number_format($order->total_products, 2)}}</td>
  58. </tr>
  59. <tr>
  60. <td></td>
  61. <td></td>
  62. <td></td>
  63. <td>Shipping:</td>
  64. <td class="text-right">{{config('cart.currency')}} {{number_format($order->total_shipping, 2)}}</td>
  65. </tr>
  66. <tr>
  67. <td></td>
  68. <td></td>
  69. <td></td>
  70. <td>Discounts:</td>
  71. <td class="text-right">({{config('cart.currency')}} {{number_format($order->discounts, 2)}})</td>
  72. </tr>
  73. <tr>
  74. <td></td>
  75. <td></td>
  76. <td></td>
  77. <td>Tax:</td>
  78. <td class="text-right">{{config('cart.currency')}} {{number_format($order->tax, 2)}}</td>
  79. </tr>
  80. <tr class="bg-warning">
  81. <td></td>
  82. <td></td>
  83. <td></td>
  84. <td><strong>Total:</strong></td>
  85. <td class="text-right"><strong>{{config('cart.currency')}} {{number_format($order->total, 2)}}</strong></td>
  86. </tr>
  87. </tfoot>
  88. </table>
  89. </div>
  90. </section>
  91. </body>
  92. </html>