Merge branch 'master' of https://github.com/bagisto/bagisto into development
This commit is contained in:
commit
2a859b7e23
|
|
@ -9,7 +9,7 @@ return [
|
|||
|
|
||||
| Debugbar is enabled by default, when debug is set to true in app.php.
|
||||
| You can override the value by setting enable to true or false instead of null.
|
||||
|
|
||||
|
|
||||
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
||||
|
|
||||
*/
|
||||
|
|
@ -79,7 +79,7 @@ return [
|
|||
|
|
||||
*/
|
||||
'error_handler' => false,
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Clockwork integration
|
||||
|
|
@ -198,4 +198,4 @@ return [
|
|||
| To override default domain, specify it as a non-empty value.
|
||||
*/
|
||||
'route_domain' => null,
|
||||
];
|
||||
];
|
||||
|
|
@ -109,4 +109,4 @@ return [
|
|||
*/
|
||||
'pdf' => Excel::DOMPDF,
|
||||
],
|
||||
];
|
||||
];
|
||||
|
|
@ -15,4 +15,4 @@ return [
|
|||
|
||||
'dont_alias' => [],
|
||||
|
||||
];
|
||||
];
|
||||
|
|
@ -31,15 +31,15 @@ return [
|
|||
|
||||
/*
|
||||
* Which headers to use to detect proxy related data (For, Host, Proto, Port)
|
||||
*
|
||||
*
|
||||
* Options include:
|
||||
*
|
||||
*
|
||||
* - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust)
|
||||
* - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
|
||||
*
|
||||
*
|
||||
* @link https://symfony.com/doc/current/deployment/proxies.html
|
||||
*/
|
||||
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
|
||||
|
||||
|
||||
];
|
||||
|
||||
];
|
||||
|
|
@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Mail;
|
|||
use Webkul\Admin\Mail\NewOrderNotification;
|
||||
use Webkul\Admin\Mail\NewInvoiceNotification;
|
||||
use Webkul\Admin\Mail\NewShipmentNotification;
|
||||
use Webkul\Admin\Mail\NewInventorySourceNotification;
|
||||
|
||||
/**
|
||||
* Order event handler
|
||||
|
|
@ -18,7 +19,7 @@ class Order {
|
|||
/**
|
||||
* @param mixed $order
|
||||
*
|
||||
* Send new order confirmation mail to the customer
|
||||
* Send new shipment mail to the customer and inventory source
|
||||
*/
|
||||
public function sendNewOrderMail($order)
|
||||
{
|
||||
|
|
@ -52,6 +53,8 @@ class Order {
|
|||
{
|
||||
try {
|
||||
Mail::send(new NewShipmentNotification($shipment));
|
||||
|
||||
Mail::send(new NewInventorySourceNotification($shipment));
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
/**
|
||||
* New InventorySource Notification Mail class
|
||||
*
|
||||
* @author Jitendra Singh <jitendra@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class NewInventorySourceNotification extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* The shipment instance.
|
||||
*
|
||||
* @var Shipment
|
||||
*/
|
||||
public $shipment;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param mixed $shipment
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($shipment)
|
||||
{
|
||||
$this->shipment = $shipment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{ $order = $this->shipment->order;
|
||||
$inventory = $this->shipment->inventory_source;
|
||||
|
||||
return $this->to($inventory->contact_email, $inventory->name)
|
||||
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->id]))
|
||||
->view('shop::emails.sales.new-inventorysource-shipment');
|
||||
}
|
||||
}
|
||||
|
|
@ -461,8 +461,8 @@ return [
|
|||
'shipping-address' => 'Shipping Address',
|
||||
'billing-address' => 'Billing Address',
|
||||
'contact' => 'Contact',
|
||||
'shipping' => 'Shipping',
|
||||
'payment' => 'Payment',
|
||||
'shipping' => 'Shipping Method',
|
||||
'payment' => 'Payment Method',
|
||||
'price' => 'Price',
|
||||
'quantity' => 'Quantity',
|
||||
'subtotal' => 'Subtotal',
|
||||
|
|
@ -479,11 +479,14 @@ return [
|
|||
'summary' => 'Summary of Invoice',
|
||||
],
|
||||
'shipment' => [
|
||||
'heading' => 'Your Shipment #:shipment_id for Order #:order_id',
|
||||
'heading' => 'Shipment #:shipment_id has been generated for Order #:order_id',
|
||||
'inventory-heading' => 'New Shipment #:shipment_id had been generated for Order #:order_id',
|
||||
'subject' => 'Shipment for your order #:order_id',
|
||||
'inventory-subject' => 'New Shipment had been generated for Order #:order_id',
|
||||
'summary' => 'Summary of Shipment',
|
||||
'carrier' => 'Carrier',
|
||||
'tracking-number' => 'Tracking Number'
|
||||
'tracking-number' => 'Tracking Number',
|
||||
'greeting' => 'An Order :order_id has been placed on :created_at',
|
||||
],
|
||||
'forget-password' => [
|
||||
'dear' => 'Dear :name',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,153 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<img src="{{ bagisto_asset('images/logo.svg') }}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php $order = $shipment->order; ?>
|
||||
<?php $inventory = $shipment->inventory_source; ?>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.shipment.inventory-heading', ['order_id' => $order->id, 'shipment_id' => $shipment->id]) }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.dear', ['customer_name' => $inventory->name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.shipment.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}, {{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
<div style="font-weight: bold;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-weight: bold;">{{ __('shop::app.mail.shipment.carrier') }} : </span>{{ $shipment->carrier_title }}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-weight: bold;">{{ __('shop::app.mail.shipment.tracking-number') }} : </span>{{ $shipment->track_number }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}, {{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($shipment->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">{{ $item->name }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
{{ $html }}
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div> --}}
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
{!! __('shop::app.mail.order.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
{{ $item->qty_ordered }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
|
|
@ -164,10 +164,10 @@
|
|||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
{!! __('shop::app.mail.order.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -51,10 +51,10 @@
|
|||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
|
|
@ -93,10 +93,10 @@
|
|||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
|
|
@ -106,46 +106,48 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($shipment->items as $item)
|
||||
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px;margin-bottom: 10px">
|
||||
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
||||
{{ $item->name }}
|
||||
</p>
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<label style="font-size: 16px;color: #5E5E5E;">
|
||||
{{ __('shop::app.mail.order.price') }}
|
||||
</label>
|
||||
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
<tbody>
|
||||
@foreach ($shipment->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">{{ $item->name }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty }}</td>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<label style="font-size: 16px;color: #5E5E5E;">
|
||||
{{ __('shop::app.mail.order.quantity') }}
|
||||
</label>
|
||||
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||
{{ $item->qty }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
{{ $html }}
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
{{ $html }}
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue