This commit is contained in:
Jitendra Singh 2020-03-18 17:15:44 +05:30
parent bc39a19f49
commit 893564977f
3 changed files with 12 additions and 4 deletions

View File

@ -13,7 +13,6 @@ use Webkul\Admin\Mail\NewRefundNotification;
class Order
{
/**
* Send new order Mail to the customer and admin
*
@ -24,11 +23,13 @@ class Order
{
try {
$configKey = 'emails.general.notifications.emails.general.notifications.new-order';
if (core()->getConfigData($configKey)) {
Mail::queue(new NewOrderNotification($order));
}
$configKey = 'emails.general.notifications.emails.general.notifications.new-admin';
if (core()->getConfigData($configKey)) {
Mail::queue(new NewAdminNotification($order));
}
@ -51,6 +52,7 @@ class Order
}
$configKey = 'emails.general.notifications.emails.general.notifications.new-invoice';
if (core()->getConfigData($configKey)) {
Mail::queue(new NewInvoiceNotification($invoice));
}
@ -69,6 +71,7 @@ class Order
{
try {
$configKey = 'emails.general.notifications.emails.general.notifications.new-refund';
if (core()->getConfigData($configKey)) {
Mail::queue(new NewRefundNotification($refund));
}
@ -80,7 +83,7 @@ class Order
/**
* Send new shipment mail to the customer
*
* @param \Webkul\Sales\Contracts\Shipment $refund
* @param \Webkul\Sales\Contracts\Shipment $shipment
* @return void
*/
public function sendNewShipmentMail($shipment)
@ -91,11 +94,13 @@ class Order
}
$configKey = 'emails.general.notifications.emails.general.notifications.new-shipment';
if (core()->getConfigData($configKey)) {
Mail::queue(new NewShipmentNotification($shipment));
}
$configKey = 'emails.general.notifications.emails.general.notifications.new-inventory-source';
if (core()->getConfigData($configKey)) {
Mail::queue(new NewInventorySourceNotification($shipment));
}

View File

@ -14,15 +14,17 @@ class CurrencyTableSeeder extends Seeder
DB::table('currencies')->delete();
DB::table('currencies')->insert([
[
'id' => 1,
'code' => 'USD',
'name' => 'US Dollar',
'symbol' => '$',
], [
'id' => 2,
'code' => 'EUR',
'name' => 'Euro',
'symbol' => '€',
]
);
]);
}
}

View File

@ -14,6 +14,7 @@ class LocalesTableSeeder extends Seeder
DB::table('locales')->delete();
DB::table('locales')->insert([
[
'id' => 1,
'code' => 'en',
'name' => 'English',
@ -22,6 +23,6 @@ class LocalesTableSeeder extends Seeder
'code' => 'fr',
'name' => 'French',
]
);
]);
}
}