$upc->appendChild($dom->createTextNode(str_pad($row['p_model'], 12, '0', STR_PAD_LEFT))); # same as model number, left padded with 0. Replace with UPC if your products have them (unfortunately mine don't).
$qty->appendChild($dom->createTextNode($row['p_qty'])); # same as model number, left padded with 0. Replace with UPC if your products have them (unfortunately mine don't).
$payment_notes->appendChild($dom->createTextNode('Google Checkout accepted and preferable! Wire-transfers accepted for overseas orders. Checks accepted for orders above $350 and goods shipped after clearing. Cash accepted for local pickup. Thank you for shopping at confero24.com'));
# change this payment_note as per your requirement
$item_count++;
}
$dom->formatOutput = true; # some formatting of XML output
// $rss_feed_string = $dom->saveXML(); # store string in variable. Included for demo purposes. Comment if you don't need it.
$bytes_written = $dom->save($output_file) || die; # save as file
print "Google Base XML Feed for " . STORE_NAME . "<p>";
print "Output written to: " . $output_file . " (" . $bytes_written . " bytes written) <br>";
print $item_count . " items included in feed at " . date('Y-m-d G:i:s');