PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
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 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Services/TemplateService.php +11 -1 1.4.0 → 1.6.5 View file →
@@ -16,9 +16,19 @@
16 16 $viewData = Arr::wrap($viewData);
17 17 $viewData = array_merge($viewData, [
18 18 'default_banner_image' => $defaultBannerImage,
19 19 ]);
20 - App::make('view')->render('emails.' . $name, $viewData);
20 + // Core templates resolve against app/Views/emails. Add-ons register
21 + // their own notifications but keep the templates inside their own
22 + // plugin, where that prefix cannot reach — they match on the
23 + // template_path they registered and return a path View::make() can
24 + // resolve (an absolute file path is safest). Core paths are untouched.
25 + $viewPath = apply_filters('fluent_cart/email/template_view_path', 'emails.' . $name, [
26 + 'template_path' => $name,
27 + 'view_data' => $viewData,
28 + ]);
29 +
30 + App::make('view')->render($viewPath, $viewData);
21 31 return ob_get_clean();
22 32 }
23 33
24 34 public static function getInvoicePackingTemplateByPathName($name)