| @@ -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) |
| @@ -73,8 +83,9 @@ | ||
| 73 | 83 | 'registration_page_id' => 'registration', |
| 74 | 84 | 'login_page_id' => 'login', |
| 75 | 85 | 'cart_page_id' => 'cart', |
| 76 | 86 | 'receipt_page_id' => 'receipt', |
| 87 | + 'order_review_page_id' => 'order_review', | |
| 77 | 88 | 'shop_page_id' => 'shop', |
| 78 | 89 | 'customer_profile_page_id' => 'customer_dashboard', |
| 79 | 90 | ]; |
| 80 | 91 | |