Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Replaced array_merge_recursive with array_replace_recursive to replace existing menu elements

givanz599981676400
diff --git a/admin/component/notifications.php b/admin/component/notifications.php
index e07962a..ce24a2e 100644
--- a/admin/component/notifications.php
+++ b/admin/component/notifications.php
@@ -56,7 +56,7 @@ class Notifications extends ComponentBase {
$this->count += $newOrders;
$this->menu['sales'] = [];
$this->menu['sales']['badge'] = $newOrders;
- $this->menu['sales']['badge-class'] = 'badge bg-primary-subtle text-body mx-2';
+ $this->menu['sales']['badge-class'] = 'badge bg-success-subtle text-body mx-2';
}
$url = ['module' => 'product/products'];
@@ -229,7 +229,7 @@ class Notifications extends ComponentBase {
$view = View::getInstance();
if (isset($view->menu) && $view->menu) {
- $view->menu = array_merge_recursive($view->menu, $results['menu']);
+ $view->menu = array_replace_recursive($view->menu, $results['menu']);
}
}
}