From b2e06ff10179452bb24ebcf06e8bfb49e8de2ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Tue, 30 Dec 2025 20:36:51 +0300 Subject: [PATCH] Enhance Address Tag Processing in HTML Template Import: Updated the ImportHtmlTemplates command to replace address tags with a placeholder for contact address. This change improves the template processing by ensuring that address content is cleared and replaced dynamically, enhancing the overall integrity of imported templates. --- app/Console/Commands/ImportHtmlTemplates.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/Console/Commands/ImportHtmlTemplates.php b/app/Console/Commands/ImportHtmlTemplates.php index d64058d..e9f0154 100644 --- a/app/Console/Commands/ImportHtmlTemplates.php +++ b/app/Console/Commands/ImportHtmlTemplates.php @@ -223,6 +223,18 @@ class ImportHtmlTemplates extends Command } // B. Genel İşlemler + + // 0. Address tag'larını setting.contact_address ile değiştir + $addresses = $xpath->query('.//address', $node); + foreach ($addresses as $address) { + // Address içeriğini temizle ve placeholder koy + while ($address->firstChild) { + $address->removeChild($address->firstChild); + } + $textNode = $node->ownerDocument->createTextNode('{setting.contact_address}'); + $address->appendChild($textNode); + } + // 1. Resimler $images = $xpath->query('.//img', $node); foreach ($images as $img) {