From c713be53c1fab65fe1fb5560b557381d5e0bcee2 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Fri, 16 May 2025 15:17:59 +0200 Subject: [PATCH] Implement code changes to enhance functionality and improve performance --- drmaterac.pl/xml-convert.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drmaterac.pl/xml-convert.php b/drmaterac.pl/xml-convert.php index 1302f59..530671f 100644 --- a/drmaterac.pl/xml-convert.php +++ b/drmaterac.pl/xml-convert.php @@ -12,7 +12,11 @@ foreach ( $products as $product ) $images = $xpath->query('Linki_do_zdjec/Link_do_zdjecia', $product); // Pobieramy wartość elementu - $price = $xpath->evaluate('number(Cena_detaliczna_brutto)', $product); + $price = ceil($xpath->evaluate('number(Cena_detaliczna_brutto)', $product)); + $priceNodeList = $xpath->query('Cena_detaliczna_brutto', $product); + if ($priceNodeList->length > 0) { + $priceNodeList->item(0)->nodeValue = $price; + } // Jeśli nie ma żadnego elementu , usuwamy element