From 01640d0bf8b9cb569c3a7cc393d833c6bf73016c Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Thu, 23 May 2024 13:44:05 +0100 Subject: [PATCH] Add extension code to composer extra Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- composer.json | 1 + src/Models/Stock.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2ee00df..d5f3a58 100644 --- a/composer.json +++ b/composer.json @@ -41,6 +41,7 @@ }, "extra": { "tastyigniter-extension": { + "code": "igniter.cart", "name": "Cart", "icon": { "class": "fa fa-shopping-cart", diff --git a/src/Models/Stock.php b/src/Models/Stock.php index 98683c9..0dbf327 100644 --- a/src/Models/Stock.php +++ b/src/Models/Stock.php @@ -100,7 +100,7 @@ public function updateStock(int $quantity, $state = null, array $options = []) $this->saveQuietly(); if ($this->hasLowStock() && $this->shouldAlertOnLowStock($state)) { - $this->mailSend('igniter.admin::_mail.low_stock_alert', 'location'); + $this->mailSend('igniter.cart::mail.low_stock_alert', 'location'); // Prevent duplicate low stock alerts $this->updateQuietly(['low_stock_alert_sent' => true]);