Hi againg,
firts Enzo look if the option "Enable Advanced XML Sanitization" is "true" if not change it. The problem is related to charset.
Carl thanks for your advice, the code i posted is not the one i'm using... i was probably confused by a file i was working on... here is the code actually used:
PHP Code:
// only include if less then 30 days as 30 is the max and leaving blank will default to the max
if (GOOGLE_PRODUCTS_EXPIRATION_DAYS <= 29) {
$item->appendChild($dom->createElement('g:expiration_date', $this->google_base_expiration_date($products->fields['base_date'])));
}
$item->appendChild($dom->createElement('link', $link));
if ($products->fields['products_model'] != '') {
$mpn = $dom->createElement('g:mpn');
$mpn->appendChild($dom->createCDATASection($this->google_base_xml_sanitizer($products->fields['products_model'])));
$item->appendChild($mpn);
}
if ($products->fields['products_gtin'] != '') {
$gtin = $dom->createElement('g:gtin');
$gtin->appendChild($dom->createCDATASection($this->google_base_xml_sanitizer($products->fields['products_gtin'])));
$item->appendChild($gtin);
}
This is the code around line 388-402 of /includes/classes/google_base.php
the output is exactly as i wrote and like this:
<g:mpn>
<![CDATA[ INCBAL1500000 ]]>
</g:mpn>
<g:gtin>
<![CDATA[ ]]>
</g:gtin>
The problem as You can see is that i got the gtin void even if in the database it has a value
Bookmarks