| @@ -40,9 +40,16 @@ | ||
| 40 | 40 | <?php |
| 41 | 41 | // Dynamically load the selected template from quote templates directory |
| 42 | 42 | // Dynamically load the selected template |
| 43 | 43 | $template_file = easy_invoice_design_template( 'quote', (string) $current_template ); |
| 44 | - if (file_exists($template_file)) { | |
| 44 | + if ( ! $quote instanceof \EasyInvoice\Models\Quote ) { | |
| 45 | + // Nothing to render yet; the designs read the model directly. | |
| 46 | + ?> | |
| 47 | + <div class="ei-preview-empty" style="text-align:center;padding:48px 24px;color:#64748b;"> | |
| 48 | + <p style="margin:0;font-size:14px;"><?php esc_html_e( 'Your quote will appear here as you fill in the form.', 'easy-invoice' ); ?></p> | |
| 49 | + </div> | |
| 50 | + <?php | |
| 51 | + } elseif (file_exists($template_file)) { | |
| 45 | 52 | include_once $template_file; |
| 46 | 53 | } else { |
| 47 | 54 | // Show template not found message |
| 48 | 55 | ?> |