PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.8.0
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.8.0
1.8.0 1.7.1 1.7.0 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 All 52 releases
← All changes | app/Helpers/AdminHelper.php +29 -1 1.5.5 → 1.8.0 View file →
@@ -76,13 +76,25 @@
76 76 {
77 77 $menu = [
78 78 'label' => __('Products', 'fluent-cart'),
79 79 'link' => $baseUrl . 'products',
80 - 'permission' => ['products/view']
80 + // Any-of: a reviews-only role (reviews/manage without
81 + // products/view) must still see the parent, or its authorized
82 + // Reviews child could never render. Children gate individually —
83 + // including on the reviews module being switched on at all.
84 + 'permission' => ['products/view', 'reviews/manage']
81 85 ];
82 86
83 87 $children = [];
84 88
89 + // The parent link is not reachable on touch (the tap opens the dropdown),
90 + // and the off-canvas menu renders children only — so list it as a child too.
91 + $children['all_products'] = [
92 + 'label' => __('All Products', 'fluent-cart'),
93 + 'link' => $baseUrl . 'products',
94 + 'permission' => ['products/view']
95 + ];
96 +
85 97 // Attributes power the advanced-variations feature.
86 98 $children['product_attributes'] = [
87 99 'label' => __('Attributes', 'fluent-cart'),
88 100 'link' => $baseUrl . 'products/attributes',
@@ -98,8 +110,19 @@
98 110 'permission' => ['products/view']
99 111 ];
100 112 }
101 113
114 + // Only while the store has reviews switched on. The screen behind it
115 + // already redirects to the dashboard when the module is off, so an
116 + // entry here would be a menu item that bounces whoever clicks it.
117 + if (ModuleSettings::isActive('reviews')) {
118 + $children['reviews'] = [
119 + 'label' => __('Reviews', 'fluent-cart'),
120 + 'link' => $baseUrl . 'reviews',
121 + 'permission' => ['reviews/manage']
122 + ];
123 + }
124 +
102 125 $menu['children'] = $children;
103 126
104 127 return $menu;
105 128 }
@@ -160,8 +183,13 @@
160 183 ],
161 184 'order_bump' => App::isProActive() && ModuleSettings::isActive('order_bump') ? [
162 185 'label' => __('Order Bump', 'fluent-cart'),
163 186 'link' => $baseUrl . 'order_bump',
187 + ] : false,
188 + 'dynamic_pricing' => App::isProActive() && ModuleSettings::isActive('dynamic_pricing') ? [
189 + 'label' => __('Dynamic Pricing', 'fluent-cart'),
190 + 'link' => $baseUrl . 'dynamic_pricing',
191 + 'permission' => ['dynamic_pricing/view'],
164 192 ] : false,
165 193 'coupons' => [
166 194 'label' => __('Coupons', 'fluent-cart'),
167 195 'link' => $baseUrl . 'coupons',