Hello @thomasanderson_
You can use the custom script to export the product data like this
https://magento.stackexchange.com/questions/30812/magento-product-feed-extension
Or you can use third-party extension to export the product feed.
https://marketplace.magento.com/xtento-16512.html
https://www.xtento.com/magento-extensions/magento-product-feed-export-module.html
Hello @thomasanderson_
Please refer to the following code to export products in XML with specific attributes and filters:
<?php
require 'app/Mage.php';
Mage::app();
$storename = 'default';
$file = "products-top10.xml";
if (file_exists($file)) {
unlink($file);
}
try {
$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->setPageSize(200)
->setCurPage(1)
->setOrder('id', 'ASC')
->addAttributeToFilter('status', array('eq' => '1'));
$doc = new DOMDocument();
$doc->encoding = 'utf-8';
$doc->formatOutput = true;
$root = $doc->createElement("root");
$doc->appendChild($root);
$productsX = $doc->createElement("catalog");
$root->appendChild($productsX);
foreach ($products as $_product) {
$product = $doc->createElement("product");
$id = $doc->createElement("id");
$id->appendChild(
$doc->createTextNode($_product->getId())
);
$product->appendChild($id);
$url = $doc->createElement("url");
$url->appendChild(
$doc->createTextNode(trim($_product->getData('url_key')))
);
$product->appendChild($url);
$urlPath = $doc->createElement("url_path");
$urlPath->appendChild(
$doc->createTextNode(trim($_product->getProductUrl()))
);
$product->appendChild($urlPath);
$title = $doc->createElement("title");
$title->appendChild(
$doc->createTextNode(trim($_product->getName()))
);
$product->appendChild($title);
$sku = $doc->createElement("sku");
$sku->appendChild(
$doc->createTextNode($_product->getSku())
);
$product->appendChild($sku);
$price = $doc->createElement("price");
$price->appendChild(
$doc->createTextNode(trim((int)$_product->getPrice()))
);
$product->appendChild($price);
$formatedprice = $doc->createElement("formated_price");
$formattedPrice = Mage::helper('core')->currency($_product->getPrice(), true, false);
$formatedprice->appendChild(
$doc->createTextNode(trim($formattedPrice))
);
$product->appendChild($formatedprice);
$productsX->appendChild($product);
}
file_put_contents($file, $doc->saveXML(), FILE_APPEND);
} catch (Exception $e) {
echo 'Eroror : - ';
echo $e->getMessage();
}Hope it helps.