ownerDocument; $domElement->appendChild($domOwner->createCDATASection($value)); } } public function addChildWithCData($name = '', $value = '') { $newChild = parent::addChild($name); if ($value) $this->addCDataToNode($newChild, $value); return $newChild; } public function addCData($value = '') { $this->addCDataToNode($this, $value); } } $iteration = filter_input(INPUT_GET, 'iteration', FILTER_VALIDATE_INT, ["options" => ["default" => 0, "min_range" => 0]]); $context = Context::getContext(); const ID_LANG = 1; // PL const LIMIT = 500; $start = $iteration * LIMIT; $file = 'google-ads-feed-' . $iteration . '.xml'; if (file_exists($file)) { unlink($file); } $products_partial = Product::getProducts(ID_LANG, $start, LIMIT, 'id_product', 'DESC', false, true, $context); $products = Product::getProductsProperties(ID_LANG, $products_partial); function cleanHtml($html) { $html = preg_replace('/]+>/i', '', $html); $html = strip_tags($html, '