Feat: Adding OrderReferenceDisplay Service that trims down order leading 0s
This commit is contained in:
@@ -7,6 +7,7 @@ use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\Facades\Notification as NotificationFacade;
|
||||
use Modules\Core\Notification\BaseNotification;
|
||||
use Modules\Core\Order\Events\OrderStatusUpdated;
|
||||
use Modules\Core\Order\Support\OrderReferenceDisplay;
|
||||
|
||||
class OrderStatusUpdatedNotification extends BaseNotification
|
||||
{
|
||||
@@ -52,10 +53,12 @@ class OrderStatusUpdatedNotification extends BaseNotification
|
||||
{
|
||||
$order = $this->event->order;
|
||||
|
||||
$reference = OrderReferenceDisplay::resolve($order);
|
||||
|
||||
return (new MailMessage)
|
||||
->subject(__('Your order :reference has been updated', ['reference' => $order->reference]))
|
||||
->subject(__('Your order :reference has been updated', ['reference' => $reference]))
|
||||
->view('core::order.notifications.status-updated', [
|
||||
'reference' => $order->reference,
|
||||
'reference' => $reference,
|
||||
'statusLabel' => config("lunar.orders.statuses.{$order->status}.label", $order->status),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user