Add debugging to template path resolution
- Added debug logging to see what template path is being used - This will help identify if the path is correct or if files are missing - Should show exactly where the system is looking for template files
This commit is contained in:
parent
40fa2b2f73
commit
aa56cf4640
@ -229,18 +229,25 @@ class DeclarationTVA_PDF
|
|||||||
*/
|
*/
|
||||||
private function getTemplatePath()
|
private function getTemplatePath()
|
||||||
{
|
{
|
||||||
|
error_log("DeclarationTVA: Template path: " . $this->template_path);
|
||||||
|
|
||||||
// Check for custom template first
|
// Check for custom template first
|
||||||
$custom_template = $this->template_path . 'ca3_custom_template.pdf';
|
$custom_template = $this->template_path . 'ca3_custom_template.pdf';
|
||||||
|
error_log("DeclarationTVA: Looking for custom template: " . $custom_template);
|
||||||
if (file_exists($custom_template)) {
|
if (file_exists($custom_template)) {
|
||||||
|
error_log("DeclarationTVA: Custom template found");
|
||||||
return $custom_template;
|
return $custom_template;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fall back to default template
|
// Fall back to default template
|
||||||
$default_template = $this->template_path . 'ca3_official_template.pdf';
|
$default_template = $this->template_path . 'ca3_official_template.pdf';
|
||||||
|
error_log("DeclarationTVA: Looking for default template: " . $default_template);
|
||||||
if (file_exists($default_template)) {
|
if (file_exists($default_template)) {
|
||||||
|
error_log("DeclarationTVA: Default template found");
|
||||||
return $default_template;
|
return $default_template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_log("DeclarationTVA: No template found");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user